Cannot access local gitlab server GUI using browser

Problem Description

I have been running self-managed ubuntu gitlab for the past couple of weeks using a computer running Ubuntu server 18.04. I have been having some problems in Gitlab I believe were caused by the external_url setting in /etc/gitlab/gitlab.rb

I tried to set external_url to the URL of a domain I own and was unable to access the GitLab servers login page, probably unsuprisingly. Prior to editing this I accessed GitLab through the LAN typing http://<server.local.IP>. I tried resetting the external_url with http://<server.local.IP>. But now I am unable to access the gitlab through the browser and simply get a refused to connect error message. Any help would be greatly appreciated I think from the outputs I included below (see useful information) GitLab is all running correctly I just cannot access the GUI through the browser. I have accessed the ubuntu server by logging in using ssh over the LAN.

Ideal Output
Ideally I would like to be able to use the GitLab server outside the LAN so I can collaborate with others and use the compute resources of the server without being close the LAN. I have a static external IP address so should be able to port forward from port 80 or 22 of the server to a free port on the modem and then assign that a domain name.

Thanks for everyones help. :blush:

Other Resources Used

Useful Information

sudo gitlab-rake gitlab:env:info

Returns the following:

System information
System:		Ubuntu 18.04
Proxy:		no
Current User:	git
Using RVM:	no
Ruby Version:	2.6.5p114
Gem Version:	2.7.10
Bundler Version:1.17.3
Rake Version:	12.3.3
Redis Version:	5.0.7
Git Version:	2.24.1
Sidekiq Version:5.2.7
Go Version:	unknown

GitLab information
Version:	12.9.0-ee
Revision:	073a4ba8016
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	PostgreSQL
DB Version:	10.12
URL:		http://192.168.1.48 
HTTP Clone URL:	http://quessy.com/some-group/some-project.git
SSH Clone URL:	git@192.168.1.48:some-group/some-project.git
Elasticsearch:	no
Geo:		no
Using LDAP:	no
Using Omniauth:	yes
Omniauth Providers: 

GitLab Shell
Version:	12.0.0
Repository storage paths:
- default: 	/var/opt/gitlab/git-data/repositories
GitLab Shell path:		/opt/gitlab/embedded/service/gitlab-shell
Git:		/opt/gitlab/embedded/bin/git

sudo gitlab-ctl status

returns

run: alertmanager: (pid 30971) 1549s; run: log: (pid 4719) 6577s
run: gitaly: (pid 31014) 1548s; run: log: (pid 4710) 6577s
run: gitlab-exporter: (pid 31040) 1548s; run: log: (pid 4723) 6577s
run: gitlab-workhorse: (pid 5566) 1060s; run: log: (pid 4714) 6577s
run: grafana: (pid 5805) 1044s; run: log: (pid 4717) 6577s
run: logrotate: (pid 31091) 1547s; run: log: (pid 4722) 6577s
run: nginx: (pid 5775) 1044s; run: log: (pid 4721) 6577s
run: node-exporter: (pid 31200) 1546s; run: log: (pid 4715) 6577s
run: postgres-exporter: (pid 31206) 1546s; run: log: (pid 4718) 6577s
run: postgresql: (pid 31236) 1545s; run: log: (pid 4711) 6577s
run: prometheus: (pid 31245) 1545s; run: log: (pid 4720) 6577s
run: redis: (pid 31264) 1544s; run: log: (pid 4712) 6577s
run: redis-exporter: (pid 31269) 1544s; run: log: (pid 4716) 6577s
run: sidekiq: (pid 5621) 1056s; run: log: (pid 4713) 6577s
run: unicorn: (pid 6462) 1006s; run: log: (pid 4709) 6577s

Hey there!


The issue with not being able to access it again after changing the url back to the local address is, that your browser might have cached the response.
Try connecting to the instance with another browser (or clear all locally stored data related to that domain and private IPv4 you accessed)


The HTTP Clone URL: value in your sudo gitlab-rake gitlab:env:info seems odd to me; afaik it should also be the local ipv4 - check your config

Hey aljaxus,

thanks for your response.

I tried clearing the cache and with a different browser even on a different device on the network but still get the following browser error:

HTTP Clone URL: http://quessy.com/some-group/some-project.git

value is from where I was fiddling with the settings when I had access to the GitLab server it was 192.168.1.48 before I changed the git repository setting.

Is the server’s local address really still 192.168.1.48 ?


Does the server’s firewall allow incoming traffic on port 80?


Run netstat -tupln on the server and provide the command output

Thanks here you go:

(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:9100          0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:2380          0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:10252         0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:9229          0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:9168          0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:10256         0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:8082          0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:43251         0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:9236          0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:3000          0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:1338          0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:8060            0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:9121          0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:9090          0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:9187          0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:9093          0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:10248         0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:25000           0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:10249         0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:10251         0.0.0.0:*               LISTEN      -                   
tcp6       0      0 :::10255                :::*                    LISTEN      -                   
tcp6       0      0 ::1:9168                :::*                    LISTEN      -                   
tcp6       0      0 :::10257                :::*                    LISTEN      -                   
tcp6       0      0 :::10259                :::*                    LISTEN      -                   
tcp6       0      0 :::22                   :::*                    LISTEN      -                   
tcp6       0      0 :::25                   :::*                    LISTEN      -                   
tcp6       0      0 :::16443                :::*                    LISTEN      -                   
tcp6       0      0 :::12379                :::*                    LISTEN      -                   
tcp6       0      0 :::9094                 :::*                    LISTEN      -                   
tcp6       0      0 :::10250                :::*                    LISTEN      -                   
udp        0      0 0.0.0.0:8472            0.0.0.0:*                           -                   
udp        0      0 127.0.0.53:53           0.0.0.0:*                           -                   
udp        0      0 192.168.1.48:68         0.0.0.0:*                           -                   
udp6       0      0 :::9094                 :::*                                -

I logged into there using ssh username@<local.IP> too

I thought the sudo UFW status output may be useful too:

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       Anywhere                  
80/tcp                     ALLOW       Anywhere                  
443/tcp                    ALLOW       Anywhere                  
OpenSSH                    ALLOW       Anywhere                  
22/tcp (v6)                ALLOW       Anywhere (v6)             
80/tcp (v6)                ALLOW       Anywhere (v6)             
443/tcp (v6)               ALLOW       Anywhere (v6)             
OpenSSH (v6)               ALLOW       Anywhere (v6)

Hi there!
I’m keep looking for the way of resolution on this problem and finally arrived at this topic.

This is quite same issue that I have.

Did you solved this issue?