What do you have to do in Gitlab 8.9 OMNIBUS to be able to access your mattermost.yourcompany.com/admin/ url?
- I set up a clean Ubuntu 16 LTS vm. Completely clean and fresh.
- I installed the Gitlab 8.9 omnibus edition.
- I enabled the mattermost integration as per its docs:
I expect that if I open http://mattermost.mycompany.com/ I can see the mattermost page. Instead I get a nginx 502 bad gateway.
Even though this is a clean install, I see the following database upgrade failure message in /var/log/gitlab/mattermost/mattermost.log:
root@cleanvm:/var/log/gitlab/mattermost# cat mattermost.log !!!!Automatic database upgrade failed.!!! If you are upgrading from Mattermost v2 to v3 make sure that you have backed up your database and then in /etc/gitlab/gitlab.rb set: mattermost['db2_backup_created'] = true mattermost['db2_team_name'] = TEAMNAME where TEAMNAME is the name of the default team. Run gitlab-ctl reconfigure again.
Should I follow the notes above anyways? Ie, adding:
mattermost['db2_backup_created'] = true mattermost['db2_team_name'] = TEAMNAME
You know, it would be friendlier to non-ruby-coders to point out that really they would write:
mattermost['db2_backup_created'] = true mattermost['db2_team_name'] = "TEAMNAME"
I did that, and still I have 502 bad gateway.
Did anybody else do a clean 8.9 install and enable mattermost? Does it Just Work or is it Just Broken?
A rather kludgy workaround for me is to manually launch mattermost from a little shell script, in my case I called it run-mattermost.sh, it looks like this:
#!/bin/sh cd /opt/gitlab/embedded/service/mattermost/ sudo -u mattermost /opt/gitlab/embedded/bin/mattermost -config=/var/opt/gitlab/mattermost/config.json
That runs it, and now my bad gateway error is gone. Now I can create my initial team (companyname).
The mattermost logs contain an ugly panic like this:
2016-06-23_16:54:26.85623 panic: runtime error: invalid memory address or nil pointer dereference [recovered] 2016-06-23_16:54:26.85624 panic: interface conversion: interface is runtime.errorString, not string 2016-06-23_16:54:26.85624 [signal 0xb code=0x1 addr=0x0 pc=0x775569] 2016-06-23_16:54:26.85624 2016-06-23_16:54:26.85624 goroutine 1 [running]: 2016-06-23_16:54:26.85624 panic(0xcd1aa0, 0xc820045b00) 2016-06-23_16:54:26.85625 /usr/local/go/src/runtime/panic.go:481 +0x3e6 2016-06-23_16:54:26.85625 main.doLoadConfig.func1(0xc820145d48) 2016-06-23_16:54:26.85625 /var/lib/jenkins/jobs/mattermost-platform-release/workspace/src/github.com/mattermost/platform/mattermost.go:73 +0x6f 2016-06-23_16:54:26.85625 panic(0xccbec0, 0xc820012070) 2016-06-23_16:54:26.85625 /usr/local/go/src/runtime/panic.go:443 +0x4e9 2016-06-23_16:54:26.85625 github.com/mattermost/platform/utils.configureLog(0xc820070c70)
I think to fix that ugly logging error I have to manually change unix file owners:
chown -R mattermost:mattermost /var/log/gitlab/mattermost/
Alternatively I could add mattermost to the git group in /etc/group.