Why the connection disconnected at 10:46 yesterday?

Normally, it will reconnect using emaj as shown in the follwing capture.

image

However, I don't know what happened yesterday. There is no logs, it just can't receive data(Foreign exchange).

image

Best Answer

  • Hello @Raj.Huang

    The error “Network is unreachable: no further information”
    seemed that there was a network problem at that time. The problem made EMA
    application could not connect to the server so the server could not send data
    to the application. I suggest you should contact your company’s network team to
    investigate the network between the application to the server.

Answers

  • Thanks for your answer. I know the error 'Network is uncreachabke....', that is the normal error, I did it intentionlly. But at 10:46 yesterday, there are no logs like that. And it didn't reconnect itself, it just no data antmore util I restart my application.

  • Hello @Raj.Huang

    I suggest you set XmlTraceToStdout to 1 in EmaConfig.xml
    located in the application’s run directory. For example:

    <Consumer>
    <Name value="Consumer_1"/>
    ...
    <XmlTraceToStdout value="1"/>
    </Consumer>

    This will enable EMA
    traces its messages (received and sent messages) in XML format to stdout. When the problem occurs again, we can check in the log messages what happens.

  • If you enable it successfully, you should see a refresh message sent from the server that EMA traces. For example:

    image

  • Thanks! But I don't use EmaConfig.xml to config my application. I just use the default configuration.

    OmmConsumerConfig config = EmaFactory.createOmmConsumerConfig();
    config.host(sourceHost + ":" + sourcePort);
    config.username(sourceUserName);

  • Is there any Java config ? like

    config.traceToStdout(1);
  • No. EMA provides XmlTraceToStdout for tracing.

    Please put EmaConfig.xml in the application run directory.
    Your given source code will override Consumer_1 node which is default.
    Then, set XmlTraceToStdout to be 1 in the Consumer_1 node(the node which has <Name value="Consumer_1"/>) as shown in the example
    above.

  • Pimchaya.Wongrukun,
    it worked! But if the application dies again, what will I see in the log?

    image

  • There are several causes that the application does not receive data so I cannot tell you for now what you will see in the log. If the problem occurs again, please send me the trace log. Then, I will analyze the file to help you to find out the root cause.

  • OK, thank you a lot !

  • Pimchaya.Wongrukun,

    I found I can't output the log to file, it only shows in the eclipse console. Do you know the reason? Please help me.

  • EMA writes log on the console not a file. This is expected behaviors. You should re-direct console output to a file by setting in Eclipse.