You are not logged in.

#1 2017-03-27 20:26:03

cinatic
Member
Registered: 2013-01-27
Posts: 13

[SOLVED] Localhost connections sometimes timed out

Hey archlinux friends!

my server with arch has been restarted by the provider on the weekend (idk what happend) and now the webservices are not running acurate anymore. I am running nginx in front of several services and now i got sometimes 502 error. So i checked the services directly and figured out that something must be wrong with the loopback device:

[cin@localhost ~]$ wget 127.0.0.1:9001
--2017-03-27 20:17:00--  http://127.0.0.1:9001/
Connecting to 127.0.0.1:9001... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-03-27 20:17:00 ERROR 404: Not Found.

[cin@localhost ~]$ wget 127.0.0.1:9001
--2017-03-27 20:17:01--  http://127.0.0.1:9001/
Connecting to 127.0.0.1:9001... failed: Connection timed out.
Retrying.

--2017-03-27 20:17:09--  (try: 2)  http://127.0.0.1:9001/
Connecting to 127.0.0.1:9001... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-03-27 20:17:09 ERROR 404: Not Found.

[cin@localhost ~]$ wget 127.0.0.1:9001
--2017-03-27 20:17:12--  http://127.0.0.1:9001/
Connecting to 127.0.0.1:9001... failed: Connection timed out.
Retrying.

--2017-03-27 20:17:20--  (try: 2)  http://127.0.0.1:9001/
Connecting to 127.0.0.1:9001... failed: Connection timed out.
Retrying.

--2017-03-27 20:17:30--  (try: 3)  http://127.0.0.1:9001/
Connecting to 127.0.0.1:9001... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-03-27 20:17:30 ERROR 404: Not Found.

Wtf, sometimes 127.0.0.1 is not reachable? Maybe my service is broken so i tried it with others like ssh and postfix it's all the same sometimes it works sometimes time out.

What might be wrong?

What i already tried:
restarting
pacman -Syu
shut down/up lo device
disabled iptables

Last edited by cinatic (2017-04-03 08:34:52)

Offline

#2 2017-03-27 21:20:22

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,424

Re: [SOLVED] Localhost connections sometimes timed out

Online

#3 2017-03-28 07:37:04

cinatic
Member
Registered: 2013-01-27
Posts: 13

Re: [SOLVED] Localhost connections sometimes timed out

I just checked the entries and replaced localhost and rebooted (just in case) i think my hostname is correctly set now but it behaves like before:

[cin@vserver1592 ~]$ getent hosts
127.0.0.1       localhost
127.0.0.1       vserver1592.localdomain vserver1592
[cin@vserver1592 ~]$ hostnamectl
   Static hostname: vserver1592
         Icon name: computer-vm
           Chassis: vm
        Machine ID: cafa44ee0e335d4acb78a25052983c02
           Boot ID: 08eef99eb28442b1b885a8c62657a36e
    Virtualization: xen
  Operating System: Arch Linux
            Kernel: Linux 4.10.5-1-ARCH
      Architecture: x86-64

Test

[cin@vserver1592 ~]$ wget 127.0.0.1:9001
--2017-03-28 07:33:17--  http://127.0.0.1:9001/
Connecting to 127.0.0.1:9001... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-03-28 07:33:17 ERROR 404: Not Found.

[cin@vserver1592 ~]$ wget 127.0.0.1:9001
--2017-03-28 07:33:18--  http://127.0.0.1:9001/
Connecting to 127.0.0.1:9001... failed: Connection timed out.
Retrying.

--2017-03-28 07:33:26--  (try: 2)  http://127.0.0.1:9001/
Connecting to 127.0.0.1:9001... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-03-28 07:33:26 ERROR 404: Not Found.

[cin@vserver1592 ~]$ ssh 127.0.0.1
ssh: connect to host 127.0.0.1 port 22: Connection timed out
[cin@vserver1592 ~]$ ssh 127.0.0.1
cin@127.0.0.1's password:

[cin@vserver1592 ~]$

Offline

#4 2017-03-28 09:14:05

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED] Localhost connections sometimes timed out

Offline

#5 2017-03-28 11:47:27

cinatic
Member
Registered: 2013-01-27
Posts: 13

Re: [SOLVED] Localhost connections sometimes timed out

Thanks @loqs this also solved my issued

Offline

#6 2017-03-28 16:09:09

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED] Localhost connections sometimes timed out

If you are satisfied a solution has been found, please mark your thread as solved by editing the first post and prepending the tag [SOLVED] to the title in the "Subject" field.

Offline

Board footer

Powered by FluxBB