如何修复来自 apache-spark 的对等消息重置的连接?
How to fix Connection reset by peer message from apache-spark?
我经常收到以下异常,我想知道为什么会这样?经过研究我发现我可以做 .set("spark.submit.deployMode", "nio");
但这也不起作用,我正在使用 spark 2.0.0
WARN TransportChannelHandler: Exception in connection from /172.31.3.245:46014
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:192)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:221)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:898)
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:242)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:119)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor.run(SingleThreadEventExecutor.java:112)
即使我尝试了很多 things.My 作业,但在 运行 很长一段时间后,我还是遇到了同样的错误。我尝试了一些解决方法来帮助我解决问题。虽然,至少我的工作运行良好,但我仍然遇到同样的错误。
一个原因可能是执行者认为他们失去了与主人的联系而自杀。我在 spark-defaults.conf 文件中添加了以下配置。
spark.network.timeout 10000000
spark.executor.heartbeatInterval 10000000
基本上,我增加了网络超时和心跳间隔
卡住的具体步骤,我只是缓存了用于处理的数据帧(在卡住的步骤中)
注意:- 这些是解决方法,我仍然在错误日志中看到相同的错误,但我的工作没有终止。
我经常收到以下异常,我想知道为什么会这样?经过研究我发现我可以做 .set("spark.submit.deployMode", "nio");
但这也不起作用,我正在使用 spark 2.0.0
WARN TransportChannelHandler: Exception in connection from /172.31.3.245:46014
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:192)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:221)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:898)
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:242)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:119)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor.run(SingleThreadEventExecutor.java:112)
即使我尝试了很多 things.My 作业,但在 运行 很长一段时间后,我还是遇到了同样的错误。我尝试了一些解决方法来帮助我解决问题。虽然,至少我的工作运行良好,但我仍然遇到同样的错误。
一个原因可能是执行者认为他们失去了与主人的联系而自杀。我在 spark-defaults.conf 文件中添加了以下配置。
spark.network.timeout 10000000 spark.executor.heartbeatInterval 10000000 基本上,我增加了网络超时和心跳间隔
卡住的具体步骤,我只是缓存了用于处理的数据帧(在卡住的步骤中)
注意:- 这些是解决方法,我仍然在错误日志中看到相同的错误,但我的工作没有终止。