Sample Header Ad - 728x90

Find out what process is listening on a specific port

0 votes
1 answer
2531 views
For the first time in my life, I am unable to figure out what process is listening on a specific port in Linux :) This is an Ubuntu Server 22.04 installation, running K8s. There is an ingress controller in the cluster that is binding to ports 80 and 443, and I know this works because:
:~# curl localhost

404 Not Found

404 Not Found

nginx :~# curl localhost:443 400 The plain HTTP request was sent to HTTPS port

400 Bad Request

The plain HTTP request was sent to HTTPS port nginx ~# curl https://localhost:443 -k 404 Not Found

404 Not Found

nginx
The problem is that I cannot figure out what process binds to those ports, and how. I did try using ss, but nothing shows up:
:~# ss -tlnpu | grep 80
tcp   LISTEN 0      4096          192.168.13.191:2380       0.0.0.0:*    users:(("etcd",pid=1452,fd=8))           
tcp   LISTEN 0      4096               127.0.0.1:2380       0.0.0.0:*    users:(("etcd",pid=1452,fd=7))           

:~# ss -tlnpu | grep 443
tcp   LISTEN 0      4096                       *:6443             *:*    users:(("kube-apiserver",pid=1546,fd=7))
How can I figure out the actual process that is listening on the ports?
Asked by Bogd (101 rep)
Nov 23, 2022, 08:15 AM
Last activity: Nov 23, 2022, 10:52 AM