# New Ticket Created by mt1957
# Please include the string: [perl #128289]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=128289 >


A subtle problem. Golfed down to;

my IO::Socket::INET $sock;
$sock .= new( :host<localhost>, :port(65010));

Error thrown
Failed to connect: connection refused
    in block <unit> at Tests/sock.pl6 line 8

   * On my laptop it works without error as well as on Travis-ci. On
     another system with the same linux distribution and version, it
     gives the above error.
   * On both systems localhost translates to (checked with dig)
   * The firewall is not blocking, checked by turning it off.
   * On the system with the error I've changed 'localhost' into
     after which no error is thrown.

perl version on systems are 2016.05-31-g0873fd7 (on ok system) and
2016.05-25-gc5dfd77. On other curious thing is both systems say that
they are `Already up-to-date` using git pull while versions differ.

Search Discussions

  • Brandon Allbery at May 29, 2016 at 5:47 pm

    On Sun, May 29, 2016 at 1:43 PM, mt1957 wrote:

    * On both systems localhost translates to (checked with dig)

    Note that dig only tells you what DNS returns, not what a query through NSS
    returns; use "getent hosts" for that. In particular, it will not tell you
    how /etc/hosts affects things.
    (I would suspect that, on the failing system, localhost first resolves to
    ::1 and IPv6 is not configured.)

    brandon s allbery kf8nh sine nomine associates
    allbery.b@gmail.com ballbery@sinenomine.net
    unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
  • Mt1957 at May 29, 2016 at 6:07 pm

    On 05/29/2016 07:47 PM, Brandon Allbery via RT wrote:
    getent hosts
    getent hosts on faulty system localhost localhost.localdomain localhost4
    localhost4.localdomain4 localhost localhost.localdomain localhost6

    On ok system. It differs only in the second line localhost localhost.localdomain localhost4
    localhost4.localdomain4 localhost6 localhost6.localdomain6

    I've removed the localhost localhost.localdomain part from the second
    line in /etc/hosts and after that the test went ok. So this was really a
    quick fix.


  • Marcel Timmerman at May 30, 2016 at 7:31 am
    Yes you can close it.


    On May 29, 2016 10:32:16 PM "Sam S. via RT" wrote:

    Does this mean that the current IO::Socket::INET bahavior is fine and the
    ticket can be closed?

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl6-compiler @
postedMay 29, '16 at 5:43p
activeMay 30, '16 at 7:31a



site design / logo © 2019 Grokbase