[Solved] MM client cannot connect to local MM server, browser works

Just installed the latest versions of the client (5.11.2) and the Ubuntu apt version of the server (10.7.9)

The server is running as http://localhost:8065 and going there with a browser allowed me to create a user and log in.

When running the client I get asked for the server URL where I specify http://localhost:8065 and a name but the client complains that it is unable to connect.

The console log of the client shows these messages:

(node:2041689) electron: Failed to load URL: http://localhost/ with error: ERR_CONNECTION_REFUSED
16:45:52.224 › [MattermostWebCont...] [localhost:8065] [TAB_MESSAGING] failed loading http://localhost/: Error: ERR_CONNECTION_REFUSED (-102) loading 'http://localhost/', retrying in 5 seconds
16:45:52.274 › [WebContentsEventM...] [renderer] com.mattermost.calls: TypeError: Failed to fetch
(node:2041689) electron: Failed to load URL: http://localhost/ with error: ERR_CONNECTION_REFUSED
16:45:57.245 › [MattermostWebCont...] [localhost:8065] [TAB_MESSAGING] failed loading http://localhost/: Error: ERR_CONNECTION_REFUSED (-102) loading 'http://localhost/', retrying in 5 seconds
(node:2041689) electron: Failed to load URL: http://localhost/ with error: ERR_CONNECTION_REFUSED
16:46:02.267 › [MattermostWebCont...] [localhost:8065] [TAB_MESSAGING] failed loading http://localhost/: Error: ERR_CONNECTION_REFUSED (-102) loading 'http://localhost/', retrying in 5 seconds
(node:2041689) electron: Failed to load URL: http://localhost/ with error: ERR_CONNECTION_REFUSED
16:46:07.279 › [MattermostWebCont...] [localhost:8065] [TAB_MESSAGING] failed loading http://localhost/: Error: ERR_CONNECTION_REFUSED (-102) loading 'http://localhost/', retrying in 5 seconds
(node:2041689) electron: Failed to load URL: http://localhost/ with error: ERR_CONNECTION_REFUSED

In the client GUI the following error messages are shown:

We're having trouble connecting to this Mattermost server. We'll keep trying to establish a connection.
If refreshing this page (Ctrl+R or Command+R) doesn't help, please check the following:
Ensure your computer is connected to the internet.
Verify that the URL http://localhost/ is correct.
Try opening http://localhost/ in a browser window.

This is weird, why would the client not work just as fine as access with the browser?
Also, why does the client often show http://localhost/ and leave out the port number?

Can you share a screenshot of your configured mm server in the desktop client?

That is odd! Can you reproduce that with 5.11.1?

Sorry, embarrassingly I might have messed up filling out the original dialog: when I re-edited the settings the server name had the port included (quite unnecessarily) but the server address field not.
Please excuse the noise …

2 Likes

No worries at all! Glad to hear you got it figured out, Johann! :slight_smile: