[
https://issues.jboss.org/browse/WFCORE-1401?page=com.atlassian.jira.plugi...
]
James Perkins closed WFCORE-1401.
---------------------------------
Resolution: Rejected
This is the expected behavior. Here's what happens in the
{{org.jboss.logmanager.handlers.SyslogHandler}}.
* First message when the server is down is sent and no error is raised by the
{{java.net.Socket}} therefore the syslog handler thinks all is okay
* A second message is sent this time the {{java.net.Socket}} throws a
{{java.net.SocketException: Broken pipe}}. The syslog handler reports this and the socket
attempts to reconnect, but the message is not sent again.
* The third message succeeds because the connection has once again been resestablished
This works in your second scenario as well because the socket keeps attempting to connect.
A successful connection is made by the time you send your third message. There is a
possibility the message might not be sent until the fourth or fifth message even. It all
depends on when the socket is reconnected.
That said there is a setting, {{blockOnReconnect}} which defaults to {{false}}, that will
guarantee the third message is logged. The handler will block until a connection has been
reestablished. I would however only suggest this be used wrapped in an {{async-handler}}
as you could stall the entire server until the connection has been reestablished.
TCP Syslog handler cannot log some messages after reconnect
-----------------------------------------------------------
Key: WFCORE-1401
URL:
https://issues.jboss.org/browse/WFCORE-1401
Project: WildFly Core
Issue Type: Bug
Components: Logging
Reporter: Ondrej Lukas
Assignee: James Perkins
Attachments: logging-deployment.war
In case when logging to syslog through TCP protocol is configured and syslog port becomes
unreachable then after syslog restart some messages can be thrown away.
It seems syslog handler needs to another two logs for correct closing original TCP
connection. In case when syslog is restarted and
* no message is logged during syslog is unreachable then the first two messages will not
be logged to syslog after syslog is running again
* one message is attempted to be logged during syslog is unreachable then the first
message will not be logged to syslog after syslog is running again
* two and more messages are attempted to be logged during syslog is unreachable then
everything is logged correctly after syslog is running again
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)