Seeing too many lsof can't identify protocol

后端 未结 3 1087
春和景丽
春和景丽 2021-01-01 12:58


I have a Java process/app. When I run /usr/sbin/lsof -p on that java process, I see a lot of \"can\'t identify protocol\". Also, interestingly, File descriptors(FDs) a

相关标签:
3条回答
  • 2021-01-01 13:46

    When lsof prints "Can't identify protocol", this usually relates to sockets (it should also say 'sock' in the relevant output lines).

    So, somewhere in your code you are probably connecting sockets and not closing them properly (perhaps you need a finally block).

    I suggest you step through your code with a debugger (easiest to use your IDE, potentially with a remote debugger, if necesssary), while running lsof side-by-side. You should eventually be able to see which thread / line of code is creating these File Descriptors.

    See point 10.2.2 of this FAQ for more details about the Lsof output.

    0 讨论(0)
  • 2021-01-01 14:00

    Lsof prints can't identify protocol for half-open TCP/IP connections: https://idea.popcount.org/2012-12-09-lsof-cant-identify-protocol/

    0 讨论(0)
  • 2021-01-01 14:00

    Maybe you observe bug in JVM 1.6 with leak of connections when you use SSL and hostname: http://bugs.sun.com/view_bug.do?bug_id=6745052

    0 讨论(0)
提交回复
热议问题