mthenw/frontail

Random failures while connecting to frontail

pmulgaonkar opened this issue · 1 comments

Have frontail configured as per instructions behind nginx. But I randomly (about 50%) get errors connecting. Nginx error log says:
2023/03/29 22:32:52 [error] 183900#0: *52 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.25, server: 192.168.1.37, request: "GET /frontail/socket.io/?EIO=3&transport=websocket HTTP/1.1", upstream: "http://127.0.0.1:9001/frontail/socket.io/?EIO=3&transport=websocket", host: "192.168.1.37

Cannot figure out why this works sometimes not at other times. Any tips?

Found the cause (I think). In case this is useful to someone else in the future:
Frontail needs a few seconds to initialize it's listener. I was starting the frontail server and then immediately trying to connect to it. A 5 second delay solved the issue.