ttyd floods the log with failure messages when it can't bind causing the "Disk full" condition
Author: yurivictCreated Apr 4, 2025Updated May 23, 2026
Labelsbug
Describe the bug When bind fails (for example because of permissions issue) ttyd writes these messages into the log over and over:
Apr 4 14:47:16 yv ttyd[71465]: [2025/04/04 14:47:16:1248] E: [null wsi]: lws_socket_bind: ERROR on binding fd 10 to port 444 (-1 13)
Apr 4 14:47:16 yv ttyd[71465]: [2025/04/04 14:47:16:1249] E: [null wsi]: lws_socket_bind: ERROR on binding fd 10 to port 444 (-1 13)
Apr 4 14:47:16 yv syslogd: last message repeated 1 times
Apr 4 14:47:16 yv ttyd[71465]: [2025/04/04 14:47:16:1250] E: [null wsi]: lws_socket_bind: ERROR on binding fd 10 to port 444 (-1 13)
Apr 4 14:47:16 yv ttyd[71465]: [2025/04/04 14:47:16:1251] E: [null wsi]: lws_socket_bind: ERROR on binding fd 10 to port 444 (-1 13)
Apr 4 14:47:16 yv syslogd: last message repeated 1 times
Apr 4 14:47:16 yv ttyd[71465]: [2025/04/04 14:47:16:1252] E: [null wsi]: lws_socket_bind: ERROR on binding fd 10 to port 444 (-1 13)
Apr 4 14:47:16 yv ttyd[71465]: [2025/04/04 14:47:16:1253] E: [null wsi]: lws_socket_bind: ERROR on binding fd 10 to port 444 (-1 13)
Apr 4 14:47:16 yv ttyd[71465]: [2025/04/04 14:47:16:1254] E: [null wsi]: lws_socket_bind: ERROR on binding fd 10 to port 444 (-1 13)This eventually leads to the disk being full and the server becoming unusable.
The expected behavior is to exit with an error code after the first bind failure.
To Reproduce Obvious.
Environment:
- OS: FreeBSD 14.2
- Browser: not applicable
Source: tsl0922/ttyd