Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6066

Why is a curl-request to localhost handing/blocking although nobody is listening on this port? [closed]

$
0
0

I am investigating an issue, that I can not connect to docker containers via exposed ports to 80 or 8080 on a newly installed Linux Ubuntu 22 machine. Instead, every request hangs.

So I rebooted the machine and stopped all services like nginx and docker. Nothing is listening on specific ports.

curl http://0.0.0.0:8000:

as expected, it prints

curl: (7) Failed to connect to 0.0.0.0 port 8000 after 0 ms:Connection refused

However, curl http://localhost:8000 causes curl to hang forever.

When I do ping localhost, it shows it resolves to 127.0.0.1 (as expected)

And curl http://127.0.0.1:8000 also failes to connect:

curl: (7) Failed to connect to 127.0.0.1 port 8000 after 0 ms:Connection refused

netstat -l -p

tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN      -tcp        0      0 localhost:domain        0.0.0.0:*               LISTEN      -tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      -udp        0      0 localhost:domain        0.0.0.0:*                           -udp        0      0 Ubuntu-2204-jammy-a:ntp 0.0.0.0:*                           -udp        0      0 localhost.localdoma:ntp 0.0.0.0:*                           -udp        0      0 0.0.0.0:ntp             0.0.0.0:*                           -udp6       0      0 Ubuntu-2204-jammy-a:ntp [::]:*                              -udp6       0      0 Ubuntu-2204-jammy-a:ntp [::]:*                              -udp6       0      0 [::]:ntp                [::]:*                              -raw6       0      0 [::]:ipv6-icmp          [::]:*                  7           -

What could this be?


Viewing all articles
Browse latest Browse all 6066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>