My server.log file is filled with these messages about “GRIZZLY0004: Can not set TCP_NODELAY to true”. What’s wrong and how can I correct?
Description of steps you’ve taken to attempt to solve the issue
Environmental information
Operating system information
FreeBSD 12.2-RELEASE-p10, running inside a FreeBSD iocage jail
Package versions
Graylog 4.1.5
MongoDB 4.0.27
Elasticsearch 7.15.1
openjdk11-11.0.12+7.1_1
2021-10-30 10:49:32,633 WARN o.g.g.n.t.TCPNIOTransport [grizzly-nio-kernel(1) SelectorRunner] GRIZZLY0004: Can not set TCP_NODELAY to true
java.net.SocketException: Connection reset by peer
at sun.nio.ch.Net.setIntOption0(Native Method) ~[?:1.8.0_302]
at sun.nio.ch.Net.setSocketOption(Net.java:353) ~[?:1.8.0_302]
at sun.nio.ch.SocketChannelImpl.setOption(SocketChannelImpl.java:188) ~[?:1.8.0_302]
at sun.nio.ch.SocketAdaptor.setBooleanOption(SocketAdaptor.java:287) ~[?:1.8.0_302]
at sun.nio.ch.SocketAdaptor.setTcpNoDelay(SocketAdaptor.java:322) ~[?:1.8.0_302]
at org.glassfish.grizzly.nio.transport.TCPNIOTransport$DefaultChannelConfigurator.postConfigure(TCPNIOTransport.java:792) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOServerConnection.configureAcceptedChannel(TCPNIOServerConnection.java:161) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOServerConnection.onAccept(TCPNIOServerConnection.java:221) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:485) [graylog.jar:?]
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89) [graylog.jar:?]
at org.glassfish.grizzly.strategies.SameThreadIOStrategy.executeIoEvent(SameThreadIOStrategy.java:79) [graylog.jar:?]
at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:66) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:391) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:360) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:324) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:255) [graylog.jar:?]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569) [graylog.jar:?]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549) [graylog.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_302]
Thanks for the note about the Elasticsearch version. I hadn’t seen that.
This is an older instance, and I upgraded from ES6 to 7 months ago. I didn’t go back and read the new install doc page, but I see that’s where the screenshot is from. Interestingly the upgrade page in the docs, doesn’t mention the ES version.
Progressive updates to Elasticsearch and all other installed packages are just from doing ‘pkg upgrade’ occasionally. The ES6 to 7 upgrade was manual from a few months ago.
I am running graylog behind an haproxy reverse-proxy on opnsense (FreeBSD). Additionally it’s using SSL-passthrough, if that helps.
I’ve been getting these messages for several months. Prior to when I upgraded from ES 6 to 7, although I don’t recall exactly those dates, so I don’t suspect that is the cause of this specific error (but maybe others to come – we’ll see!).
My knowledge is limited on haproxy but I can look into it. Maybe find something and post it here.
EDIT: showing the full log file would help greatly. What you have showed could be a couple different issues. When posting configuration files or code please use the markdown. This will help spot small details to resolve your issue. The HowTo can be found here.
Here’s some additional server.log entries, repeating the same error. If there’s a way to export the values from my graylog.conf I can add that also. I couldn’t find an easy way to do that however.
Thank you!
server.log
2021-11-06 19:55:38,948 WARN o.g.g.n.t.TCPNIOTransport [grizzly-nio-kernel(1) SelectorRunner] GRIZZLY0004: Can not set TCP_NODELAY to true
java.net.SocketException: Connection reset by peer
at sun.nio.ch.Net.setIntOption0(Native Method) ~[?:1.8.0_312]
at sun.nio.ch.Net.setSocketOption(Net.java:353) ~[?:1.8.0_312]
at sun.nio.ch.SocketChannelImpl.setOption(SocketChannelImpl.java:188) ~[?:1.8.0_312]
at sun.nio.ch.SocketAdaptor.setBooleanOption(SocketAdaptor.java:287) ~[?:1.8.0_312]
at sun.nio.ch.SocketAdaptor.setTcpNoDelay(SocketAdaptor.java:322) ~[?:1.8.0_312]
at org.glassfish.grizzly.nio.transport.TCPNIOTransport$DefaultChannelConfigurator.postConfigure(TCPNIOTransport.java:792) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOServerConnection.configureAcceptedChannel(TCPNIOServerConnection.java:161) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOServerConnection.onAccept(TCPNIOServerConnection.java:221) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:485) [graylog.jar:?]
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89) [graylog.jar:?]
at org.glassfish.grizzly.strategies.SameThreadIOStrategy.executeIoEvent(SameThreadIOStrategy.java:79) [graylog.jar:?]
at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:66) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:391) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:360) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:324) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:255) [graylog.jar:?]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569) [graylog.jar:?]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549) [graylog.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
2021-11-06 19:55:50,960 WARN o.g.g.n.t.TCPNIOTransport [grizzly-nio-kernel(1) SelectorRunner] GRIZZLY0004: Can not set TCP_NODELAY to true
java.net.SocketException: Connection reset by peer
at sun.nio.ch.Net.setIntOption0(Native Method) ~[?:1.8.0_312]
at sun.nio.ch.Net.setSocketOption(Net.java:353) ~[?:1.8.0_312]
at sun.nio.ch.SocketChannelImpl.setOption(SocketChannelImpl.java:188) ~[?:1.8.0_312]
at sun.nio.ch.SocketAdaptor.setBooleanOption(SocketAdaptor.java:287) ~[?:1.8.0_312]
at sun.nio.ch.SocketAdaptor.setTcpNoDelay(SocketAdaptor.java:322) ~[?:1.8.0_312]
at org.glassfish.grizzly.nio.transport.TCPNIOTransport$DefaultChannelConfigurator.postConfigure(TCPNIOTransport.java:792) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOServerConnection.configureAcceptedChannel(TCPNIOServerConnection.java:161) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOServerConnection.onAccept(TCPNIOServerConnection.java:221) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:485) [graylog.jar:?]
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89) [graylog.jar:?]
at org.glassfish.grizzly.strategies.SameThreadIOStrategy.executeIoEvent(SameThreadIOStrategy.java:79) [graylog.jar:?]
at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:66) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:391) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:360) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:324) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:255) [graylog.jar:?]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569) [graylog.jar:?]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549) [graylog.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
2021-11-06 19:56:00,970 WARN o.g.g.n.t.TCPNIOTransport [grizzly-nio-kernel(1) SelectorRunner] GRIZZLY0004: Can not set TCP_NODELAY to true
java.net.SocketException: Connection reset by peer
at sun.nio.ch.Net.setIntOption0(Native Method) ~[?:1.8.0_312]
at sun.nio.ch.Net.setSocketOption(Net.java:353) ~[?:1.8.0_312]
at sun.nio.ch.SocketChannelImpl.setOption(SocketChannelImpl.java:188) ~[?:1.8.0_312]
at sun.nio.ch.SocketAdaptor.setBooleanOption(SocketAdaptor.java:287) ~[?:1.8.0_312]
at sun.nio.ch.SocketAdaptor.setTcpNoDelay(SocketAdaptor.java:322) ~[?:1.8.0_312]
at org.glassfish.grizzly.nio.transport.TCPNIOTransport$DefaultChannelConfigurator.postConfigure(TCPNIOTransport.java:792) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOServerConnection.configureAcceptedChannel(TCPNIOServerConnection.java:161) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOServerConnection.onAccept(TCPNIOServerConnection.java:221) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:485) [graylog.jar:?]
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89) [graylog.jar:?]
at org.glassfish.grizzly.strategies.SameThreadIOStrategy.executeIoEvent(SameThreadIOStrategy.java:79) [graylog.jar:?]
at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:66) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:391) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:360) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:324) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:255) [graylog.jar:?]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569) [graylog.jar:?]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549) [graylog.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
2021-11-06 19:56:08,978 WARN o.g.g.n.t.TCPNIOTransport [grizzly-nio-kernel(1) SelectorRunner] GRIZZLY0004: Can not set TCP_NODELAY to true
java.net.SocketException: Connection reset by peer
at sun.nio.ch.Net.setIntOption0(Native Method) ~[?:1.8.0_312]
at sun.nio.ch.Net.setSocketOption(Net.java:353) ~[?:1.8.0_312]
at sun.nio.ch.SocketChannelImpl.setOption(SocketChannelImpl.java:188) ~[?:1.8.0_312]
at sun.nio.ch.SocketAdaptor.setBooleanOption(SocketAdaptor.java:287) ~[?:1.8.0_312]
at sun.nio.ch.SocketAdaptor.setTcpNoDelay(SocketAdaptor.java:322) ~[?:1.8.0_312]
at org.glassfish.grizzly.nio.transport.TCPNIOTransport$DefaultChannelConfigurator.postConfigure(TCPNIOTransport.java:792) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOServerConnection.configureAcceptedChannel(TCPNIOServerConnection.java:161) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOServerConnection.onAccept(TCPNIOServerConnection.java:221) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:485) [graylog.jar:?]
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89) [graylog.jar:?]
at org.glassfish.grizzly.strategies.SameThreadIOStrategy.executeIoEvent(SameThreadIOStrategy.java:79) [graylog.jar:?]
at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:66) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:391) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:360) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:324) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:255) [graylog.jar:?]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569) [graylog.jar:?]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549) [graylog.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
2021-11-06 19:56:43,021 WARN o.g.g.n.t.TCPNIOTransport [grizzly-nio-kernel(1) SelectorRunner] GRIZZLY0004: Can not set TCP_NODELAY to true
java.net.SocketException: Connection reset by peer
at sun.nio.ch.Net.setIntOption0(Native Method) ~[?:1.8.0_312]
at sun.nio.ch.Net.setSocketOption(Net.java:353) ~[?:1.8.0_312]
at sun.nio.ch.SocketChannelImpl.setOption(SocketChannelImpl.java:188) ~[?:1.8.0_312]
at sun.nio.ch.SocketAdaptor.setBooleanOption(SocketAdaptor.java:287) ~[?:1.8.0_312]
at sun.nio.ch.SocketAdaptor.setTcpNoDelay(SocketAdaptor.java:322) ~[?:1.8.0_312]
at org.glassfish.grizzly.nio.transport.TCPNIOTransport$DefaultChannelConfigurator.postConfigure(TCPNIOTransport.java:792) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOServerConnection.configureAcceptedChannel(TCPNIOServerConnection.java:161) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOServerConnection.onAccept(TCPNIOServerConnection.java:221) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:485) [graylog.jar:?]
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89) [graylog.jar:?]
at org.glassfish.grizzly.strategies.SameThreadIOStrategy.executeIoEvent(SameThreadIOStrategy.java:79) [graylog.jar:?]
at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:66) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:391) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:360) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:324) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:255) [graylog.jar:?]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569) [graylog.jar:?]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549) [graylog.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
2021-11-06 19:56:51,029 WARN o.g.g.n.t.TCPNIOTransport [grizzly-nio-kernel(1) SelectorRunner] GRIZZLY0004: Can not set TCP_NODELAY to true
java.net.SocketException: Connection reset by peer
at sun.nio.ch.Net.setIntOption0(Native Method) ~[?:1.8.0_312]
at sun.nio.ch.Net.setSocketOption(Net.java:353) ~[?:1.8.0_312]
at sun.nio.ch.SocketChannelImpl.setOption(SocketChannelImpl.java:188) ~[?:1.8.0_312]
at sun.nio.ch.SocketAdaptor.setBooleanOption(SocketAdaptor.java:287) ~[?:1.8.0_312]
at sun.nio.ch.SocketAdaptor.setTcpNoDelay(SocketAdaptor.java:322) ~[?:1.8.0_312]
at org.glassfish.grizzly.nio.transport.TCPNIOTransport$DefaultChannelConfigurator.postConfigure(TCPNIOTransport.java:792) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOServerConnection.configureAcceptedChannel(TCPNIOServerConnection.java:161) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOServerConnection.onAccept(TCPNIOServerConnection.java:221) [graylog.jar:?]
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:485) [graylog.jar:?]
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89) [graylog.jar:?]
at org.glassfish.grizzly.strategies.SameThreadIOStrategy.executeIoEvent(SameThreadIOStrategy.java:79) [graylog.jar:?]
at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:66) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:391) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:360) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:324) [graylog.jar:?]
at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:255) [graylog.jar:?]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569) [graylog.jar:?]
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549) [graylog.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
Make sure to use </> and obfuscate where needed when posting.
I googled and found at this link here granted it is not Graylog and refers to windows but it explains the OJDK issue pretty well and offers what might be a relevant solution to keeping it from filling logs. This could be either a java or FreeBSD or combination error but it looks like by my search it it just a log annoyance and can be shut off by modifying the log4j2.xml file?
Caveat that is google talking, not personal experience.