Hi,
I have 2 links from my schema to confd schema:
leaf enabled {
tailf:info "Netconf status";
type boolean;
tailf:link "/dyncfg:confdConfig/dyncfg:netconf/dyncfg:enabled";
}
leaf enabled {
tailf:info "Restconf status";
type boolean;
tailf:link "/dyncfg:confdConfig/dyncfg:restconf/dyncfg:enabled";
}
Looks like sometimes after successfully committing a change to disable netconf, confd does not close its port.
Then, when re-enabling netconf, confd fails because that port is already in use.
Please see attached logs.
Here are the main parts:
- webui commit ‘netconf disabled’ so we don’t see that in the audit log, because that’s the default value:
<INFO> 18-Apr-2023::09:50:42.016 u22c_rx29 confd[1186980]: audit user: admin/57 JSON-RPC: 'commit' with JSON params {"th":91}
<INFO> 18-Apr-2023::09:50:42.060 u22c_rx29 confd[1186980]: audit user: admin/57 commit thandle 174398 begin
<INFO> 18-Apr-2023::09:50:42.062 u22c_rx29 confd[1186980]: audit user: admin/57 commit thandle 174398 /general:general/touch set to "592"
<INFO> 18-Apr-2023::09:50:42.063 u22c_rx29 confd[1186980]: audit user: admin/57 commit thandle 174398 end
<INFO> 18-Apr-2023::09:50:42.076 u22c_rx29 confd[1186980]: audit user: admin/57 WebUI commit succeeded
On this case, confd doesn’t stop using that port, in contrast to other cases you can see in the logs before that case.
- webui commit ‘netconf enabled’:
<INFO> 18-Apr-2023::09:51:09.469 u22c_rx29 confd[1186980]: audit user: admin/57 JSON-RPC: 'commit' with JSON params {"th":92}
<INFO> 18-Apr-2023::09:51:09.501 u22c_rx29 confd[1186980]: audit user: admin/57 commit thandle 174400 begin
<INFO> 18-Apr-2023::09:51:09.503 u22c_rx29 confd[1186980]: audit user: admin/57 commit thandle 174400 /system:system/netconf/enabled set to "true"
<INFO> 18-Apr-2023::09:51:09.504 u22c_rx29 confd[1186980]: audit user: admin/57 commit thandle 174400 /confd_dyncfg:confdConfig/netconf/enabled set to "true"
<INFO> 18-Apr-2023::09:51:09.504 u22c_rx29 confd[1186980]: audit user: admin/57 commit thandle 174400 /general:general/touch set to "593"
<INFO> 18-Apr-2023::09:51:09.505 u22c_rx29 confd[1186980]: audit user: admin/57 commit thandle 174400 end
<INFO> 18-Apr-2023::09:51:09.526 u22c_rx29 confd[1186980]: audit user: admin/57 WebUI commit succeeded
On this case, we can see in confd.log that confd fails to take the netconf port (2022) because it’s already in use, as opposed to other cases when it does on disable:
<INFO> 18-Apr-2023::09:50:36.087 u22c_rx29 confd[1186980]: - Stopping to listen for NETCONF SSH on :::2022
<INFO> 18-Apr-2023::09:50:36.091 u22c_rx29 confd[1186980]: - Stopping to listen for NETCONF SSH on 0.0.0.0:2022
Now it didn’t do it. So we end up with this:
<INFO> 18-Apr-2023::09:51:09.630 u22c_rx29 confd[1186980]: - Starting to listen for NETCONF SSH on 0.0.0.0:2022
<CRIT> 18-Apr-2023::09:51:09.642 u22c_rx29 confd[1186980]: - Cannot bind to NETCONF socket 0.0.0.0:2022 : address already in use (eaddrinuse)
Then confd does not start.
Thanks