SeoHwa EunHa
SeoHwa EunHa

Reputation: 401

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.

Upvotes: 40

Views: 121818

Answers (15)

Гали John
Гали John

Reputation: 1

Try sudo gitlab-ctl stop node-exporter

Upvotes: 0

OdeandieFreude
OdeandieFreude

Reputation: 1

I also encountered this error. Waiting for GitLab to boot HTTP 502 I executed this command sudo gitlab-ctl reconfigure and found that the disk space was insufficient log writing failed: No space left on device @ io_write - /var/log/gitlab/reconfigure/1721920853.log

I verified the current usage of this mounted disk, df -h and the display was as follows: Filesystem Size Used Avail Use% Mounted on /dev/mapper/ubuntu--vg-ubuntu--lv 9.8G 9.8G 0 100% /

Then I expanded the disk space of the lv volume and the memory of the virtual machine resize2fs -p /dev/mapper/ubuntu--vg-ubuntu--lv , and the problem was solved.

Upvotes: 0

trojan
trojan

Reputation: 1535

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 stop
mkdir /swap && touch /swap/swapfile.img
dd if=/dev/zero of=/swap/swapfile.img bs=1024 count=2M   # if you want 4G change 2M to 4M**
chmod 0600 /swap/swapfile.img
mkswap /swap/swapfile.img
nano /etc/fstab # and add "/swap/swapfile.img swap swap sw 0 0"
swapon /swap/swapfile.img

Verify it works: cat /proc/swaps

    Filename                Type        Size    Used    Priority

    /swap/swapfile.img      file        2097148 0       -1

Finally, run: gitlab-ctl start

More info about creating swap: here

Upvotes: 13

Jose
Jose

Reputation: 23

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

Upvotes: 0

M.Ali El-Sayed
M.Ali El-Sayed

Reputation: 1779

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

Upvotes: 0

ismael
ismael

Reputation: 474

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)

Upvotes: 0

betontalpfa
betontalpfa

Reputation: 3752

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.

Upvotes: 0

himeshc_IB
himeshc_IB

Reputation: 863

You can follow below steps to fix this kind of issue.

  1. Update unicorn['port'] to ****.(Different port which is not used for process in the system)
  2. Update nginx['port'] to ****.(Different port which is not used for process in the system)
  3. Update web_server username and web_server group 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

Upvotes: 3

liuxiuxue
liuxiuxue

Reputation: 37

You should only change external_url http://xxx.xxx.xxx.xx:9090. Don't change # unicorn['port'] = 8080.

Upvotes: -2

Anas Naguib
Anas Naguib

Reputation: 1116

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.

Upvotes: 2

Wilmer Villca
Wilmer Villca

Reputation: 582

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.

Upvotes: -1

Eugene Ilyushin
Eugene Ilyushin

Reputation: 652

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

Upvotes: 0

Kasumi Gunasekara
Kasumi Gunasekara

Reputation: 630

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.

Upvotes: 0

Vlad
Vlad

Reputation: 3597

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.

Upvotes: 31

vikas027
vikas027

Reputation: 5782

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.

Upvotes: 26

Related Questions