Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^2: 500 error with LWP:UserAgent

by RenardBleu (Sexton)
on Nov 04, 2014 at 12:42 UTC ( #1106018=note: print w/replies, xml ) Need Help??

in reply to Re: 500 error with LWP:UserAgent
in thread 500 error with LWP:UserAgent

Hi there,

I tried your modification and it didnt change my case.

I use
perl v5.14.2
LWP::UserAgent v6.06
HTTP::Request v6.00
IO::Socket::SSL 1.955

use Net::SSLeay; $Net::SSLeay::trace = 2;

as suggested on stackoverflow : produced the output
DEBUG: .../IO/Socket/ socket not yet connected DEBUG: .../IO/Socket/ socket connected DEBUG: .../IO/Socket/ ssl handshake not started DEBUG: .../IO/Socket/ using SNI with hostname sis-t.redsys. +es DEBUG: .../IO/Socket/ set socket to non-blocking to enforce + timeout=10 DEBUG: .../IO/Socket/ ssl handshake in progress DEBUG: .../IO/Socket/ waiting for fd to become ready: SSL w +ants a read first DEBUG: .../IO/Socket/ handshake failed because socket did n +ot became ready Error: 500 Can't connect to

Replies are listed 'Best First'.
Re^3: 500 error with LWP:UserAgent
by Loops (Curate) on Nov 04, 2014 at 13:47 UTC

    Well it's a puzzle for sure. I installed Perl and those modules with the same version you have, and it just worked with the updated code. The old code gave the same Net::SSLeay debug output as yours. There is some underlying difference between our setups obviously.

    There's a chance that changing the SSL version to this would help:

    SSL_version => 'TLSv1:!TLSv11:!TLSv12:!SSLv2:!SSLv3'

    The last two components are supposedly redundant. But in any case, that long version string wasn't needed here (with any of 3 machines).

    Update: Just as a debugging step, try adding random garbage to the string you pass into SSL_version. You should expect the following error, otherwise something is up in Denmark:

    Error: 500 invalid SSL_version specified
      May i ask for your perl -MIO::Socket::SSL -e 'print "$IO::Socket::SSL::VERSION\n"' version please ?

      I just was able to test on a machine with
      perl 5.14.2
      LWP:User::Agent 6.04
      IO::Socket::SSL 1.76
      Net::SSLeay 1.48 (while mine is 1.55)
      and it just worked fine (exact same code, I scp-ed it)

        Well I configured one machine as yours to test:

      • LWP::UserAgent : 6.06
      • IO::Socket::SSL : 1.955
      • Net::SSLeay : 1.66
      • Just retried with SSLeay @ 1.55, still works fine.

        This is all testing with Perl 5.14.2 to stay as close to yours as possible. However, it may well be the underlying OpenSSL version. All the machines here are Fedora 20 boxen.. with:


        Would be interesting to see if your two machines have separate versions. By the way, on the machine that works for you, maybe give it a go with and without the SSL_version parameter.

      One good news, one bad.

      Good news is we dont need to disturb Denmark government, i achieved the 500 invalid SSL_version specified with SSL_version='Garbage'

      Bad news is changing the SSL_version doesnt solve my problem at all.

      Could it be due to perl version ? (I cant change mine here :/)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1106018]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2022-07-04 00:05 GMT
Find Nodes?
    Voting Booth?

    No recent polls found