Re: lsof on solaris 10




Dan Foster wrote:
In article <1163832807.684953.167920@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, sil <dsphunxion@xxxxxxxxx> wrote:

Michael Schreiber wrote:
hi,

i have a problem with lsof under solaris 10 sparc:

lsof -i |tail -2
httpd 29589 wwwrun 123u IPv4 0x300100cd600 0t0 TCP *:65535
(LISTEN)
httpd 29589 wwwrun 124u IPv4 0x3000fd8c500 0t0 TCP *:65535
(LISTEN)

Have you tried to see how Apache is configured by any chance

grep -i listen /path/to/apache/conf/httpd.conf

Have you tried telnetting to that machine on port 65535 if it is Apache
while in telnet you could type HEAD to make sure.

The issue does not lie with Apache. Rather, it lies with lsof, as I can
reproduce it on my own fully patched Solaris 10/x86 Update 2 system:

# lsof | grep LISTEN
sendmail 386 root 4u IPv4 0xffffffff8187bd80 0t0 TCP *:65535 (LISTEN)
named 25636 dnsuser 23u IPv4 0xffffffff847561c0 0t0 TCP *:65535 (LISTEN)

Please observe that the above output claims that both sendmail and named
are listening on port 65535.

This is clearly impossible. Thus, it cannot be application
configuration, but rather, with lsof parsing kernel memory.

Casper Dik indicates that this would be fixed by recompiling lsof...
however, even when I do so with lsof 4.77 on Solaris 10/x86 Update 2 +
patches + SUNWgcc, still doesn't work. So... hmm. I'm not sure.

-Dan

Is always a good idea to look for lsof patches. There is a patch to
lsof 4.77 for this problem
It may be found on lsof.itap.purdue.edu in
pub/tools/unix/lsof/patches/4.77/solaris10-0606.patch.

Vic Abell, lsof author

.



Relevant Pages

  • Re: lsof does not show open ports after latest OS Recommended patches
    ... recommended patches and then I had a surprise: ... Lsof must be patched and recompiled in order to work with Solaris ...
    (comp.unix.solaris)
  • Re: Unknown ports
    ... >> After beginning to learn about security, I ran the following command ... >> lsof | grep LISTEN ... >> So apparently there are two ports listening that have no process or file ... > clearly that you are running a NFS server. ...
    (comp.os.linux.misc)
  • Re: ssh_init: Network error: Connection refused
    ... I wasn't sure how to determine listening on port 22 from ... > - Use lsof to determine if either of those processes is listening on port ... > otherwise you'd get a timeout instead of "connection refused"). ...
    (comp.security.ssh)
  • Re: lsof on solaris 10
    ... i have a problem with lsof under solaris 10 sparc: ... Have you tried telnetting to that machine on port 65535 if it is Apache ... reproduce it on my own fully patched Solaris 10/x86 Update 2 system: ... are listening on port 65535. ...
    (comp.unix.solaris)
  • lsof does not show open ports after latest OS Recommended patches
    ... recommended patches and then I had a surprise: lsof doesn't show the ... is listening on tcp *.*!!!! ... All other program with open network sockets also show *.*. ...
    (comp.unix.solaris)