in reply to Undefined address for Socket::pack_sockaddr_in

Walking up the call chain, it tries to resolve _DEFAULT_HOST(), which is localhost. Maybe localhost does not resolve to a good name for the chosen protocol? Maybe things work better if you explicitly supply a hostname, or a fixed IP address?

my $ff = Firefox::Marionette->new( host => '127.0.0.1', #host => 'localhost', #host => '::1', #host => 'hostname-of-the-machine', );

Maybe localhost only resolves for IPv4 (or IPv6) and pack_sockaddr_in tries to pack an address for IPv6 (or IPv4)...

Replies are listed 'Best First'.
Re^2: Undefined address for Socket::pack_sockaddr_in
by WithABeard (Beadle) on Jun 20, 2024 at 11:54 UTC

    You are right, "localhost" does not resolve:

    % perl -MSocket -e'defined inet_aton("localhost") or die;' Died at -e line 1.

    I forgot that I meddled with /etc/hosts trying to resolve a different issue, and I guess I didn't restore it

    Now that I have restored it, the error is gone.
    Strange that I did not get this problem until now, as it has been days since this meddling...