jhuckaby / Cronicle

A simple, distributed task scheduler and runner with a web based UI.
http://cronicle.net
Other
3.65k stars 380 forks source link

Log Watcher: Server Connect Error - using SSL and autosigned certificate #638

Open sdupuy opened 11 months ago

sdupuy commented 11 months ago

Summary

error in the Log Watcher: Server Connect Error: Error: websocket error (https://1.2.3.4:443)

Steps to reproduce the problem

Web UI at this URL https://cronicle with an autosigned certificate which means a message "accept the risk and continue" (NET::ERR_CERT_AUTHORITY_INVALID) each first time you connect to it.

When running a job, in the "live job event log" panel, we get the error : Log Watcher: Server Connect Error: Error: websocket error (https://1.2.3.4:443)

We get this error because we have to "accept the risk and continue" (NET::ERR_CERT_AUTHORITY_INVALID) at least once for the URL https://1.2.3.4 Once accepted the certificate warning for https://1.2.3.4, we refresh the web UI at https://cronicle and the error is gone. Log Watcher: Connecting to server: https://1.2.3.4:443... Log Watcher: Connected successfully!

I believe that if log watcher could use the website base URL instead of the host IP (here cronicle and not 1.2.3.4), we would not have this error.

I believe also that we would have the same error with a valide SSL certificate for URL "cronicle" (without putting in the SAN the hostname or/and the IP, which is not what we do usually).

I have tried to set the "web_socket_use_hostnames" parameter to true, but it get the hostname instead of the website base URL.

Your Setup

Version 0.9.30

Operating system and version?

debian 11.7

Node.js version?

Node.js v20.6.1

Cronicle software version?

Version 0.9.30

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?

nope

Can you reproduce the crash consistently?

yes

Log Excerpts

sdupuy commented 11 months ago

let me know if I missed something in your doc.

web_direct_connect is set to false, so I am assuming every request should directed to https://cronicle and https://1.2.3.4 or https://myhostname.