“GitLab is not responding.” 502 on Ubuntu 14.04 af

2019-01-19 12:08发布

问题:

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:

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.

回答1:

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.



回答2:

I have met the similar problem as I have installed GitLab EE on CentOS 7.5 64 bit server in the year of the end of 2018.

The most important thing you must pay attention to is Make sure your server is under the minimum requirements of performance!

In the official documentation of GitLab,your server must be at least 2 cores and 8GB RAM.

If your server is less than 2 cores and 8GB RAM.You can have a try to make a Swap to get more memories,and then reconfigure and restart your GitLab.If you still have this kind of situation,so pay attention to another big and terrible problem about first start of Gitlab:

It may take a long time,maybe some minutes to load the first page after GitLab installation as the above answer saied!

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

Note:If you have a server with lower performance such as: 1 core & 1GB RAM,it will be 502 at most time,even if you try to make the Swap to 8GB RAM,it's not working,the only way you can do is to make the performance of the server more than 2 cores & 8GB RAM minimum.

Some other methods for you to find more detail useful information:

  • We can use gitlab-ctl tail to get the detail information and then copy the log and find the key words such as warning,failed and so on.

  • You can go to the sub-directory of /var/log/gitlab to find the log to get some information.



标签: ubuntu gitlab