View the Most Wanted LQ Wiki articles.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 03-09-2007, 03:20 AM   #1
LQ Newbie
Registered: Mar 2007
Posts: 1

Rep: Reputation: 0
Unhappy 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??
Old 03-09-2007, 04:32 AM   #2
Registered: Dec 2005
Location: France
Distribution: Debian
Posts: 123

Rep: Reputation: 17


"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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot start vsftpd: 500 OOPS: could not bind listening IPv4 socket mr_scary Linux - Networking 2 01-25-2007 11:51 PM
Listening socket not released immediately Xagafinelle Programming 4 08-20-2004 05:28 PM
could not listen on UDP socket: address in use peaceofcrap2001 Linux - Networking 2 07-10-2004 12:18 PM
UDP server with socket listening on all IP addresses XTF Programming 0 06-04-2004 03:19 PM
Could not bind listening socket chabotrobert Linux - Networking 1 10-29-2003 12:36 PM

All times are GMT -5. The time now is 05:51 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration