Operating System - HP-UX
1819794 Members
3423 Online
109607 Solutions
New Discussion юеВ

problem while opening a client socket

 
kumasudh
Advisor

problem while opening a client socket

Hi All,

I am facing one strange issue with my application running on HP-UX 11iv3.It tries to open a client socket with a service running at port 6670.

#netstat -an |grep 6670
tcp 0 0 *.6670 *.* LISTEN

#telnet 127.0.0.1 6670
Trying...
Connected to 127.0.0.1.
Escape character is '^]'.

the service rejects the client's connect request with errno 239(connection refused) .

Could somebody help me here to figure out why the service is refusing connect request .

Thanks,
Best Regards
Sudhir
6 REPLIES 6
Torsten.
Acclaimed Contributor

Re: problem while opening a client socket

First I would try to find out "who" is listening on that port - use "lsof".

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Ralph Grothe
Honored Contributor

Re: problem while opening a client socket

Maybe the server is configured to only allow connects from certain source addresses, or some tcp wrapper is in effect.
As Torsten said you should identify the server by e.g.
# lsof -nPi tcp:6670 | awk '/LISTEN/{print$2}'|xargs ps -fp
Madness, thy name is system administration
kumasudh
Advisor

Re: problem while opening a client socket

Hi,

Here is the output..

#/usr/local/bin/lsof -nPi tcp:6670 | awk '/LISTEN/{print$2}'|xargs ps -fp
UID PID PPID C STIME TTY TIME COMMAND
smsdba 4520 4519 0 13:22:14 pts/tb 0:00 /opt/OC/lbin/ftc_mibproxy -MibService ha_ftcmib -FtcService ha_ftchb


the service "ha_ftcmib" is supposed to listen on 6670(configured in /etc/services) .

#/usr/local/bin/lsof |grep ha_ftc
ftc 4519 smsdba 4u IPv4 0x115b119400 0t0 TCP *:ha_ftc (LISTEN)
ftc 4519 smsdba 6u IPv4 0x115b5fc680 0t0 TCP *:ha_ftchb (LISTEN)
ftc 4519 smsdba 7u IPv4 0x115b2b0d00 0t0 TCP *:ha_ftchboam (LISTEN)
ftc 4519 smsdba 8u IPv4 0x1159c66c80 0t0 TCP localhost:ha_ftchb->localhost:49635 (ESTABLISHED)
ftc 4519 smsdba 9u IPv4 0x1159c66080 0t0 TCP localhost:ha_ftchb->localhost:49636 (ESTABLISHED)
ftc_mibpr 4520 smsdba 3u IPv4 0x115ad78680 0t0 TCP localhost:49635->localhost:ha_ftchb (ESTABLISHED)
ftc_mibpr 4520 smsdba 4u IPv4 0x115b36f980 0t0 TCP *:ha_ftcmib (LISTEN)
ftc_mibpr 4520 smsdba 5u IPv4 0x1159c66380 0t0 TCP localhost:49636->localhost:ha_ftchb (ESTABLISHED)

Thanks,
Best Regards
Sudhir
Fabio Ettore
Honored Contributor

Re: problem while opening a client socket

Hi,

are youy experiencing problems with that service on that port? Or are you complaining that just why telnet on port 6670 is refusing connections in that way?

Have you other systems configured with that service listening on port 6670? If so have you the same behaviour on those ones?

Best regards,
Fabio
WISH? IMPROVEMENT!
Deepak Kr
Respected Contributor

Re: problem while opening a client socket

Hi,

clear the port using lsof and try connecting
check

#netstat -an |grep 6670

It is not neccessary that port is also available for telnet....

"There is always some scope for improvement"
Ralph Grothe
Honored Contributor

Re: problem while opening a client socket

Also it can be heavily dependent on the application protocol spoken.
There are servers where the server side initiates the communication (I think SSH is such a candidate), and loads of other which wait for the client to pass the proper cue first.
Madness, thy name is system administration