Mattermost, Inc.

Nginx down after installing Mattermost with GitLab CE on Windows Azure

Hi Folks

I recently discovered Gitlab CE and Mattermost and wanted to give it a try within my organisation. All my servers run on Windows Azure right now and so I went ahead and started a new virtual machine with a ready-made Gitlab CE image.

The new machine runs absolutely fine and I was able to add users, create groups and projects. Worked like a charm. For Gitlab I was using:

external_url 'http://dev.mydomain.com'

(Edit: this was actually a long random url created by Azure and I had to change it to this value for everything to work)

Next step for me was to setup Mattermost. I read the documentation and went ahead to edit /etc/gitlab/gitlab.rb

I only set:
mattermost_external_url 'http://chatter.mydomain.com'

These are the only two active lines in my gitlab.rb

Now when I run sudo gitlab-ctl reconfigure, after a huge block of text, I see the following success message:

Running handlers: Running handlers complete Chef Client finished, 5/292 resources updated in 08 seconds gitlab Reconfigured!

Now, when I try to access both my sites: dev.mydomain.com and chatter.mydomain.com, I get a 521 error.

I get the following status for Gitlab on the server:

devlab:~$ sudo gitlab-ctl status run: gitlab-workhorse: (pid 33034) 1424s; run: log: (pid 1253) 18293s run: logrotate: (pid 33043) 1423s; run: log: (pid 1255) 18293s run: mattermost: (pid 33049) 1423s; run: log: (pid 29284) 2434s down: nginx: 0s, normally up, want up; run: log: (pid 1278) 18293s run: postgresql: (pid 33163) 1389s; run: log: (pid 1282) 18293s run: redis: (pid 33137) 1392s; run: log: (pid 1251) 18293s run: sidekiq: (pid 33146) 1390s; run: log: (pid 1284) 18293s run: unicorn: (pid 33172) 1389s; run: log: (pid 1261) 18293s

I can see that nginx is down, and I am completely clueless how to get it up.
What am I doing wrong?

It turns out I had Azure to blame for my troubles. When Azure installed Gitlab, they had created a random long url which worked for their internal network feature. Once I changed it to http://dev.mydomain.com, it worked out fine.

Now I have Mattermost up and running. But there is a new problem. Instead of speaking to my gitlab at dev.mydomain.com, Mattermost is speaking to it at the older long url created by Azure.

I cant seem to find any place in the configuration where I can change that.
Time to read more documentation.

~_~

Hi @kinshuk,

It’s possible you need to update the Callback URLs for the Application entry of Mattermost inside your GitLab instance.

Can you try:

  1. Logging into your GitLab instance as the admin
  2. Going to the Admin area -> Applications
  3. Then click Edit on GitLab-Mattermost
  4. Update the Callback URLs to your new domain/URL
  5. Save the changes

Then try to use Mattermost with GitLab again.