'502 Whoops, GitLab is taking too much time to respond
I installed Gitlab on Raspberry Pi2, and it had worked well for a couple of months. But since shutting down the power of RPi, it doesn't work anymore. The webpage returns 502 error.
502 Whoops, GitLab is taking too much time to respond.
So I tried reconfigure (sudo gitlab-ctl reconfigure) but, it failed with the error message:
FATAL: Errono::EAFNOSUPPORT: Address family not supported by protocol - socket(2)
I don't know how to resolve this problem.
Solution 1:[1]
I saw issue like this several times.
If GitLab has been worked fine please do not touch anything. Just wait. It seems GitLab has not been started properly :(
I mean that after booting system you have to wait 1-2 minutes before using GitLab. GitLab needs some time for starting.
Solution 2:[2]
I am not adding a comment since my answer needs some good formatting.
So that means, your port 8080 is already being used. I would advise to stop GitLab, and change unicorn port from 8080 to 8081 (or some unused port).
After starting/restarting GitLab wait for 2 minutes, and you should be okay. If not, again check gitlab-ctl tail for any errors.
# gitlab-ctl stop
# vi /etc/gitlab/gitlab.rb (change only these lines, uncomment if required)
unicorn['port'] = 8081
gitlab_git_http_server['auth_backend'] = "http://localhost:8081"
# gitlab-ctl reconfigure (to apply the changes)
# gitlab-ctl restart
# lsof -i:8081 (check whether unicorn has started properly)
You need to be root or a sudo user (with root privileges) to run these commands.
Solution 3:[3]
After inspecting the gitlab-ctl tail (reboot loop) it turned out that there is not enough RAM (2GB) and there is no swap file in my fresh Ubuntu setup.
As mentioned in requirements GitLab requires at least 2GB RAM + 2GB swap memory ...
So to create a swap file follow those steps:
gitlab-ctl stopmkdir /swap && touch /swap/swapfile.imgdd if=/dev/zero of=/swap/swapfile.img bs=1024 count=2M# if you want 4G change 2M to 4Mchmod 0600 /swap/swapfile.imgmkswap /swap/swapfile.imgnano /etc/fstaband add "/swap/swapfile.img swap swap sw 0 0"swapon /swap/swapfile.imgVerify if it works :
cat /proc/swapsFilename Type Size Used Priority /swap/swapfile.img file 2097148 0 -1gitlab-ctl start
more info about creating swap : here
Solution 4:[4]
You can follow below steps to fix this kind of issue.
- Update
unicorn['port']to****.(Different port which is not used for process in the system) - Update
nginx['port']to****.(Different port which is not used for process in the system) - Update
web_serverusername andweb_servergroup in this file as well and set it to apache's/httpd's username and group
Then do gitlab-ctl reconfigure and gitlab-ctl restart
Solution 5:[5]
You should change your Unicorn Settings
If you need to adjust the Unicorn timeout or the number of workers you can use the following settings in /etc/gitlab/gitlab.rb.
Change the following:
unicorn['worker_processes'] = 3
unicorn['worker_timeout'] = 120 # or any suitable timeout for your server
do not forget to remove # in line start if commented.
Run sudo gitlab-ctl reconfigure for the change to take effect.
Solution 6:[6]
This error is also occurred when the system, in your case the Raspberry Pi2 (in my case, in an t2.micro AWS EC2 instance) due to not fulfilling the minimum requirements for installing Gitlab.
That is the lack of Memory (t2.micro is 1GiB, but Gitlab requires 4GiB) for further processing. Therefore, provide all the requirements correctly (I occupied a t2.medium instance which is 4GiB instead of t2.micro). It would be appropriate if the system has been enabled accurately.
Solution 7:[7]
Need to set nginx['listen_port'] and unicorn['port']. For example:
nginx['listen_port'] = 8081
unicorn['port'] = 8082 #the ports should be different
Then:
sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart
Solution 8:[8]
There was a port collision at my site. Jenkins has already run on my site, which uses the 8080 port also.
Change Gitlab or Jenkins port.
Solution 9:[9]
Something is listening to the 8080 port, so Unicorn can't start. What does the following command indicate? The ports for Redis, PostgreSQL and Puma can be overridden in
/etc/gitlab/gitlab.rb
as follows:
redis['port'] = 1234
postgresql['port'] = 2345
puma['port'] = 3456
For NGINX port changes please see settings/nginx.md.
see https://docs.gitlab.com/omnibus/common_installation_problems/#tcp-ports-for-gitlab-services-are-already-taken (TCP ports for GitLab services are already taken)
Solution 10:[10]
Please note if you got 502 Whoops, GitLab is taking too much time to respond before going so much with every step
- Ensure that your server has at least 4GB of RAM
- and give her server at least 10 minutes if you are using digital ocean droplet
Solution 11:[11]
I had that kind of error before and turns out that I had not physicall space (in my case, a virtual machine). Check that you have enough space
Solution 12:[12]
It is posyble that you has change change some configuration file, use this lines in your terminal:
sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart
Now wait a few minutes, and try again.
Solution 13:[13]
You should only change external_url http://xxx.xxx.xxx.xx:9090. Don't change # unicorn['port'] = 8080.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
