Normally, it will reconnect using emaj as shown in the follwing capture.
However, I don't know what happened yesterday. There is no logs, it just can't receive data(Foreign exchange).
Hello @Raj.Huang
The error “Network is unreachable: no further information”seemed that there was a network problem at that time. The problem made EMAapplication could not connect to the server so the server could not send datato the application. I suggest you should contact your company’s network team toinvestigate the network between the application to the server.
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.
I suggest you set XmlTraceToStdout to 1 in EmaConfig.xmllocated in the application’s run directory. For example:
<Consumer> <Name value="Consumer_1"/> ... <XmlTraceToStdout value="1"/></Consumer>
This will enable EMAtraces 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:
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 exampleabove.
Hi, @pimchaya.wongrukun01,it worked! But if the application dies again, what will I see in the log?
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 !
Hi, @pimchaya.wongrukun01,
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.