Make Gitlab listen on 8080 lead to error 502

I’m in charge of testing gitlab for my company, i want to install it on an ubuntu 20.04 server (not a vm) which already has an apache listening on 80.
Firewall is disabled for the test.
I’ve installed the current gitlab version (16.8.2) which works fine (if i stop apache).
I then wanted gitlab to listen on 8080. Which always lead to error 502 gitlab is taking too mush time to respond …
I have tried the following way (none works)

  • changing external_url to append :8080
  • not changing externa_url but changing nginx conf to listen on *:8080

Any advice ?

Thanks in advance

Hi @erbri :wave:

GitLab Omnibus ships with several services, including Puma, that run in the background. Puma runs on port 8080 by default. I suspect you have two or more services trying to use port 8080 which is causing the problem you’re reporting.

You can see what is running on which port using the following commands:

sudo netstat -tulpn # | grep 8080
sudo ss -tuln # | grep 8080

I highly suggest running GitLab on it’s own VM, without any other web servers or services running in the background. This will avoid problems like this, and ensure that other services on the machine don’t consume shared resources that would cause GitLab performance to degrade.

If running GitLab on it’s own dedicated machine is not an option, you could try changing the default ports for GitLab services by editing the relevant section of /etc/gitlab/gitlab.rb and running gitlab-ctl reconfigure to apply the changes.

Thank you for your advice.

I used port 83 and everything went fine.

As a conclusion “do not use 8080”