Confd not accepting new connection via NETCONF

Hi Team,
I am trying to establish confd connection via NETCONF like below:

NetconfSession session = null;
try {
session = device.getSession(sessionName);
if(session == null) {
device.newSession(sessionName);
}
}catch(Exception e) {
device.newSession(sessionName);
}

configReply = device.getSession(sessionName).rpc(rpc).toXMLString();

some time device.newSession will fails to create new netconf session with confd and exception will be thrown. So how to overcome this session creation failure. What’s needs to be check from confd side if issue still persists? Is any log file, if so what will be the log statement for this kind of issue? Please help me on this.

Regards,
Badari.

You say you get exception, but don’t give us its output/trace so its hard to give many hints… :slight_smile:

The code that you pasted is from some NETCONF client library in Java I assume?
If it throws some exception, it should say some details/error code/etc. on what is wrong to allow more debugging…

From ConfD side, you can check its NETCONF log configured in <netconfLog> setting in confd.conf (by default it’s netconf.log file), and see if it has some related information when you hit failure…