I’ve scenario where control socket is closed and the client is not aware of it. Hence failed to re-register.
We have registered a daemon for operational data using dataprovider api’s. During application startup, daemon initialization happens and starts listening for opdata callbacks. When there is a external timeout like while querying the data from external database, confd closes the socket and throws exception to the client and client re-register the daemon again. So far no issues.
But for some reason (no clue why) when there is high load on CPU, Confd closes control socket (saying external timeout for new session) and the client is not able to determine whether the daemon is alive or died.
Could you please let us know how to determine the status of daemon and do reregistration of daemon again in this case.
Also is there any limit on number of callpoint processing at a time (callpoint of same or different)
Below is the Exception we got from confd. We have code to catch confException and do reregistration. But we got RuntimeException.
java.lang.RuntimeException: Error in DpTrans worker
Caused by: com.tailf.conf.ConfException: unexpected end of file
… 4 more
Caused by: java.io.EOFException
Can you please let me know why confd is throwing java.lang.RuntimeException: Error in DpTrans worker.
As I already mentioned, we have re-registration code in place for ConfException and IOException while listening (dp.read()). But in this confd throws RuntimeException and hence we failed to re-register.
External timeout for new session most likely means that your Dp instance fails to call Dp.read() before newSessionTimeout (defaults to 15 seconds) runs out. If that happens, ConfD closes all related sockets and running workers can expect all kinds of exceptions. Also, since your Dp.read() is not running at this moment, or is not currently waiting on the control socket event, you do not get the exception immediately; you would get it in the subsequent call to Dp.read() though.
You have the source code, so perhaps you will be able to demystify & understand the reason for the ConfD Java API throwing the runtime exception “Error in DpTrans worker” if you search for that string in conf-api-src/src/com/tailf/dp/DpTrans.java
$ cd $CONFD_DIR/java/jar/
$ mkdir confd-api-src && cd confd-api-src && jar -xvf ../confd-src-7.x.x.jar && cd -
$ cat conf-api-src/src/com/tailf/dp/DpTrans.java