twotone has asked for the wisdom of the Perl Monks concerning the following question:
I have been pulling my hair out for a couple of days trying to find out why my perl program on a remote server wasn't able to connect to my webserver's ip with a non-stadard port specified, such as:
code snippet: $response = $ua->post("https://123.321.123.321:4430/scripts/my_script. +cgi", [%parameters]);
The $response->content from this unsuccessful attempt was: 500 Can't connect to 123.321.123.321:4430 (connect: timeout)
So, I tried changing the port forwarding so the standard ports 443/80 are forwarded to my webserver and WAS SUCCESSFUL with no port specified:
code snippet: $response = $ua->post("https://123.321.123.321/scripts/my_script.cgi", + [%parameters]);
Now the interesting thing is that running the requesting program from my test machine (Windows) I was able to connect BOTH ways successfully, but from my "live" machine (ISP - Linux) I can only connect to the standard port 80 with no port specified in the url. So, can anyone tell me why this is the case? I did some searching online and found references to a bug in Linux and/or IO::Socket on Linux that may cause this problem, but it wasn't clear to me. Any further enlightenment would be great. I would really prefer to run the webserver to which I am connecting for this task behind ports 4430/8080, not ports 443/80.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: LWP connect timeout only occurs with a port specified
by Sewi (Friar) on Sep 13, 2009 at 08:48 UTC | |
Re: LWP connect timeout only occurs with a port specified
by Gangabass (Vicar) on Sep 13, 2009 at 07:34 UTC |