Callpoint daemon timeout and closes control socket

Hi Team,

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
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
Caused by: com.tailf.conf.ConfException: unexpected end of file
at com.tailf.conf.ConfInternal.readFill(
at com.tailf.conf.ConfInternal.termRead(
at com.tailf.conf.ConfInternal.termRead(
… 4 more
Caused by:



See examples.confd/intro/java/9-threads/ main() and createDaemon() functions for an example.

Best regards


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 ( 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 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 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 though.

We got RuntimeException, which is not expected as per the method signature of read().
Client is expecting only ConfException and IOException.

But the RuntimeException you show does not come from, or does it? The message you posted says:

So it is in the worker thread, not in the main thread.

Yes, from DPTrans worker. When there is an error in worker thread, control socket is getting closed right.

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/

$ 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/

And that was my point - since the control socket is closed, your subsequent call to would throw IOException; and as you write else where

your re-registration code should trigger. Do you observe something different?

Note that this is not the only approach; if things go so wrong it might be a bit safer to simply let the whole application terminate and have a watchdog restart it.