LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Why server socket listen() is not listening (https://www.linuxquestions.org/questions/linux-networking-3/why-server-socket-listen-is-not-listening-535912/)

seungtaeh 03-09-2007 03:20 AM

Why server socket listen() is not listening
 
I use redhat ES4 on HP DL585(Opteron 64bit), g++
I make a socket server program in this machine.
I use normal sequence
socket() --> bind() --> listen() --> accept()
and I run client program on another system.
but the response is always
"The attempt to connect was forcefully rejected"
And I find that server program socket is not listening.
I check the netstat, but my application port number is not displayed.
I don't know why?.
The same source code run well in HPUX system.
What is the problem??

leamassiot 03-09-2007 04:32 AM

Suggestions
 
Hi,

Code:

"The attempt to connect was forcefully rejected"
How do you run your client application ?
What are the arguments you give to the client ?

- If it is a hostname <server_name> it may be because your server name is not known by your client (see : /etc/hosts).

- If it is an IP address it may be because you lack the corresponding route (see shell> route).

That is all I can say, hope it helps.


All times are GMT -5. The time now is 01:57 AM.