LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-26-2020, 01:21 AM   #1
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Lightbulb Gitlab on Ubuntu server - url not working


Hi guys, we have an Ubuntu with Gitlab.
One user complaining got 500 error. And rebooted the server.

Before rebooting the server, the https://192.168.1.50 was showing the Gitlab web page.

After rebooting, Gitlab web page is not showing up.

Nginx seems to be running.

I got these when I run sudo gitlab-ctl status

ok: run: gitaly: (pid 5392) 1s
ok: run: gitlab-monitor: (pid 5416) 0s
ok: run: gitlab-workhorse: (pid 5421) 1s
ok: run: logrotate: (pid 5431) 0s
ok: run: nginx: (pid 5512) 0s
ok: run: node-exporter: (pid 5520) 1s

I have tried restarting the service by:

sudo gitlab-ctl restart but still not working

Any ideas?

Thanks.
 
Old 11-26-2020, 03:22 AM   #2
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
ss -ntlp nginx

shows that nginx is bind and listening to port 80
 
Old 11-27-2020, 01:28 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by JJJCR View Post
Hi guys, we have an Ubuntu with Gitlab.
One user complaining got 500 error. And rebooted the server.

Before rebooting the server, the https://192.168.1.50 was showing the Gitlab web page.

After rebooting, Gitlab web page is not showing up.

Nginx seems to be running.
This is confusing. Why only one user? Why reboot? And why https://192.168.1.50, that's a local address, no? Have you tried http://192.168.1.50 too? Port 80 is http, port 443 is https.
Are you saying your server works, but gitlab doesn't? Or something more spcific?
 
Old 11-27-2020, 02:26 AM   #4
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
gitlab is hosted locally on our server behind vpn

currently one 1 developer is using it

gitlab-ctl reconfigure works fine

ufw status also shows ports are open

nginx is bind to port 80 using ss command not really sure what's going on

Thanks

Last edited by JJJCR; 11-27-2020 at 02:27 AM. Reason: edit
 
Old 11-27-2020, 03:15 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by JJJCR View Post
nginx is bind to port 80 using ss command not really sure what's going on
That's for unencrypted traffic.
https://192.168.1.50/ is encrypted and defaults to port 443.
 
1 members found this post helpful.
Old 11-27-2020, 04:33 PM   #6
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,599

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546
Quote:
Originally Posted by ondoho View Post
Have you tried http://192.168.1.50 too?
I don't see an answer to this question.


JJJCR: What is the output of these commands (from outside the server):
Code:
curl -ISs 'http://192.168.1.50'
curl -ISs 'https://192.168.1.50'
Also, what do you get when you SSH onto the target server and run:
Code:
curl -ISs 'http://192.168.1.50'
curl -ISs 'http://127.0.0.1'

Quote:
Nginx seems to be running.
How was this determined and what does tail on the nginx log file(s) show?

 
Old 11-27-2020, 06:52 PM   #7
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Hi All, please see update below:

Quote:

Outside:

cls ~ % curl -ISs 'http://192.168.0.50'
curl: (7) Failed to connect to 192.168.0.50 port 80: Connection refused
cls ~ % curl -ISs 'https://192.168.0.50'
curl: (7) Failed to connect to 192.168.0.50 port 443: Connection refused

Quote:
Within the machine:
ubuntu :~$ curl -ISs 'http://127.0.0.1'
HTTP/1.1 404 Not Found
Server: nginx
Date: Fri, 27 Nov 2020 23:58:50 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
X-Content-Type-Options: nosniff


ubuntu :~$ curl -ISs 'http://192.168.0.50'
HTTP/1.1 302 Found
Server: nginx
Date: Fri, 27 Nov 2020 23:59:13 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Cache-Control: no-cache
Location: http://192.168.0.50/users/sign_in
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Request-Id: d4ab4970-acbf-42a8-a702-cf8ecb1c75eb
X-Runtime: 0.030582
X-Ua-Compatible: IE=edge
X-Xss-Protection: 1; mode=block
Strict-Transport-Security: max-age=31536000

http://192.168.1.50 == no output nothing
https://192.168.1.50 == no output nothing
https://192.168.1.50:8060 == no output nothing

Yes nginx seems to be running, but Gitlab page is not showing up. No error also on the logs as well.

Thank you for your help.
 
Old 11-27-2020, 06:55 PM   #8
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Red face

Quote:
Originally Posted by ondoho View Post
This is confusing. Why only one user? Why reboot? And why https://192.168.1.50, that's a local address, no? Have you tried http://192.168.1.50 too? Port 80 is http, port 443 is https.
Are you saying your server works, but gitlab doesn't? Or something more spcific?
Nope Gitlab is not working at all.

The nginx is the one that is built-in to Gitlab.

The server is fine, i am able to SSH.

The Gitlab page was showing up until I rebooted the system.

gitlab-ctl reconfigured seems to reconfigured fine no errors.

gitlab-ctl status shows all is running.

Quote:
ok: run: gitaly: (pid 5392) 1s
ok: run: gitlab-monitor: (pid 5416) 0s
ok: run: gitlab-workhorse: (pid 5421) 1s
ok: run: logrotate: (pid 5431) 0s
ok: run: nginx: (pid 5512) 0s
ok: run: node-exporter: (pid 5520) 1s
ok: run: postgres-exporter: (pid 5530) 0s
ok: run: postgresql: (pid 5539) 1s
ok: run: prometheus: (pid 5544) 0s
ok: run: redis: (pid 5559) 0s
ok: run: redis-exporter: (pid 5565) 0s
ok: run: sidekiq: (pid 5572) 1s
ok: run: unicorn: (pid 5582) 0s
 
Old 11-27-2020, 06:58 PM   #9
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Quote:
@ondoho Why reboot?
We're hoping that the 500 Internal Server Error will be resolved.

AFAIK, no change on the configuration was done so I rebooted the system, but then this issue happens. Gitlab page is not showing on the browser.

Last edited by JJJCR; 11-27-2020 at 07:08 PM. Reason: edit
 
Old 11-28-2020, 07:57 AM   #10
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,599

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546
Quote:
Originally Posted by JJJCR View Post
We're hoping that the 500 Internal Server Error will be resolved.
Next time, if you're going to reboot, just do the server software - aside from anything else, it should only take seconds not minutes.
(Also, a 500 error should be logging the reason for the error, so once you've got this issue resolved you might want to check into that.)

___

Ok, so Nginx/Gitlab responds locally on 192.168.0.50 port 80 but something is blocking ports 80 and 443 from outside the machine.

If a restart of the machine triggered the change in behaviour, it's unlikely to be a network firewall (unless someone happened to modify config at the same time - worth ruling out to be sure).

Assuming the rest of your security allows it, you could temporarily disable the firewall on that machine, repeat the external tests, then re-enable the firewall.

If that lets the requests through it confirms the issue as a firewall config one, if it doesn't something else is blocking the traffic.

 
1 members found this post helpful.
Old 11-29-2020, 12:46 AM   #11
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
@boughtonp, @ondoho Thanks for your help guys.

What I did, installed GitLab on a VM and compare the settings on the prod one.

The newly installed GitLab on the VM works fine, so I followed the same settings on the prod one.

I just inherited the prod VM, I believe somebody had changed the settings already. Just saved it but never restarted the GitLab.

So, when the VM Prod server was rebooted then the issue appears.

Anyway, the local Github site is back and can be accessed via browser. But I am not sure though whether internal server error is resolved, will update once the developer gives a feedback.

I never knew about the curl command, it's quite helpful to troubleshoot. Thank you guys.

Marking this as resolved hopefully internal server error is gone as well.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to Install Gitlab Server with Docker on Ubuntu 18.04 LTS LXer Syndicated Linux News 0 10-17-2019 02:17 AM
LXer: How to Install Gitlab on an Ubuntu Server LXer Syndicated Linux News 0 06-19-2018 06:22 AM
Redirect with URL not showing the new redirects URL link Apache RHEL 6 gdizzle Linux - Newbie 4 12-03-2013 03:09 AM
on url "http://localhost/" error ""The requested URL could not be retrieved " renuaseri Linux - Newbie 1 04-07-2009 12:23 AM
ERROR The requested URL could not be retrieved While trying to retrieve the URL: /re Niceman2005 Linux - General 1 06-29-2005 09:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration