[SOLVED] MM 4.3.2 Token request failed


Getting Token request failed error on MM 4.3.2 using Gitlab Omnibus

Steps to reproduce

I am using Gitlab 10.2.2 and MM 4.3.2. Each on separate VM.

Expected behavior

I have MM configured to only allow Sign-In with Gitlab (Gitlab SSO). When I try to sign-in, MM should login directly but instead I see a Token request failed error.

Observed behavior

As I said, I get a Token request failed error. If I click back and I click again on Sign-in with Gitlab, it works as expected. It´s a first time login issue.

The error I get is: [EROR] AuthorizeOAuthUser: Token request failed, Post https://mygitlaburl.com/oauth/token: dial tcp: i/o timeout

I followed the official gitlab onmibus / mattermost installation tutorial to build the server.

And I already have an issue opened in gitlab: https://gitlab.com/gitlab-org/omnibus-gitlab/issues/2984

You can examine the logs on the gitlab issue.

Any help would be greatly appreciated.

Kind regards,

Hi @aitzubi,

Thanks for your feedback,

This issue may be fixed in the latest version of Mattermost but I think you’ll need to wait for GitLab to upgrade to this version?

I have the same issue with MM 4.4.5 and Gitlab 10.2.3 on separate hosts.

Temporary solution for me is to make TokenEndpoint and UserApiEndpoint simple http instead of https in mattermost gitlab config. Though all ssl certificates are valid and trusted on both hosts.

@lindy65 according to @m407 is not fixed by updating to the latest version. How can we debug and fix this?

In our case, both Gitlab and Mattermost are behind a nginx reverse proxy which so far is working perfect with gitlab and MM except for this issue.

Thanks everybody!

Thanks @aitzubi @m407

I’ve asked the team to help troubleshoot this issue and will post feedback here when available.

Hi @aitzubi @m407

Our devs have been trying to troubleshoot this issue on the GitLab forum, so, to prevent duplicate postings, I’ll close this issue off here and we can track it via GitLab forum.