Find the answer to your Linux question:
Results 1 to 3 of 3
Hello all, My simple client server application using socket is failing, (Client is failing to be precise) connect system call is failing. "connect: Permission denied" . My server is listening ...
  1. #1
    Just Joined!
    Join Date
    Feb 2008
    Posts
    1

    "connect: Permission denied" connect system call fails for a simple client server app

    Hello all,

    My simple client server application using socket is failing, (Client is failing to be precise)
    connect system call is failing.
    "connect: Permission denied" . My server is listening on port 31512, and client is trying to connect to that port. I am running both client and server on same PC.
    I have opened that port also using firewall settings. Do I need to do some thing else also.??

  2. #2
    Linux Newbie
    Join Date
    Nov 2007
    Location
    Planet Earth
    Posts
    152
    try:
    Code:
    telnet localhost 31512
    to see if the port is really open to connections.

    BTW, you should use port numbers up to 49152 (but for local purposes, of course there's no problem)
    EOF

  3. #3
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    I'm presuming that you wrote the client yourself. When you get the error return from connect(), then
    1. What is the exact value of the number returned by the connect() system call itself?
    2. Immediately after the errored call to connect(), what is the numerical value of errno?
    --
    Bill

    Old age and treachery will overcome youth and skill.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...