I am trying to implement a Mattermost instance that connects exclusively to a Gitlab instance for authentication. Both systems are running directly on the same host (not in Docker or via Omnibus). Gitlab’s Rails based server is on port 8080 and Mattermost’s Go based server is available at port 8065 per defaults. Neither port is accessible outside of localhost. Both services are publicly reached via an Apache proxy on domains that use SSL.
I have used the http://127.0.0.1:/ format for both the Mattermost endpoints in the json config file and the Gitlab application callback URL’s.
Accessing Mattermost from the public URL works and displays the site just fine, but the only option is to create a team. Entering a team name produces:
We received an unexpected status code from the server (503)
Strangely submitting the form a second (and any subsequent) time produces a different code:
We received an unexpected status code from the server (502)
These messages are not very useful and it is unclear to me what part of the link is breaking down. Is Mattermost having a hard time reaching the Gitlab API (I am able to do so via curl from that box)? Or is the Gitlab callback not working (again running curl on the URL gives a result from the right service about invalid state as I would expect)?
Where do I troubleshoot from here?