1834130 Members
3087 Online
110064 Solutions
New Discussion

Port always in LISTEN

 
RaoB
Occasional Advisor

Port always in LISTEN

Hi,
we are using HP-UX 11.23 Itanium machine for porting our application from solaris to HP-UX.

when we stop all the processes running on the user-id from which the application is started , one of the port is still in LISTEN state. No other process is bound to it. So, we are not able to connect to the same port again. We have to reboot the server to release that port.

netstat -an | grep < port> is showing the output that port is in LISTEN state. But, lsof is not showing any output , for grep on that port.

-> netstat -an | grep 53280
tcp 0 0 *.53280 *.* LISTEN
-> /tempdata/lsof | grep 53280
-> /tempdata/lsof -i:53280
->

When no other process is bound to the port, prot is supposed to get released right!

Is there any system parameter, we have to set for port to get relased or is it is bug in HP 11.23 Itanium release?

Thanks,
Rao


13 REPLIES 13
Steven E. Protter
Exalted Contributor

Re: Port always in LISTEN

Shalom Rao,

Its important to understand that it might not be a user process that is using this port.

it may be a server daemon type process.

The port number is in a range that might be used by portmap as in NFS. NFS maps ports at random for NFS client sessions.

This would make it not a bug.

if you can:
/sbin/init.d/nfs.client stop
/sbin/init.d/nfs.server stop
/sbin/init.d/nfs.core stop

See if the process goes away.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
RaoB
Occasional Advisor

Re: Port always in LISTEN

Steve,
We ran lsof as root user, but still lsof shows that it is not used by any process.

And with root user, we ran teh below 3 commands..
/sbin/init.d/nfs.client stop
/sbin/init.d/nfs.server stop
/sbin/init.d/nfs.core stop

But netstat shows that that port (53280) is in LISTEN state.

As no other process is attached to that port, Is it a bug in HP 11.23 Itanium?\

Thanks,
Rao

florin_10
Frequent Advisor

Re: Port always in LISTEN

Hi

Did you try to telnet from another machine to this port? (%telnet 53280)
what is the output?
Also there are ways for programs to listen without any output from netstat or lsof.
Try tcpdump utility to monitor the network,could help.

Cheers
flg

RaoB
Occasional Advisor

Re: Port always in LISTEN

telnet is connecting to that port. No error message is returned.

Sorry.. I didnot understand the below message:

Also there are ways for programs to listen without any output from netstat or lsof.
RaoB
Occasional Advisor

Re: Port always in LISTEN

I couldn't make out any useful information from tcpdump for this LISTEN port problem.

As telnet servername port is connecting to the port, PORT is clearly in LISTEN mode, as netstat is showing the output. But, as no other processes are attached to the PORT, what the port is going to do in LISTEN mode!!!

please help me with this.

Also , Please let me know, if there is any way to connect/bind to the port, even though it is in LISTEN state!!

-Rao
KapilRaj
Honored Contributor

Re: Port always in LISTEN

Can you check if 53280 is defined in /etc/services and try a grep on that 'name' instead of the number ?. Also make sure that "lsof" is compiled for the correct version of operating system.

Regards,

Kaps
Nothing is impossible
RaoB
Occasional Advisor

Re: Port always in LISTEN

Kaps,
53280 is defined in our /etc/services and we did grep on the service name instead of 53280. But still, we didn't get any response from lsof.

We tried with both our own compiled version of lsof (lsof lsof-4.77) and downloaded lsof (version lsof-4.77 from http://hpux.connect.org.uk/ -- 32 bit . 64 bit not available), both of them are not returning any output.

Few more things I forgot to mention in my previous mails:
1) We are using weblogic in our application. Weblogic server will send data to 53280 (problematic port).
2) When the application is running fine, lsof is showing 2 output's , when I grep on that port(53280).

MWBusHttp 17724 apr03 6u IPv4 0xe00000018b634900 0t0 TCP *:53280 (LISTEN)
MWBusHttp 17725 apr03 6u IPv4 0xe00000018b634900 0t0 TCP *:53280 (LISTEN)



Thanks,
Rao
RaoB
Occasional Advisor

Re: Port always in LISTEN

Any other ideas?
KapilRaj
Honored Contributor

Re: Port always in LISTEN

Can you check if there is a line in /etc/inetd.conf for this port ?

Kaps
Nothing is impossible
RaoB
Occasional Advisor

Re: Port always in LISTEN

There is no entry for 53280 in /etc/inetd.conf
RaoB
Occasional Advisor

Re: Port always in LISTEN

Any suggestions??
RaoB
Occasional Advisor

Re: Port always in LISTEN

We fixed the problem at the application end.

Thanks to everyone.

Rao
RaoB
Occasional Advisor

Re: Port always in LISTEN

Now checking the error values returned by recvmsg.