You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using the TcpSyslogMessageSender to send audit logs in the RFC5424 format to a local rsyslog server.
Our service creates an instance of TcpSyslogMessageSender when it starts and begins emitting events once the start-up procedure has been completely successful.
In cases where our service is shutdown before the first audit event is dispatched, we've noticed that the close method on the TcpSyslogMessageSender can throw a null point exception as the socket hasn't been assigned yet and is indeed null at that stage.
Jenkins and plugins versions report
We're using the
TcpSyslogMessageSender
to send audit logs in theRFC5424
format to a local rsyslog server.Our service creates an instance of
TcpSyslogMessageSender
when it starts and begins emitting events once the start-up procedure has been completely successful.In cases where our service is shutdown before the first audit event is dispatched, we've noticed that the close method on the
TcpSyslogMessageSender
can throw a null point exception as the socket hasn't been assigned yet and is indeed null at that stage.There are other parts of this class that leverage com.cloudbees.syslog.util.IoUtils#closeQuietly, which looks like a suitable solution to this issue.
Keen to get your thoughts on this,
Thanks
What Operating System are you using (both controller, and any agents involved in the problem)?
Error happening on a Windows Feature Experience Pack 1000.19053.1000.0
Reproduction steps
com.cloudbees:syslog-java-client:1.1.7
TcpSyslogMessageSender
close()
method on theTcpSyslogMessageSender
instanceExpected Results
Not exception to be thrown
Actual Results
Null pointer exception is thrown
Anything else?
No response
Are you interested in contributing a fix?
Happy to contribute and fix this issue if the solution is adequate enough
The text was updated successfully, but these errors were encountered: