mthenw / frontail

📝 streaming logs to the browser. Sponsored by https://cloudash.dev
https://cloudash.dev
MIT License
1.81k stars 249 forks source link

Random failures while connecting to frontail #253

Closed pmulgaonkar closed 1 year ago

pmulgaonkar commented 1 year ago

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?

pmulgaonkar commented 1 year ago

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.