Clean install of Gitlab 8.9 (not upgrade), enable Mattermost, Bad Gateway

It looks like a permissions issue on the mattermost log file. Steps to make it work

Gitlab on a clean machine

  1. sudo vi /etc/gitlab/gitlab.rb
  2. setup and uncomment mattermost_external_url
  3. Notice: I didn’t need to add the following for a clean install
mattermost['db2_backup_created'] = true
mattermost['db2_team_name'] = 'TEAMNAME'
  1. sudo gitlab-ctl reconfigure
  2. notice all the files in /var/log/gitlab/mattermost/ are the root owner
  3. sudo chown -R mattermost:mattermost /var/log/gitlab/mattermost/
  4. comment out mattermost_external_url
  5. sudo gitlab-ctl reconfigure
  6. uncomment out mattermost_external_url
  7. sudo gitlab-ctl reconfigure

Service should be running now.

You can verify mattermost is installed correctly with

sudo -u mattermost -i bash
cd /opt/gitlab/embedded/service/mattermost
/opt/gitlab/embedded/bin/mattermost -config='/var/opt/gitlab/mattermost/config.json' -version
2 Likes