Log Watcher: Server Connect Error: Error: websocket error (https://XXX.XX.XX.XX:3013)
Opened this issue · 1 comments
Summary
I have set-up a custom base_app_url
(e.g. https://cronicle.mydomain.com) but still when I run jobs from cronicle UI I get the following Log Watcher: Server Connect Error: Error: websocket error (https://XXX.XX.XX.XX:3013)
error. The error shows an IP address instead of what is configured under my config variable base_app_url.
Steps to reproduce the problem
- Update
base_app_url
with a custom domain - Start cronicle using
/opt/cronicle/bin/control.sh
- Run a job and see the Log Watcher error out.
Your Setup
Server Environment:
- Domain: cronicle.mydomain.com
- Server IP: XXX.XXX.X.XXX
- Firewall: Configured to allow HTTP (port 80) and HTTPS (port 443).
Nginx Configuration:
- Proxying: Nginx proxies traffic to Cronicle on port 3012 with WebSocket support.
- HTTPS: Let’s Encrypt SSL certificates are used for cronicle.mydomain.com, redirecting all HTTP traffic to HTTPS.
Cronicle Configuration:
- base_app_url: Set to https://cronicle.mydomain.com, ensuring URLs in the app and notifications are correct.
- WebSocket and Direct Connect: Configured to use WebSocket transport and indirect connections (web_direct_connect: false) for compatibility with the Nginx reverse proxy.
- Storage: Using default filesystem storage for Cronicle data, with logs and data directories under /opt/cronicle.
Operating system and version?
Ubuntu 24.04 LTS
Node.js version?
v22.4.1
Cronicle software version?
Version 0.9.61
Are you using a multi-server setup, or just a single server?
Single server
Are you using the filesystem as back-end storage, or S3/Couchbase?
filesystem
Can you reproduce the crash consistently?
Yes
Log Excerpts
Log Watcher: Server Connect Error: Error: websocket error (https://XXX.XX.XX.XX:3013)
So sorry about this. Live log watching requires the user's browser to make a direct WebSocket connection to the worker server that is running the job (not the master server).
This doesn't work well for some people with complex network topographies, i.e. situations where the worker servers aren't directly accessible by your users' client machines.
Check out Mike's Cronicle fork over at: https://github.com/cronicle-edge/cronicle-edge
His implementation uses the master server as a proxy for log watching, getting around this problem entirely.
This is also solved in Cronicle v2, coming out in 2025.