Hello,
I have installed mattermost as a separate server on its own virtual machine on docker on Ubuntu 18.04. I’m running nginx 1.17 alpine, mattermost database (postgresql) and the mattermost application itself.
On another virtual machine I have gitlab installed. The point is the configure SSO with gitlab, so that I can use LDAP with mattermost Team Edition. I haven’t been able to do so, though, because I keep getting this error:
{"level":"error","ts":1564185931.9620516,"caller":"api4/oauth.go:493","msg":"AuthorizeOAuthUser: Token request failed, Post https://gitlab.example.com/oauth/token: dial tcp: i/o timeout"}
I’m configured gitlab with https, I’ve added a new application in gitlab, copied all the necessary information in the Gitlab section under System Control in mattermost, but I still get this.
Under special circumstances which I haven’t really been able to determine, it sometimes does work after refreshing the mattermost page, despite the “Token request failed” error.
I think it might have worked when I configured gitlab with http only. But the error was still there nonetheless, so the problem sticks, so I doubt it’s actually related to TLS.
Any ideas what is happening? The gitlab server is reachable, I can ping, curl etc., but the POST request seems problematic.
This is my gitlab configuration:
external_url 'https://repos.example.com'
gitlab_rails['ldap_enabled'] = true
gitlab_rails['ldap_servers'] = YAML.load <<-EOS
main: # 'main' is the GitLab 'provider ID' of this LDAP server
label: 'LDAP'
host: 'atene-dc01.atene.local'
port: 636
uid: 'sAMAccountName'
bind_dn: 'cn=gitlab-user,ou=Company-Dienstkonten,dc=domaincontroller,dc=local'
password: '5}#HSZ,7kq-DQI4Ms23?'
encryption: 'simple_tls' # "start_tls" or "simple_tls" or "plain"
verify_certificates: true
active_directory: true
lowercase_usernames: true
base: 'ou=Aktive User,ou=atene,dc=domaincontroller,dc=local'
user_filter: ''
EOS
unicorn['enable'] = true
unicorn['worker_timeout'] = 60
unicorn['worker_processes'] = 2
nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/gitlab/ssl/#{node['fqdn']}.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/#{node['fqdn']}.key"
nginx['ssl_ciphers'] = "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256"
nginx['ssl_prefer_server_ciphers'] = "on"
nginx['ssl_protocols'] = "TLSv1.2"
nginx['gzip_enabled'] = false
letsencrypt['enable'] = false
As you can see, I haven’t configured anything related to mattermost here, because, as I understand, this is related only to the omnibus gitlab mattermost that comes preinstalled with gitlab, as far as I understand.