4

Cassandra 日志中出现意外错误,目前还无法追查根本原因。什么组件使用了 Netty,或者这个问题是众所周知的?(找不到任何信息)

INFO  [SharedPool-Worker-1] 2016-05-18 13:47:41,004  Message.java:532 - Unexpected exception during request; channel = [id: 0xe93fe01e, /40.68.XX.XXX:50818 :> /10.1.XX.X:9042]
io.netty.channel.unix.Errors$NativeIoException: readAddress() failed: Connection timed out
        at io.netty.channel.unix.Errors.newIOException(Errors.java:105) ~[netty-all-4.0.34.Final.jar:4.0.34.Final]
        at io.netty.channel.unix.Errors.ioResult(Errors.java:121) ~[netty-all-4.0.34.Final.jar:4.0.34.Final]
        at io.netty.channel.unix.FileDescriptor.readAddress(FileDescriptor.java:134) ~[netty-all-4.0.34.Final.jar:4.0.34.Final]
        at io.netty.channel.epoll.AbstractEpollChannel.doReadBytes(AbstractEpollChannel.java:239) ~[netty-all-4.0.34.Final.jar:4.0.34.Final]
        at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:822) ~[netty-all-4.0.34.Final.jar:4.0.34.Final]
        at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:348) ~[netty-all-4.0.34.Final.jar:4.0.34.Final]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:264) ~[netty-all-4.0.34.Final.jar:4.0.34.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) ~[netty-all-4.0.34.Final.jar:4.0.34.Final]
        at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) ~[netty-all-4.0.34.Final.jar:4.0.34.Final]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]
4

2 回答 2

1

如果您正在为 Cassandra 使用Gocql驱动程序并获得此信息,请查看将 keepAlive 设置添加到连接配置是否可以解决此问题。发生读取超时,此配置帮助我们

type ConnConfig
type ConnConfig struct {
    ProtoVersion   int
    CQLVersion     string
    Timeout        time.Duration
    ConnectTimeout time.Duration
    Compressor     Compressor
    Authenticator  Authenticator
    Keepalive      time.Duration
    // contains filtered or unexported fields
}

https://godoc.org/github.com/gocql/gocql

于 2018-05-10T08:05:10.147 回答
0

似乎较新的 NETTY 版本更冗长,但无论如何它都是无害的 INFO 消息 - 如果您不想看到它,您可以更改您的 logback 配置。

于 2016-08-24T21:19:35.720 回答