Server unreachable but massages still working...halfly

Hello!

I have a little problem with updates of messages.

The Server ist installed on Ubuntu 22.04.03 via Omnibus and is working on 9.3.0.

Yesterday I updated the Server and in the morning but I noticed that Mattermost doesnt work properly anymore.

I wrote to a colleague at work this morning, who replied quickly, but I noticed that the message was delivered directly to my smartphone and I also received a push notification. In the browser and client, I could only see the new message after I refreshed the page or switched the chat to someone else and back again. It works in principle, but I don’t receive the messages directly.
On the smartphone, the browser and in the client it shows me the following text: “Please check connection, Mattermost unreachable. If issue persists, ask administrator to check WebSocket port.”

If anyone has any idea how to fix this quickly, I would be very grateful. Which logs are required?

Thankfully
Christopher

The log shows:

{
“caller”: “web/context.go:111”,
“err_where”: “connect”,
“error”: “connect: Failed to upgrade websocket connection., websocket: request origin not allowed by Upgrader.CheckOrigin”,
“http_code”: 400,
“ip_addr”: “10.8.10.254”,
“level”: “debug”,
“method”: “GET”,
“msg”: “Failed to upgrade websocket connection.”,
“path”: “/api/v4/websocket”,
“request_id”: “9gxirrsoijbh7qa77zqonx4sty”,
“timestamp”: “2024-01-09 01:50:26.767 Z”,
“user_id”: “kg4w3fbajpd1pxxzcaks98tz8w”
}

Hello Christopher,

Thank you for reaching out to the Mattermost community. We are sorry for the inconvenience that you’ve been facing.

The issue you’re experiencing seems to be related to the WebSocket connection. Upon reviewing the logs you’ve provided, it appears there’s an issue with upgrading the WebSocket connection. This is causing your browser and client apps to not update in real-time, and as instead, they’re requiring manual refreshes. On the other hand, your smartphone app seems to receive push notifications, which work separately from WebSocket connections.

Based on your error log, it seems like the origin of the requests might not be allowed as per the current configuration (websocket: request origin not allowed by Upgrader.CheckOrigin). To resolve this, you would need to check the settings related to allowing WebSocket connections, particularly those pertaining to “allowed origins”.

Depending on your setup, this may be due to some sort of reverse-proxy or firewall setting that is blocking or failing to correctly route the WebSocket connections. If you’re using NGINX, Apache, or a similar service as a reverse proxy, make sure that they are correctly configured for WebSocket support.

Please also ensure that Mattermost is correctly configured to allow WebSocket connections. You can typically find this under “Connections” in the Mattermost system console.

Without a deeper understanding of your setup, it’s hard to provide a more specific solution. However, I believe the above suggestions ought to provide a good starting point.

For further assistance, you might find helpful information in our troubleshooting WebSocket connections guidance, or you may prefer to provide logs from your server, details about your specific setup, and details about any reverse proxy or firewall services you might be using.

I hope this helps. Please do not hesitate to reach out if you have any more questions or if further clarification is needed.

Best regards,
~Mattermost AI Assistant :robot:

[Disclaimer: This was an AI assisted response powered by Mattermost AI. Were any of the above suggestions inaccurate? Let us know by replying to this comment!]