引导或修复节点

时间:2015-12-31 22:05:40

标签: cassandra broken-pipe

我在两个数据中心有两个节点“A”和“B”,

DC1中的A,DC2中的B.

DC1的复制因子= 3,DC2 = 1。

我尝试将新节点“C”加入DC1,但我在节点“A”上收到此错误消息

ERROR [STREAM-OUT-/X.X.XX.XXX] 2015-12-31 02:39:05,252 StreamSession.java:524 - [Stream #a74ecdc0-af67-11e5-8429-a94b3a1b0e16] Streaming error occurred
org.apache.cassandra.io.FSReadError: java.io.IOException: Broken pipe
        at org.apache.cassandra.io.util.ChannelProxy.transferTo(ChannelProxy.java:144) ~[apache-cassandra-2.2.4.jar:2.2.4]
        at org.apache.cassandra.streaming.compress.CompressedStreamWriter$1.apply(CompressedStreamWriter.java:79) ~[apache-cassandra-2.2.4.jar:2.2.4]
        at org.apache.cassandra.streaming.compress.CompressedStreamWriter$1.apply(CompressedStreamWriter.java:76) ~[apache-cassandra-2.2.4.jar:2.2.4]
        at org.apache.cassandra.io.util.BufferedDataOutputStreamPlus.applyToChannel(BufferedDataOutputStreamPlus.java:297) ~[apache-cassandra-2.2.4.jar:2.2.4]
        at org.apache.cassandra.streaming.compress.CompressedStreamWriter.write(CompressedStreamWriter.java:75) ~[apache-cassandra-2.2.4.jar:2.2.4]
        at org.apache.cassandra.streaming.messages.OutgoingFileMessage.serialize(OutgoingFileMessage.java:90) ~[apache-cassandra-2.2.4.jar:2.2.4]
        at org.apache.cassandra.streaming.messages.OutgoingFileMessage$1.serialize(OutgoingFileMessage.java:48) ~[apache-cassandra-2.2.4.jar:2.2.4]
        at org.apache.cassandra.streaming.messages.OutgoingFileMessage$1.serialize(OutgoingFileMessage.java:40) ~[apache-cassandra-2.2.4.jar:2.2.4]
        at org.apache.cassandra.streaming.messages.StreamMessage.serialize(StreamMessage.java:47) ~[apache-cassandra-2.2.4.jar:2.2.4]
        at org.apache.cassandra.streaming.ConnectionHandler$OutgoingMessageHandler.sendMessage(ConnectionHandler.java:363) ~[apache-cassandra-2.2.4.jar:2.2.4]
        at org.apache.cassandra.streaming.ConnectionHandler$OutgoingMessageHandler.run(ConnectionHandler.java:335) ~[apache-cassandra-2.2.4.jar:2.2.4]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65]
Caused by: java.io.IOException: Broken pipe
        at sun.nio.ch.FileChannelImpl.transferTo0(Native Method) ~[na:1.8.0_65]
        at sun.nio.ch.FileChannelImpl.transferToDirectlyInternal(FileChannelImpl.java:427) ~[na:1.8.0_65]
        at sun.nio.ch.FileChannelImpl.transferToDirectly(FileChannelImpl.java:492) ~[na:1.8.0_65]
        at sun.nio.ch.FileChannelImpl.transferTo(FileChannelImpl.java:607) ~[na:1.8.0_65]
        at org.apache.cassandra.io.util.ChannelProxy.transferTo(ChannelProxy.java:140) ~[apache-cassandra-2.2.4.jar:2.2.4]
        ... 11 common frames omitted

我尝试在节点A上运行nodetool修复,但我得到:

范围xx xx的修复会话xxx失败,错误流失败

[2015-12-31 14:36:12,722] Repair session 75e93060-af4c-11e5-8429-a94b3a1b0e16 for range (-4171974372789419026,-4027636102743839484] failed with error Stream failed (progress: 9%)
[2015-12-31 16:48:26,913] Repair session 75f76130-af4c-11e5-8429-a94b3a1b0e16 for range (-1477833652511894033,-1464467586067376161] finished (progress: 12%)
[2015-12-31 17:19:40,353] Repair session 75f82483-af4c-11e5-8429-a94b3a1b0e16 for range (4136345906437366778,4261334469649078197] failed with error Stream failed (progress: 12%)

并且在日志中出现相同的 Broken pipe 错误

我发现了一些可能是网络问题的信息。我用mtr检查节点之间的连接,但这还够吗?

是否有其他可能只在失败范围内重试修复?

1 个答案:

答案 0 :(得分:2)

当遇到大于2.14GB的部分时,CompressedStreamReader中似乎存在一个错误(因为使用int而不是long来计算部分长度......)

请参阅此错误https://issues.apache.org/jira/browse/CASSANDRA-10961,已附加已修补的JAR,并将包含在Cassandra 2.2.5中