4

I ran sudo lsof -p $(pidof foo) and I got a lot of these. Does anyone know what these represent? I know they come from the process but there are no ports / IP addresses.

COMMAND    PID USER   FD      TYPE             DEVICE  SIZE/OFF      NODE NAME
foo   115450 root  592u     sock                0,7       0t0 957442022 protocol: TCP
foo   115450 root  593u     sock                0,7       0t0 956964126 protocol: TCP
foo   115450 root  594u     sock                0,7       0t0 957091053 protocol: TCP
foo   115450 root  595u     sock                0,7       0t0 957498237 protocol: TCP
foo   115450 root  596u     sock                0,7       0t0 957077603 protocol: TCP
foo   115450 root  597u     sock                0,7       0t0 957211699 protocol: TCP
3
  • 4
    Your application has created a socket (perhaps via socket(2)) in the TCP domain, but not bound it to any port (eg via connect(2) or listen(2) or bind(2)). Commented Nov 19, 2018 at 23:41
  • @StephenHarris thank you. What about connecting to HTTP? It should still follow the normal connect/listen/bind flow, shouldn't? Commented Nov 21, 2018 at 18:57
  • I am expiriencing same i need to understand what 0,7 stands for Commented Jan 8, 2021 at 4:42

2 Answers 2

1

In case Stephen Harris's answer is deleted for being posted as a comment, I'm posting it as an answer:

Your application has created a socket (perhaps via socket(2)) in the TCP domain, but not bound it to any port (eg via connect(2) or listen(2) or bind(2)).

0

try to use strace with "-e trace=network" option to figure out which code is using sockets incorrectly. e.g,

[pid 16700] getsockopt(6, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
[pid 16700] getpeername(6, {sa_family=AF_INET, sin_port=htons(12345), 
 sin_addr=inet_addr("10.4.50.77")}, [112->16]) = 0
[pid 16700] getsockname(6, {sa_family=AF_INET, sin_port=htons(23456), 
 sin_addr=inet_addr("10.4.100.60")}, [112->16]) = 0
[pid 16700] setsockopt(6, SOL_TCP, TCP_NODELAY, [1], 4) = 0
[pid 16700] setsockopt(6, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
[pid 16700] setsockopt(6, SOL_TCP, TCP_KEEPINTVL, [15], 4) = 0
[pid 16700] setsockopt(6, SOL_TCP, TCP_KEEPIDLE, [15], 4) = 0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.