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










share|improve this question






















  • 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

















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










share|improve this question






















  • 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















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










share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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




















  • 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














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.






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    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

























    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.






    share|improve this answer

























      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.






      share|improve this answer























        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.






        share|improve this answer












        The issue was with my log4j2 version. I have upgraded to the latest version and its working fine now.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 3 at 11:40









        pradeep thota

        12




        12






























            draft saved

            draft discarded




















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Trompette piccolo

            Slow SSRS Report in dynamic grouping and multiple parameters

            Simon Yates (cyclisme)