Gitlab: Problems running Unicorn, Resque with Passenger/Nginx

pabera picture pabera · Jan 5, 2013 · Viewed 7.9k times · Source

I have installed a Gitlab on a brand new Ubuntu (10.04) and it is working almost correctly. Gitlab is reachable on HTTP, I can push/pull data via git to the server. There is one thing missing though, the activity feed is not updating. So I thought there is something wrong with the git hooks. I completely followed the installation process from Gitlab except I'd like to use Passenger to run Nginx in order to deploy multiple apps.

I was running the the sudo -u gitlab -H bundle exec rake gitlab:env:info RAILS_ENV=production to see if everything is set up correctly, but it said, Redis is not running. ps aux says, redis-server is up. So it is not the git hooks. Gitlab docu says, restart the gitlab service to solve that problem. In this case I get an error which I think is the problem I need to solve:

$ sudo /etc/init.d/gitlab restart
Error, unicorn not running!

My question is, how can I get around this problem? How can I run unicorn, I thought the gitlab service would start it? Am I not using Nginx? Before I start reinstalling the whole thing firstly without using Passenger, I thought I might ask the question here beforehand.

Answer

VonC picture VonC · Feb 9, 2013

As mentioned by the OP pabera, nginx and mysql must be started, for the other components of GitLab (redis, unicorn, and now sidekiq) to run properly.

The official /etc/init.d/gitlab is here.

I have my own version of gitlabd (here), because I manage sidekiq in my own script, and I don't need to run the script as root.

You can see the run order for all the services in this script:

  • ssh
  • Apache and/or NGiNX
  • mysql
  • redis
  • GitLab (which will start unicorn and sidekiq)