I am attempting to use LWP to connect to a https url and have run into a problem.
Whenever trying to contact any SSL server other than the one on the same machine, the SSL negotiation fails with:
500 SSL negotiation failed:; Resource temporarily unavailable at /usr/local/lib/perl5/site_perl/5.6.0/sparc64-linux/Net/SSL.pm line 138.
The machine in question is not using a proxy and 443 is not being blocked by the firewall
which I verified by telneting to various known web servers at 443 from the machine in question.
I tested it against another server here and the request never even hits the server so this leads me to believe there
is a problem on the socket level. The machine in question is a sparc running linux and it wouldn't be the first time
I have encountered a problem with LWP. (After upgrading last year to a newer rev of LWP, all LWP::Simple::get()'s (and only get) would
mysteriously fail unless you prepended a space to the url. !?! The newest version of LWP does not have this problem, btw)
I've gone through the various modules socket modules used by LWP to troubleshoot but I must admit, it's beyond me.
I guess my question is this, when specifying an Internet style socket, are requests that are addressed to the originating machine
handled any differently internally than requests that are addressed to a different IP?
If anyone has a suggestion as to where to start looking for the problem or any suggestions, your help would be very appreciated.
#!/usr/bin/perl
use LWP;
use LWP::Debug qw(+);
use LWP::UserAgent;
use LWP::Protocol::https;
my $connect = new LWP::UserAgent;
my $request = new HTTP::Request 'GET', 'https://www.thawte.com';
my $response = $connect->request($request);
print $response;
print $response->content;
print $response->as_string;
OUTPUTS
LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::simple_request: GET https://www.thawte.com/
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::UserAgent::request: Simple response: Internal Server Error
HTTP::Response=HASH(0x38994c)500 (Internal Server Error)
SSL negotiation failed:; Resource temporarily unavailable at /usr/local/lib/perl5/site_perl/5.6.0/sparc64-linux/Net/SSL.pm line 138.
Client-Date: Tue, 10 Jul 2001 02:50:11 GMT
-Lee
"To be civilized is to deny one's nature."
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.