Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

localhost in IO::Socket::INET #5351

Closed
p6rt opened this issue May 29, 2016 · 7 comments
Closed

localhost in IO::Socket::INET #5351

p6rt opened this issue May 29, 2016 · 7 comments

Comments

@p6rt
Copy link

p6rt commented May 29, 2016

Migrated from rt.perl.org#128289 (status was 'rejected')

Searchable as RT128289$

@p6rt
Copy link
Author

p6rt commented May 29, 2016

From @MARTIMM

Hi,

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 127.0.0.1 (checked with dig)
  * The firewall is not blocking, checked by turning it off.
  * On the system with the error I've changed 'localhost' into 127.0.0.1
  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.

@p6rt
Copy link
Author

p6rt commented May 29, 2016

From @geekosaur

On Sun, May 29, 2016 at 1​:43 PM, mt1957 <perl6-bugs-followup@​perl.org>
wrote​:

* On both systems localhost translates to 127.0.0.1 (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

@p6rt
Copy link
Author

p6rt commented May 29, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented May 29, 2016

From @MARTIMM

On 05/29/2016 07​:47 PM, Brandon Allbery via RT wrote​:

getent hosts

getent hosts on faulty system
127.0.0.1 localhost localhost.localdomain localhost4
localhost4.localdomain4
127.0.0.1 localhost localhost.localdomain localhost6
localhost6.localdomain6

On ok system. It differs only in the second line

127.0.0.1 localhost localhost.localdomain localhost4
localhost4.localdomain4
127.0.0.1 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.

Thanks,

Marcel

@p6rt
Copy link
Author

p6rt commented May 29, 2016

From @smls

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

@p6rt
Copy link
Author

p6rt commented May 30, 2016

From @MARTIMM

Hi,
Yes you can close it.

Thanks,
Marcel

On May 29, 2016 10​:32​:16 PM "Sam S. via RT" <perl6-bugs-followup@​perl.org>
wrote​:

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

@p6rt p6rt closed this as completed May 30, 2016
@p6rt
Copy link
Author

p6rt commented May 30, 2016

@smls - Status changed from 'open' to 'rejected'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant