Note that there are some explanatory texts on larger screens.

plurals
  1. POPerl LWP::UserAgent request does not return using http1.1 but working fine using http1.0!? Why?
    primarykey
    data
    text
    <p>I have a very simple script (on a SLES11 system) to send a http1.1 request to a server. This worked fine for a long time. Since a couple of days it stopped working. I have no idea why. After some investigation I found out forcing the script to use http1.0 it is working again. I have no idea why. And I want to know why it is not working in its default http1.1 mode.</p> <p>I already enabled debugging as much as I know it (see code below). But I do not see anything - my script just hangs. There is no network activity. I neiter see that a socket will be openend (netstat -a), nor I see any incoming traffic form my client on the server. (A "telnet myserver myport" works fine.)</p> <p>Can someone please help me how to track down this problem? How can I enable more debug to see where the real problem is?</p> <pre><code>#!/usr/bin/perl -w use strict; use warnings; use Data::Dumper; use HTTP::Request::Common; use LWP::Debug qw(+); use LWP::UserAgent; # Workaround: forcing http1.0 instead of using http1.1, it works again! use LWP::Protocol::https10 (); LWP::Protocol::implementor('https', 'LWP::Protocol::https10'); # EO workaround my $ua = LWP::UserAgent-&gt;new; $ua-&gt;ssl_opts( verify_hostname =&gt; 0 ); my $response = $ua-&gt;request( POST 'https://myuser:mypassword@myserver:8888/service/myservice', Connection =&gt; 'close', # Edit: added, see comments below Content_Type =&gt; 'text/xml', Content =&gt; '... my content ...' ); </code></pre> <p>$ua->request() does not return! I need to kill/^C the script!</p> <p>Edit: ok, no one seems to have an idea how to continue. So I startet debugging it using perl debugger.</p> <pre><code>LWP::UserAgent::post(/usr/lib/perl5/site_perl/5.10.0/LWP/UserAgent.pm:418): 418: return $self-&gt;request( HTTP::Request::Common::POST( @parameters ), @suff ); </code></pre> <p>So I can see it is not returning from request().</p> <p>Anyway, due to the fact that <code>LWP::UserAgent</code> calls <code>HTTP::Request::Common</code> I changed my example code above back to use <code>HTTP::Request::Common</code> to skip that step while debugging.</p> <p>Ok... New result:</p> <pre><code>LWP::Protocol::implementor(/usr/lib/perl5/site_perl/5.10.0/Net/HTTPS.pm:26): 26: eval { require IO::Socket::SSL; }; </code></pre> <p>Inside request() it hangs at <code>IO::Socket::SSL</code>. Means, this <em>script</em> it enough for further debug:</p> <pre><code>#!/usr/bin/perl require IO::Socket::SSL; </code></pre> <p>This statement does not come back.</p> <p>Further down, inside <code>IO::Socket::SSL</code> it hangs at:</p> <pre><code>IO::Socket::SSL::CODE(0x1274370)(/usr/lib/perl5/site_perl/5.10.0/IO/Socket/SSL.pm:92): 92: Net::SSLeay::SSLeay_add_ssl_algorithms(); </code></pre> <p>Ahhhh! There is already a bugreport concerning this issue: <a href="https://rt.cpan.org/Public/Bug/Display.html?id=83890" rel="nofollow">Net-SSLeay hangs on Suse 11 P2</a> pointing to <a href="https://rt.cpan.org/Public/Bug/Display.html?id=81575" rel="nofollow">Bug #81575</a> that says:</p> <blockquote> <p>I enountered this same issue on SLES 11 SP2, which has openssl-0.9.8j installed. An upgrade to openssl-0.9.8r did resolve the problem. ... The packages for 0.9.8r can be found in this repository: <a href="http://download.opensuse.org/repositories/security:/fips/" rel="nofollow">http://download.opensuse.org/repositories/security:/fips/</a></p> </blockquote> <p>Guess that's it!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload