Why doesn't lsof show localhost TCP connections in 14.04?
Posted
by
sfussenegger
on Ask Ubuntu
See other posts from Ask Ubuntu
or by sfussenegger
Published on 2014-08-20T16:00:21Z
Indexed on
2014/08/20
16:35 UTC
Read the original article
Hit count: 343
I have two servers running 12.04.4 and 14.04.1 respectively. Both have nginx (port 80) and a Java process (port 8080).
As expected, the lsof output for the Java process on the 12.04 machine shows a couple of established connections for port 8080 (e.g. TCP 127.0.0.1:8080->127.0.0.1:58067 (ESTABLISHED)
)
The 14.04 machine however does not. It only shows the listening port (TCP *:8080 (LISTEN)
). I'm sure there are active connections though (confirmed by access logs, Java process status output, etc).
What has changed from 12.04 to result in this behavior? Can this change be the cause for the "Too many open files" errors I'm getting since moving from 12.04 to 14.04?
12.04:
$ dpkg -l lsof linux-image-virtual openjdk-7-jre nginx
||/ Name Version
+++-===========================================-===========================================
ii linux-image-virtual 3.2.0.59.70
ii lsof 4.81.dfsg.1-1build1
ii nginx 1.6.1-1~precise
ii openjdk-7-jre 7u65-2.5.1-4ubuntu1~0.12.04.1
14.04:
$ dpkg -l lsof linux-image-virtual openjdk-7-jre nginx-full
||/ Name Version Architecture Description
+++-=====================================-=======================-=======================
ii linux-image-virtual 3.13.0.32.38 amd64
ii lsof 4.86+dfsg-1ubuntu2 amd64
ii nginx-full 1.4.6-1ubuntu3 amd64
ii openjdk-7-jre:amd64 7u65-2.5.1-4ubuntu1~0.1 amd64
© Ask Ubuntu or respective owner