<div dir="ltr"><div dir="ltr">Hello Slawek,<div><br></div><div>Thank you for your message !</div><div><br></div></div><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> Can you confirm that kea & stork agent need to use the same socket ?<br>
<br>
What do you mean that Kea CA and Stork agent use the same socket?<br>
The communication between Kea CA and the Stork agent is done over HTTP. <br>
Stork and Kea CA listen on specific ports. The HTTP libraries open some <br>
sockets on demand under the hood, but they shouldn't cause any collisions.<br>
<br>
The sockets are also used to establish a connection from Kea CA to Kea <br>
DHCP daemons.<br></blockquote><div><br></div><div>As we thought this was a mistake, we wanted to ensure that the "control-sockets" section needs to be included twice (in kea-ctrl-agent.conf & in kea-dhcp4.conf). <br>According to your answer, this must indeed be the case and we also noticed issues if we remove it from one file or the other.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> Also, even if the communication with each component seems to work well,<br>
> can you confirm which ports should be used by each component (kea<br>
> control agent, stork agent, ...) ?<br>
<br>
Kea CA listens on port 8000 by default. It is configurable in <br>
`kea-ctrl-agent.conf` file in the "http-port" property.<br>
<br>
Stork agent listens on port 8080 (CLI argument "--port") and 9547 (CLI <br>
argument "--prometheus-kea-exporter-port") and 9119 (CLI argument <br>
"--prometheus-bind9-exporter-port").<br>
<br></blockquote><div><br></div><div>Thank you ! </div><div>The only difference is that we use port 8001 for KEA CA.</div><div>Stork agent listens on port 8080.</div><div>We don't use prometheus.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I suppose some sockets used during the HTTP connection are not correctly <br>
closed on FreeBSD. It may be a bug in an HTTP library, or BSD-like <br>
systems may require additional steps to close connection or specific <br>
permissions to manage sockets fully.<br>
Another possibility is that the Stork HTTP library improperly closes the <br>
HTTP connection, and the problem exists only on FreeBSD because it has a <br>
more strict network stack.<br>
<br>
I think the problem may not be related to Stork itself but to the usage <br>
of Kea RestAPI. I haven't checked it yet, but any request to this API <br>
will probably generate a similar error message.<br>
<br>
But I need to confirm it first. You can try to do it on your own if you <br>
like.<br></blockquote><div><br></div><div>Thank you for pointing this out.</div><div>Please find below the output from stork agent & kea that seems to end with COMMAND_SOCKET_CONNECTION_SHUTDOWN_FAIL error.</div><div><br></div><div>* Stork Agent indicates this :</div><div><br></div><div><font face="monospace" size="1">INFO[2025-03-07 14:48:28] agent.go:104 Loaded server cert<br>INFO[2025-03-07 14:48:33] agent.go:104 Loaded server cert<br>INFO[2025-03-07 14:48:40] agent.go:104 Loaded server cert</font></div><div><br></div><div>* Kea logs show this : </div><div><br></div><div><font face="monospace" size="1">==> /var/log/kea/kea-ctrl-agent.log <==</font></div><div><font face="monospace" size="1">2025-03-07 14:48:36.315 INFO [kea-ctrl-agent.commands/54011.0x3faff6612000] COMMAND_RECEIVED Received command 'version-get'<br>2025-03-07 14:48:36.315 INFO [kea-ctrl-agent.ctrl-agent/54011.0x3faff6612000] CTRL_AGENT_COMMAND_RECEIVED command version-get received from remote address 10.x.x.x<br>2025-03-07 14:48:36.316 INFO [kea-ctrl-agent.ctrl-agent/54011.0x3faff6612000] CTRL_AGENT_COMMAND_FORWARDED command version-get successfully forwarded to the service dhcp4 from remote address </font><span style="font-family:monospace;font-size:x-small">10.x.x.x</span><font face="monospace" size="1"><br>2025-03-07 14:48:36.317 INFO [kea-ctrl-agent.commands/54011.0x3faff6612000] COMMAND_RECEIVED Received command 'config-get'<br>2025-03-07 14:48:36.317 INFO [kea-ctrl-agent.ctrl-agent/54011.0x3faff6612000] CTRL_AGENT_COMMAND_RECEIVED command config-get received from remote address </font><span style="font-family:monospace;font-size:x-small">10.x.x.x</span><font face="monospace" size="1"><br>2025-03-07 14:48:36.318 INFO [kea-ctrl-agent.commands/54011.0x3faff6612000] COMMAND_RECEIVED Received command 'config-get'<br>2025-03-07 14:48:36.318 INFO [kea-ctrl-agent.ctrl-agent/54011.0x3faff6612000] CTRL_AGENT_COMMAND_RECEIVED command config-get received from remote address </font><span style="font-family:monospace;font-size:x-small">10.x.x.x</span><font face="monospace" size="1"><br><br>==> /var/log/kea/kea-dhcp4.log <==<br>2025-03-07 14:48:36.315 INFO [kea-dhcp4.commands/53999.0x152893e12000] COMMAND_RECEIVED Received command 'version-get'<br>2025-03-07 14:48:36.318 INFO [kea-dhcp4.commands/53999.0x152893e12000] COMMAND_RECEIVED Received command 'config-get'<br><br>==> /var/log/kea/kea-ctrl-agent.log <==<br>2025-03-07 14:48:36.503 INFO [kea-ctrl-agent.ctrl-agent/54011.0x3faff6612000] CTRL_AGENT_COMMAND_FORWARDED command config-get successfully forwarded to the service dhcp4 from remote address </font><span style="font-family:monospace;font-size:x-small">10.x.x.x</span><font face="monospace" size="1"><br><br>==> /var/log/kea/kea-dhcp4.log <==<br>2025-03-07 14:48:36.528 ERROR [kea-dhcp4.commands/53999.0x152893e12000] COMMAND_SOCKET_CONNECTION_SHUTDOWN_FAIL Encountered error Socket is not connected while trying to gracefully shutdown socket</font></div><div><br></div><div>I stay at your disposal if you need further information.</div><div>Thank you again for your help on that topic !</div><div><br></div><div>Best regards.</div><div> </div></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><br><table width="320" cellspacing="0" cellpadding="0" style="font-size:12.8px;font-family:Times;margin:0px;padding:0px"><tbody><tr><td width="100" style="width:100px;padding:0px"><img src="cid:ii_15f531873412908f" alt="Inline-Bild 1" width="100" height="100"><br></td><td width="10" style="width:10px"> </td><td valign="top" style="padding:0px"><br><table cellspacing="0" cellpadding="0" style="padding:0px;margin:0px;font-family:"Lucida Grande",sans-serif;font-size:12px;color:rgb(176,176,176);border-collapse:collapse"><tbody><tr style="margin:0px;padding:0px"><td style="padding:0px;white-space:nowrap"><strong><a href="mailto:snauer@hotcity.lu" style="color:rgb(17,85,204);border:none" target="_blank"><span style="color:rgb(3,54,108)">Sébastien NAUER</span></a></strong><span style="color:rgb(224,224,224)">|</span> <span style="color:rgb(85,85,85)">Technical Manager</span></td></tr><tr style="margin:0px;padding:0px;color:rgb(176,164,155)"><td style="padding:0px;white-space:nowrap"><a href="http://goo.gl/maps/GqQcf" style="color:rgb(176,176,176);border:none" target="_blank">11, Avenue Guillaume <span style="color:rgb(224,224,224)">|</span> L-1651 Luxembourg</a></td></tr><tr style="margin:0px;padding:0px;color:rgb(176,164,155)"><td style="font-family:"Lucida Grande",sans-serif;padding:0px;white-space:nowrap"><a style="color:rgb(176,176,176)">Phone: <span style="color:rgb(192,192,192)">(+352)</span> 2663 2660 </a><span style="color:rgb(224,224,224)">|</span> <a style="color:rgb(176,176,176)">Fax: <span style="color:rgb(192,192,192)">(+352)</span> 2663 2665</a></td></tr><tr style="margin:0px;padding:0px;color:rgb(176,164,155)"><td style="font-family:"Lucida Grande",sans-serif;padding:0px;white-space:nowrap"><a href="https://www.facebook.com/hotcity.lu" style="color:rgb(192,192,192);border:none" target="_blank">Facebook</a> <span style="color:rgb(224,224,224)">|</span> <a href="https://twitter.com/hotcity_wifi" style="color:rgb(192,192,192);border:none" target="_blank">Twitter</a></td></tr></tbody></table></td></tr></tbody></table></div></div></div></div></div></div>