Project

General

Profile

action #1986

LWP::Useragent doesn't fallback to IPv4

Added by dheidler over 6 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Feature requests
Target version:
Start date:
2014-03-26
Due date:
% Done:

0%

Estimated time:
Difficulty:

History

#1 Updated by dheidler over 6 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);
}

#2 Updated by dheidler over 6 years ago

  • Subject changed from Get Net::OpenID::Consumer 1.15 working to LWP::Useragent doesn't fallback to IPv4
  • Description updated (diff)

#3 Updated by ancorgs over 6 years ago

  • Target version set to future

#4 Updated by coolo almost 6 years ago

  • Category set to 130

#5 Updated by oholecek over 5 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?

#6 Updated by RBrownSUSE over 4 years ago

  • Priority changed from High to Normal

#7 Updated by coolo almost 4 years ago

  • Status changed from New to Closed

this can get older on a different bug tracker

#8 Updated by okurz over 2 years ago

  • Target version changed from future to future

Also available in: Atom PDF