You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
os/v3/puppy: 1bit-webapp-proxy dies on a port that is already bound, with a bare traceback (the chat page is not served) #958
Reported by pi-release after both the c19 and the c20 board boots, unchanged:
1bit-webapp-proxy: serving /opt/1bit/webapp on 127.0.0.1:8080, /api/ -> 127.0.0.1:13305 (no API key in /etc/1bit/lemond.conf)
File "/usr/local/bin/1bit-webapp-proxy", line 142, in main
srv = ThreadingHTTPServer(("127.0.0.1", PORT), Handler)
OSError: [Errno 98] Address already in use
So on that medium the API on :13305 works and the 1bit chat page on :8080 is not served. The log shows one instance printing its serving line and a second one dying, so the port is held by a second copy of the proxy (two starts inside the same boot); the traceback says neither which process holds it nor that the page is in fact already being served, and a booting stick cannot be ssh'd into to look.
Fix: bind-or-explain. Retry the bind briefly (the loser of a double start should not shout), and on the final failure read /proc/net/tcp (the LISTEN socket's inode) plus /proc/*/fd to name the holder and its cmdline in one line. If the holder is another instance of this proxy, say so and exit 0 - the page is served, only the second copy stops.
Activity