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
4.12k stars 552 forks source link

Unable to connect web socket,click to reconnect #5612

Open Acsriot94 opened 10 months ago

Acsriot94 commented 10 months ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Start Mesh Central
  2. Attempt To Login
  3. Get "Unable to connect to Web Socket"

Expected behavior Logs into the Control GUI

Screenshots If applicable, add screenshots to help explain your problem.

Server Software (please complete the following information):

Client Device (please complete the following information):

Remote Device (please complete the following information):

I am still figuring out how to generate this Your config.json file**



[meshcentral_meshcentral-mongodb-7b5dc76996-6hbv6_meshcentral-mongodb.log](https://github.com/Ylianst/MeshCentral/files/13559206/meshcentral_meshcentral-mongodb-7b5dc76996-6hbv6_meshcentral-mongodb.log)
[meshcentral_meshcentral-785bdb9f7b-lwtjb_meshcentral.log](https://github.com/Ylianst/MeshCentral/files/13559207/meshcentral_meshcentral-785bdb9f7b-lwtjb_meshcentral.log)
NiceGuyIT commented 10 months ago

You purposefully removed the bug report template that asks for information needed to troubleshoot. Why?

Acsriot94 commented 10 months ago

Updated, sorry very new to Github!

NiceGuyIT commented 10 months ago

Your meshcentral log doesn't show any connections. Your mongodb log has the following error: Client sent an HTTP request over a native MongoDB connection. It would seem that external connections are trying to connect to MongoDB, not MeshCentral.

2023-12-04T22:17:08.982917771Z {"t":{"$date":"2023-12-04T22:17:08.982+00:00"},"s":"I", "c":"NETWORK", "id":22988, "ctx":"conn90","msg":"Error receiving request from client. Ending connection from remote","attr":{"error":{"code":17,"codeName":"ProtocolError","errmsg":"Client sent an HTTP request over a native MongoDB connection"},"remote":"172.16.0.1:53478","connectionId":90}}

Note: You should not put your logs in a code block. How you had the logs before was good. I.e. remove the code block but keep the links.

Acsriot94 commented 10 months ago

What would that have somting to do with Reverse proxy?

NiceGuyIT commented 10 months ago

Yes. HTTP requests are going to Mongo, not the application. Look at your reverse proxy configuration. Verify your ports are pointing to the right service.

KellyDi0te commented 10 months ago

I have the same error when I use NGINX reverse-proxy : Let's use the following DNS names :

I just finished yesterday the configuration of load-balancing. Now, when I try to use dns-meshcentral.mydomain to be redirected to 1 of the 3 servers, I have the error "Unable to connect to Web Socket, click to reconnect" When I go directly into one of the 3 servers (e.g : dns-meshcentral1.mydomain), I have no problem to connect.

I hope this gives you an idea of where to go and what to do.

si458 commented 10 months ago

@KellyDi0te you need to share your nginx config and also your meshcentral config otherwise how can we help?

Acsriot94 commented 9 months ago

is there any direction y'all can point me in ? I don't see any place to configure Traefik with MeshCentral

NiceGuyIT commented 9 months ago

@hansolo199532 Are you getting the same error as originally posted? If not, what is the new error?