Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
3.9k stars 529 forks source link

Websocket error when behind Cloudflare proxy #3327

Closed santo74 closed 1 month ago

santo74 commented 2 years ago

I set up MeshCentral on an Ubuntu 20.04 LTS server and everything is working fine, including let's encrypt.

However, when I enable the proxy (orange cloud) in Cloudflare for the subdomain where MeshCentral is running, then I get the following error message after login:

image

When I disable the proxy again, everything is back to normal. I experimented with the SSL settings in Cloudflare ("full" vs "strict"), but that doesn't make any difference.

FYI: I have several other websocket-enabled applications running behind Cloudflare (other domains) without any issues.

Btw, I would like to take this opportunity to thank you so much for this wonderful software!

Ylianst commented 2 years ago

I don't have a lot of experience with CloudFlare, but I did try it and it worked for me. Can you open the browser console and see if there are any errors showing? Here is my console for FireFox.

image

Also (if possible) can you go in "My Server" / "Trace" tab, enable "Web Server Requests" tracing and in a different browser, try to access thru Cloudflare.

image

In both cases, look for access to "control.ashx". See if it's being requested.

Thanks, Ylian

santo74 commented 2 years ago

In the browser console I don't see anything special. There are no errors and the request to control.ashx is performed correctly as far as I can see.

image

I managed to set up port forwarding in order to access the server tracing while triggering a normal login via Cloudflare and this is the result:

image

Guy

drnikcuk commented 2 years ago

I am having the same problem, but without cloudflare in the mix !

si458 commented 1 month ago

closing as stale, please try the latest version of meshcentral, and try again, if your issue still happens, then please reply back and open the issue again