thoeniv has asked for the wisdom of the Perl Monks concerning the following question:

code:
use IO::Socket; my $server = IO::Socket::INET->new( PeerAddr = 'peer's ip address', PeerPort = 5050, Proto = 'tcp' ) or die "Can't create client socket: $!";
When I use this to create a client socket on the same server as the server socket, it works fine. When I try to open the client socket from another server on the same network it dies with the error message: Can't create client socket: No such file or directory. Any thoughts?

Replies are listed 'Best First'.
Re: Error opening socket!
by perlplexer (Hermit) on Apr 18, 2002 at 16:51 UTC
    Firewall of some sort maybe?
    Try to telnet to that host; e.g., telnet 10.1.2.3 5050
    See if you can get through...

    --perlplexer
      Telnet works! I'm on the same subnet as the server, so I don't think its a firewall issue.
Re: Error opening socket!
by dws (Chancellor) on Apr 18, 2002 at 18:02 UTC
    If you're on an NT/Win2K box and are trying to do this from a CGI, you might have a permission problem. I'm not anywhere near an NT box right now, but recall that I had to do something regarding changing the user that IIS ran under, or that user's permission, to make this work.