Hello,
Gitlab Mattermost is giving us the following error:
Please check connection, Mattermost unreachable. If issue persists, ask administrator to check WebSocket port.
And Gitlab logs show the following:
==> /var/log/gitlab/mattermost/mattermost.log <==
[2017/10/13 04:40:49 UTC] [EROR] /api/v4/websocket:connect code=500 rid=ycji7i9ht7838fk4hkpb5nbtdw uid=8z1d45uhotnuifu5pqb93gp5ca ip=10.96.2.86 Failed to upgrade websocket connection [details: ]
[2017/10/13 04:42:04 UTC] [EROR] websocket connect err: websocket: 'Origin' header value not allowed
==> /var/log/gitlab/mattermost/current <==
2017-10-13_04:42:04.62615 ip-10-96-15-151 mattermost: 2017/10/13 04:42:04 http: multiple response.WriteHeader calls
2017-10-13_04:42:04.62622 ip-10-96-15-151 mattermost: [2017/10/13 04:42:04 UTC] [EROR] websocket connect err: websocket: 'Origin' header value not allowed
2017-10-13_04:42:04.62625 ip-10-96-15-151 mattermost: [2017/10/13 04:42:04 UTC] [EROR] /api/v4/websocket:connect code=500 rid=dczoyarprjdnxreigi5tj4tr7a uid=8z1d45uhotnuifu5pqb93gp5ca ip=10.96.2.86 Failed to upgrade websocket connection [details: ]
It’s behind an ELB with the following configs and the SSL is terminating there (followed this advice).
ELB listeners are as follows:
(I added the 8065 part just for testing).
Here’s my mattermost configs in gitlab.rb
that’s relevant for this issue:
mattermost_external_url 'https://chat.company.com'
mattermost['enable'] = true
mattermost['service_address'] = "127.0.0.1"
mattermost['service_port'] = "8065"
mattermost_nginx['enable'] = true
mattermost_nginx['listen_port'] = 1234
mattermost_nginx['listen_https'] = false
mattermost_nginx['proxy_set_headers'] = {
"Host" => "$http_host",
"X-Real-IP" => "$remote_addr",
"X-Forwarded-For" => "$proxy_add_x_forwarded_for",
"X-Frame-Options" => "SAMEORIGIN",
"X-Forwarded-Proto" => "https",
"X-Forwarded-Ssl" => "on",
"Upgrade" => "$http_upgrade",
"Connection" => "$connection_upgrade"
}
How can I get rid of this issue? What am I doing wrong here?
Thanks,
EDIT: We are on Gitlab Mattermost (version 4.2). Also, opened a ticket in Gitlab but they asked me to come and ask for help here.