Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"GitLab is not responding." 502 on Ubuntu 14.04 after starting server

Tags:

ubuntu

gitlab

I have just installed GitLab on a fresh Ubuntu 14.04 64 bit server. I did so using the Omnibus package as indicated in the download page. There were no error messages during the install and all the remarks from the script were displayed in green.

When I access the server through port 80 I get the following:

enter image description here

Following the Trouble Shooting Guide I tried to query the status, but the result is also an error:

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
sudo: bundle: command not found

I tried to access the logs but the unicorn.stderr.log file is nowhere to be found in the system.

There is a similar question with the same error on Ubuntu 12.04, to which the solution is to increase the unicorn timeout. I have tried to do so but the error message remains.

like image 623
Luís de Sousa Avatar asked Jan 07 '15 09:01

Luís de Sousa


1 Answers

There is a lag of some 5 minutes from the moment gitlab is started/restarted to the point when it is actually able to process requests. Here is an example from the log:

2015-01-08_09:00:57.37719 [13326] 08 Jan 10:00:57.377 * The server is now ready to accept connections on port 0
2015-01-08_09:00:57.37722 [13326] 08 Jan 10:00:57.377 * The server is now ready to accept connections at /var/opt/gitlab/redis/redis.socket

[...]

==> /var/log/gitlab/unicorn/unicorn_stderr.log <==
I, [2015-01-08T10:04:48.676879 #13351]  INFO -- : listening on addr=127.0.0.1:8080 fd=11
I, [2015-01-08T10:04:48.677663 #13351]  INFO -- : unlinking existing socket=/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket
I, [2015-01-08T10:04:48.690283 #13351]  INFO -- : listening on addr=/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket fd=12
I, [2015-01-08T10:04:48.716769 #13413]  INFO -- : worker=0 spawned pid=13413
I, [2015-01-08T10:04:48.735878 #13351]  INFO -- : master process ready
I, [2015-01-08T10:04:48.846635 #13416]  INFO -- : worker=1 spawned pid=13416
I, [2015-01-08T10:04:48.837438 #13413]  INFO -- : worker=0 ready
I, [2015-01-08T10:04:48.863110 #13416]  INFO -- : worker=1 ready

Before Unicorn reports that it is up and running on port 8080, the "GitLab is not responding" message will be displayed. So all one has to do is wait.

like image 61
Luís de Sousa Avatar answered Dec 05 '22 13:12

Luís de Sousa