log4j2 Socket Appender with SSL enabled
up vote
0
down vote
favorite
Here is my log4j2 SocketAppender configured with SSL
<Configuration status="warn">
<Socket name="transSocketAppender" host="lxddv002.test.intranet"
port="9400" protocol="TCP" reconnectionDelayMillis="30000"
immediateFail="false">
<PatternLayout pattern="%m%n" charset="UTF-8" />
<SSL>
<Truststore location="C:UsersAC26252Desktopcertskeystore.jks"
password="123456" />
</SSL>
</Socket>
<Async name="transSocketAsyncAppender" bufferSize="204800">
<AppenderRef ref="transSocketAppender" />
</Async>
I get this error on my server restart and the first few(2 or 3) request logs are lost and not being transported.
2018-11-22 19:04:05,243 AsyncAppender-socketAsyncAppender ERROR Unable to write to stream TLS:lxddv002.test.intranet:9400 for appender socketAppender: org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to TLS:lxddv002.test.intranet:9400
2018-11-22 19:04:05,259 AsyncAppender-socketAsyncAppender ERROR An exception occurred processing Appender socketAppender
org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to TLS:lxddv002.test.intranet:9400
at org.apache.logging.log4j.core.net.TcpSocketManager.write(TcpSocketManager.java:229)`at org.apache.logging.log4j.core.appender.OutputStreamManager.write(OutputStreamManager.java:201)`
Is there anything wrong with my configuration? Any help is appreciated. thanks
log4j2
add a comment |
up vote
0
down vote
favorite
Here is my log4j2 SocketAppender configured with SSL
<Configuration status="warn">
<Socket name="transSocketAppender" host="lxddv002.test.intranet"
port="9400" protocol="TCP" reconnectionDelayMillis="30000"
immediateFail="false">
<PatternLayout pattern="%m%n" charset="UTF-8" />
<SSL>
<Truststore location="C:UsersAC26252Desktopcertskeystore.jks"
password="123456" />
</SSL>
</Socket>
<Async name="transSocketAsyncAppender" bufferSize="204800">
<AppenderRef ref="transSocketAppender" />
</Async>
I get this error on my server restart and the first few(2 or 3) request logs are lost and not being transported.
2018-11-22 19:04:05,243 AsyncAppender-socketAsyncAppender ERROR Unable to write to stream TLS:lxddv002.test.intranet:9400 for appender socketAppender: org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to TLS:lxddv002.test.intranet:9400
2018-11-22 19:04:05,259 AsyncAppender-socketAsyncAppender ERROR An exception occurred processing Appender socketAppender
org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to TLS:lxddv002.test.intranet:9400
at org.apache.logging.log4j.core.net.TcpSocketManager.write(TcpSocketManager.java:229)`at org.apache.logging.log4j.core.appender.OutputStreamManager.write(OutputStreamManager.java:201)`
Is there anything wrong with my configuration? Any help is appreciated. thanks
log4j2
You mentioned first few are lost, may I ask if it does log after a while like say 1-2 mins ?
– user3392782
Nov 22 at 13:43
Even after 5-10 mins of server restart when I hit a request the same error appears. But it does makes a connection and log after few request hits
– pradeep thota
Nov 22 at 13:46
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Here is my log4j2 SocketAppender configured with SSL
<Configuration status="warn">
<Socket name="transSocketAppender" host="lxddv002.test.intranet"
port="9400" protocol="TCP" reconnectionDelayMillis="30000"
immediateFail="false">
<PatternLayout pattern="%m%n" charset="UTF-8" />
<SSL>
<Truststore location="C:UsersAC26252Desktopcertskeystore.jks"
password="123456" />
</SSL>
</Socket>
<Async name="transSocketAsyncAppender" bufferSize="204800">
<AppenderRef ref="transSocketAppender" />
</Async>
I get this error on my server restart and the first few(2 or 3) request logs are lost and not being transported.
2018-11-22 19:04:05,243 AsyncAppender-socketAsyncAppender ERROR Unable to write to stream TLS:lxddv002.test.intranet:9400 for appender socketAppender: org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to TLS:lxddv002.test.intranet:9400
2018-11-22 19:04:05,259 AsyncAppender-socketAsyncAppender ERROR An exception occurred processing Appender socketAppender
org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to TLS:lxddv002.test.intranet:9400
at org.apache.logging.log4j.core.net.TcpSocketManager.write(TcpSocketManager.java:229)`at org.apache.logging.log4j.core.appender.OutputStreamManager.write(OutputStreamManager.java:201)`
Is there anything wrong with my configuration? Any help is appreciated. thanks
log4j2
Here is my log4j2 SocketAppender configured with SSL
<Configuration status="warn">
<Socket name="transSocketAppender" host="lxddv002.test.intranet"
port="9400" protocol="TCP" reconnectionDelayMillis="30000"
immediateFail="false">
<PatternLayout pattern="%m%n" charset="UTF-8" />
<SSL>
<Truststore location="C:UsersAC26252Desktopcertskeystore.jks"
password="123456" />
</SSL>
</Socket>
<Async name="transSocketAsyncAppender" bufferSize="204800">
<AppenderRef ref="transSocketAppender" />
</Async>
I get this error on my server restart and the first few(2 or 3) request logs are lost and not being transported.
2018-11-22 19:04:05,243 AsyncAppender-socketAsyncAppender ERROR Unable to write to stream TLS:lxddv002.test.intranet:9400 for appender socketAppender: org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to TLS:lxddv002.test.intranet:9400
2018-11-22 19:04:05,259 AsyncAppender-socketAsyncAppender ERROR An exception occurred processing Appender socketAppender
org.apache.logging.log4j.core.appender.AppenderLoggingException: Error writing to TLS:lxddv002.test.intranet:9400
at org.apache.logging.log4j.core.net.TcpSocketManager.write(TcpSocketManager.java:229)`at org.apache.logging.log4j.core.appender.OutputStreamManager.write(OutputStreamManager.java:201)`
Is there anything wrong with my configuration? Any help is appreciated. thanks
log4j2
log4j2
asked Nov 22 at 13:39
pradeep thota
12
12
You mentioned first few are lost, may I ask if it does log after a while like say 1-2 mins ?
– user3392782
Nov 22 at 13:43
Even after 5-10 mins of server restart when I hit a request the same error appears. But it does makes a connection and log after few request hits
– pradeep thota
Nov 22 at 13:46
add a comment |
You mentioned first few are lost, may I ask if it does log after a while like say 1-2 mins ?
– user3392782
Nov 22 at 13:43
Even after 5-10 mins of server restart when I hit a request the same error appears. But it does makes a connection and log after few request hits
– pradeep thota
Nov 22 at 13:46
You mentioned first few are lost, may I ask if it does log after a while like say 1-2 mins ?
– user3392782
Nov 22 at 13:43
You mentioned first few are lost, may I ask if it does log after a while like say 1-2 mins ?
– user3392782
Nov 22 at 13:43
Even after 5-10 mins of server restart when I hit a request the same error appears. But it does makes a connection and log after few request hits
– pradeep thota
Nov 22 at 13:46
Even after 5-10 mins of server restart when I hit a request the same error appears. But it does makes a connection and log after few request hits
– pradeep thota
Nov 22 at 13:46
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
The issue was with my log4j2 version. I have upgraded to the latest version and its working fine now.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
The issue was with my log4j2 version. I have upgraded to the latest version and its working fine now.
add a comment |
up vote
0
down vote
accepted
The issue was with my log4j2 version. I have upgraded to the latest version and its working fine now.
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
The issue was with my log4j2 version. I have upgraded to the latest version and its working fine now.
The issue was with my log4j2 version. I have upgraded to the latest version and its working fine now.
answered Dec 3 at 11:40
pradeep thota
12
12
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53432254%2flog4j2-socket-appender-with-ssl-enabled%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You mentioned first few are lost, may I ask if it does log after a while like say 1-2 mins ?
– user3392782
Nov 22 at 13:43
Even after 5-10 mins of server restart when I hit a request the same error appears. But it does makes a connection and log after few request hits
– pradeep thota
Nov 22 at 13:46