Closed legoater closed 7 years ago
Related: openbmc/openbmc#585
all works fine after a restart. Is there an issue in the systemd sequence ?
I would guess missing SO_REUSEADDR
setsockopt
and lingering connections.
netstat -a
would be useful to partially confirm.
I suspect there are two problems here:
The first issue might be solved by systemd socket-activation. The second issue could be solved by either SO_REUSEADDR, as Milton mentioned, or maybe (also?) by reordering the bind(2200) call to be after the connection to obmc-console-client is done.
Same issue or something different? Got this after a power cycle to my system (was seeing other boot issues prior to the power cycle). BarPVT
Sep 20 12:35:35 barreleye systemd[1]: dev-ttyVUART0.device: Job dev-ttyVUART0.device/start timed out.
Sep 20 12:35:35 barreleye systemd[1]: Timed out waiting for device dev-ttyVUART0.device.
Sep 20 12:35:35 barreleye systemd[1]: Dependency failed for Phosphor Console Muxer.
Sep 20 12:35:35 barreleye systemd[1]: obmc-console.service: Job obmc-console.service/start failed with result 'dependency'.
Sep 20 12:35:35 barreleye systemd[1]: dev-ttyVUART0.device: Job dev-ttyVUART0.device/start failed with result 'timeout'.
Got our most recent master on there (as of today - date on BMC is wrong) VERSION_ID="v1.99.0-131-ga81f31c-dirty"
The only way I can reproduce this error (on Palmetto) is doing:
systemctl kill obmc-console@ttyVUART0
Oct 25 06:48:34 palmetto systemd[1]: Closed Phosphor Host Console SSH Per-Connection socket.
Oct 25 06:48:34 palmetto systemd[1]: Stopping Phosphor Host Console SSH Per-Connection socket.
Oct 25 06:48:34 palmetto systemd[1]: obmc-console-ssh.socket: Failed to listen on sockets: Address already in use
Oct 25 06:48:34 palmetto systemd[1]: Failed to listen on Phosphor Host Console SSH Per-Connection socket.
Oct 25 06:48:34 palmetto systemd[1]: obmc-console-ssh.socket: Unit entered failed state.
It looks to me, obmc-console-ssh.socket
does not need to have Requires dependency with obmc-console@.service
,
[Unit]
Description=Phosphor Host Console SSH Per-Connection socket
Conflicts=obmc-console-ssh.service
Requires=obmc-console.service
The dependency should looks like:
obmc-console-ssh.socket (implicit dependency) ---> obmc-console-ssh@.service (Wants) ---> obmc-console@.service
If I remove the Requires directive, or change Requires to Wants, restarting obmc-console server will not restarts obmc-console-ssh.socket, and there will no Failed to listen on sockets: Address already in use
error.
committed a fix here: https://gerrit.openbmc-project.xyz/#/c/893/