Actions
action #1986
closedLWP::Useragent doesn't fallback to IPv4
Added by dheidler over 10 years ago. Updated over 6 years ago.
Start date:
2014-03-26
Due date:
% Done:
0%
Estimated time:
Updated by dheidler over 10 years ago
The problem does appear on my machine but eg. not on innoko.
The problem is LWP::UserAgent, which doesn't work on hosts with dualstack support but without ipv6 connectivity.
strace -f -econnect /tmp/r.pl
connect(4, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
connect(3, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
connect(3, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.120.2.88")}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("130.57.66.6")}, 16) = 0
connect(3, {sa_family=AF_INET6, sin6_port=htons(443), inet_pton(AF_INET6, "2600:806:310::100", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
connect(3, {sa_family=AF_INET6, sin6_port=htons(443), inet_pton(AF_INET6, "2600:806:310::100", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 EINPROGRESS (Operation now in progress)
connect(3, {sa_family=AF_INET6, sin6_port=htons(443), inet_pton(AF_INET6, "2600:806:310::100", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 ECONNREFUSED (Connection refused)
500 Can't connect to www.opensuse.org:443 (Verbindungsaufbau abgelehnt) at /tmp/r.pl line 22.
+++ exited with 111 +++
on innoko:
strace -f -econnect /tmp/r.pl
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("130.57.66.6")}, 16) = -1 EINPROGRESS (Operation now in progress)
connect(3, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("130.57.66.6")}, 16) = 0
OK
+++ exited with 0 +++
my testscript:
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
my $user_agent = LWP::UserAgent->new;
my $request = HTTP::Request->new(GET => "https://www.opensuse.org/openid/user/");
my $response = $user_agent->request($request);
if ($response->is_success) {
print "OK\n";
} else {
die($response->status_line);
}
Updated by dheidler over 10 years ago
- Subject changed from Get Net::OpenID::Consumer 1.15 working to LWP::Useragent doesn't fallback to IPv4
- Description updated (diff)
Updated by oholecek almost 10 years ago
This again hit me (and Vladimir) when IPv6 route broke. Should I just make it to strictly use IPv4 or look for different UA to use with OpenID?
Updated by coolo almost 8 years ago
- Status changed from New to Closed
this can get older on a different bug tracker
Actions