[stork-users] COMMAND_SOCKET_CONNECTION_SHUTDOWN_FAIL
Sébastien Nauer
snauer at hotcity.lu
Fri Mar 7 14:01:57 UTC 2025
Hello Slawek,
Thank you for your message !
> Can you confirm that kea & stork agent need to use the same socket ?
>
> What do you mean that Kea CA and Stork agent use the same socket?
> The communication between Kea CA and the Stork agent is done over HTTP.
> Stork and Kea CA listen on specific ports. The HTTP libraries open some
> sockets on demand under the hood, but they shouldn't cause any collisions.
>
> The sockets are also used to establish a connection from Kea CA to Kea
> DHCP daemons.
>
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).
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.
> > Also, even if the communication with each component seems to work well,
> > can you confirm which ports should be used by each component (kea
> > control agent, stork agent, ...) ?
>
> Kea CA listens on port 8000 by default. It is configurable in
> `kea-ctrl-agent.conf` file in the "http-port" property.
>
> Stork agent listens on port 8080 (CLI argument "--port") and 9547 (CLI
> argument "--prometheus-kea-exporter-port") and 9119 (CLI argument
> "--prometheus-bind9-exporter-port").
>
>
Thank you !
The only difference is that we use port 8001 for KEA CA.
Stork agent listens on port 8080.
We don't use prometheus.
> I suppose some sockets used during the HTTP connection are not correctly
> closed on FreeBSD. It may be a bug in an HTTP library, or BSD-like
> systems may require additional steps to close connection or specific
> permissions to manage sockets fully.
> Another possibility is that the Stork HTTP library improperly closes the
> HTTP connection, and the problem exists only on FreeBSD because it has a
> more strict network stack.
>
> I think the problem may not be related to Stork itself but to the usage
> of Kea RestAPI. I haven't checked it yet, but any request to this API
> will probably generate a similar error message.
>
> But I need to confirm it first. You can try to do it on your own if you
> like.
>
Thank you for pointing this out.
Please find below the output from stork agent & kea that seems to end
with COMMAND_SOCKET_CONNECTION_SHUTDOWN_FAIL error.
* Stork Agent indicates this :
INFO[2025-03-07 14:48:28] agent.go:104 Loaded server cert
INFO[2025-03-07 14:48:33] agent.go:104 Loaded server cert
INFO[2025-03-07 14:48:40] agent.go:104 Loaded server cert
* Kea logs show this :
==> /var/log/kea/kea-ctrl-agent.log <==
2025-03-07 14:48:36.315 INFO
[kea-ctrl-agent.commands/54011.0x3faff6612000] COMMAND_RECEIVED Received
command 'version-get'
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
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 10.x.x.x
2025-03-07 14:48:36.317 INFO
[kea-ctrl-agent.commands/54011.0x3faff6612000] COMMAND_RECEIVED Received
command 'config-get'
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
10.x.x.x
2025-03-07 14:48:36.318 INFO
[kea-ctrl-agent.commands/54011.0x3faff6612000] COMMAND_RECEIVED Received
command 'config-get'
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
10.x.x.x
==> /var/log/kea/kea-dhcp4.log <==
2025-03-07 14:48:36.315 INFO [kea-dhcp4.commands/53999.0x152893e12000]
COMMAND_RECEIVED Received command 'version-get'
2025-03-07 14:48:36.318 INFO [kea-dhcp4.commands/53999.0x152893e12000]
COMMAND_RECEIVED Received command 'config-get'
==> /var/log/kea/kea-ctrl-agent.log <==
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 10.x.x.x
==> /var/log/kea/kea-dhcp4.log <==
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
I stay at your disposal if you need further information.
Thank you again for your help on that topic !
Best regards.
--
[image: Inline-Bild 1]
*Sébastien NAUER <snauer at hotcity.lu>*| Technical Manager
11, Avenue Guillaume | L-1651 Luxembourg <http://goo.gl/maps/GqQcf>
Phone: (+352) 2663 2660 | Fax: (+352) 2663 2665
Facebook <https://www.facebook.com/hotcity.lu> | Twitter
<https://twitter.com/hotcity_wifi>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/stork-users/attachments/20250307/60ce6542/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Logo_signature.png
Type: image/png
Size: 6124 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/stork-users/attachments/20250307/60ce6542/attachment.png>
More information about the Stork-users
mailing list