Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack trace dump during "natural" TCP server socket recycling could be suppressed #239

Open
justparking opened this issue Mar 24, 2022 · 0 comments

Comments

@justparking
Copy link
Contributor

For example, the following stack-trace might cause unnecessary alarm for someone reading it.

Unexpected exception occurred, pulling down channel server.
Mar 25 06:25:03 ndl-_____ jsvc.exec[770]: java.net.SocketException: Broken pipe (Write failed)
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
at org.nodel.diagnostics.CountableOutputStream.write(CountableOutputStream.java:83)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
at org.nodel.core.TCPChannelServer.doSendMessage(TCPChannelServer.java:342)
at org.nodel.core.TCPChannelServer.processOutgoingMessageQueue(TCPChannelServer.java:195)
at org.nodel.core.TCPChannelServer.access$100(TCPChannelServer.java:27)
at org.nodel.core.TCPChannelServer$2.run(TCPChannelServer.java:128)
at java.lang.Thread.run(Thread.java:748)

The condition "naturally" occurs if a TCP connection to the server port recycles say, due to another nodel server rebooting, etc.

INFO level could be used instead of WARN and just the message included instead of an entire stack dump.

In the same file, TCPChannelServer.java, there is actually a related error which could also treated the same as above.

this._logger.info("Unexpected exception occurred; this may be natural. Pulling down channel server.", exc);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant