Just a guess, from memory of a similar experience: Do you have some "non-standard" server certificate, e.g. issued by an inhouse CA? If so, maybe there's an issue with the OCSP responder of that certificate. If IO::Socket::SSL can't retrieve an OCSP response, it can't proceed and will apparently hang until the server gives up and terminates the connection.

To isolate this problem, you can disable server certificate checking for testing only by setting SSL_verify_mode => SSL_VERIFY_NONE in the ssl_opts of your LWP user agent. If the problem persists, remove that insecure setting and look elsewhere; if the problem vanishes, examine the certificate: Maybe the OCSP URL can't be reliably received, or it uses a non-standard transport mechanism/port which is blocked by a firewall.


In reply to Re: Net::SSLeay::connect -> -1 by haj
in thread Net::SSLeay::connect -> -1 by bliako

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.