Closed kevinkjt2000 closed 3 years ago
(Dammit... that specific test (16) has caused me more headache than the whole remainder of the 40_server.t suite...)
Can you tell me your platform and Perl version that you're using? The initial test that fails (16) is just because I'm not IPv6-aware in the test. But the failures of 35 and 41 might be a bigger problem.
Arch Linux 4.14.6-1-ARCH x86_64 GNU/Linux
This is perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-thread-multi
Copyright 1987-2017, Larry Wall
There seems to be a problem with the ipv6 loopback notation in /etc/hosts. When commented out the error does not occur (tested on my arch machine)
What about checking if either localhost style regex matches or if http://search.cpan.org/~manu/Net-IP-1.25/IP.pm#ip_is_ipv4 or http://search.cpan.org/~manu/Net-IP-1.25/IP.pm#ip_is_ipv6 is true?
I suppose that much more than just validating string addresses is needed for IPv6 compatibility.
(Sorry, been on vacation and away from email)
Those are good suggestions. When I get some spare cycles I'll look at them.
I hand-crafted a quick patch by adding the ipv6 loopback address to the @allhosts
array but that doesn't solve the whole problem.
All I did is to change line 175 to
my @allhosts = ($local_ip, '\[::1\]', $localhostinfo[0], split q{ } => $localhostinfo[1]);
This reduces the first part of the error
t/40_server.t ................... 16/91
# Failed test 'RPC::XML::Server::url method (set)'
# at t/40_server.t line 188.
# 'http://[::1]:41259/'
# doesn't match '(?^:http://(127[.]0[.]0[.]1|localhost|localhost[.]localdomain):41259)'
but has nothing to do with the other parts.
It seems that the other parts of (at least) this file doesn't work correctly for ipv6 addresses (at least [::1]
).
In the meantime, I also tried deleting the ipv6 line from /etc/hosts
and this "solved" the problem.
@renyuneyun looking at your output, you didn't add it correctly. The doesn't match string there doesn't contain the ::1
And I don't think it needs the []
either, it should be a literal to compare to (like localhost)
I just ran into this today, disabling IPv6 on the lo device worked well, but it's not exactly optimal either
I don't speak Perl, but I encountered this bug today and found this CPAN bug report which is about the same issue and has a patch attached. https://rt.cpan.org/Public/Bug/Display.html?id=120472
I have addressed this in the most-recent release (0.81), uploaded to CPAN this evening.
I was trying to install the CPAN package as part of https://aur.archlinux.org/packages/perl-rpc-xml/ (which I need to compiler docker-git ultimately), but I ran into this error:
I am not absolutely certain this is the correct repository to report this to, because perl package tests seem to fail often due to upstream changes from what little experience I have with CPAN.