[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] winediag:getaddrinfo Failed to resolve your host name IP
From: |
Vadim Zeitlin |
Subject: |
Re: [lmi] winediag:getaddrinfo Failed to resolve your host name IP |
Date: |
Sun, 14 Aug 2022 22:43:29 +0200 |
On Sun, 14 Aug 2022 16:59:42 +0000 Greg Chicares <gchicares@sbcglobal.net>
wrote:
GC> Since upgrading from DSL to fiber the other day, I get this
GC> when running any command that involves 'wine':
GC> 002c:err:winediag:getaddrinfo Failed to resolve your host name IP
[I've started explaining how could this arise, but then I realized that
you've already solved this problem, so I'll skip my discussion of
/etc/nsswitch.conf]
GC> There are two problems here.
GC>
GC> (1) The 'wine' error is due to a change in the last octet of the
GC> new router address.
I don't understand how could this be relevant...
GC> The same problem occurs in a freshly-entered instance of the same
GC> chroot. And it's not actually specific to 'wine': 'curl' is also
GC> affected, inside the chroot:
GC>
GC> $ curl https://git.savannah.nongnu.org:443
GC> curl: (6) Could not resolve host: git.savannah.nongnu.org
This isn't the same problem: the latter is "just" DNS not working, which
could be either due to /etc/resolv.conf being wrong (most likely) or a
communication problem with the DNS server, while getaddrinfo() should be
using /etc/hosts if "files" is present in nsswitch.conf and so should work
even without DNS.
GC> Editing the chroot's '/etc/hosts', I add a line taken from the
GC> host system's '/etc/hosts':
GC>
GC> 127.0.0.1 localhost
GC> +127.0.1.1 $(hostname).$(dnsdomainname) $(hostname)
This should indeed be enough for getaddrinfo() to work.
GC> and now 'wine' commands work as expected,
Ah, I should have read read the entire message before starting to reply.
So yes, this is indeed enough for getent, and hence getaddrinfo(), to work.
GC> So, even though the 'wine' problem seems to have been fixed, in the
GC> chroot I can't even do this:
GC>
GC> $ git fetch
GC> fatal: unable to look up git.savannah.nongnu.org (port 9418) (Temporary
failure in name resolution)
But not for DNS. Please check your /etc/resolv.conf contents too, it's
highly likely that you have a hardcoded IP which doesn't work any longer
there. You can put 8.8.8.8 (Google) or 1.1.1.1 (Cloudflare) there at least
temporarily for testing -- or maybe even permanently if you don't dislike
using these DNS servers more than using your ISP's one.
GC> I guess my next step will be to create a new chroot.
I hate DNS too, but this would really be an overkill...
Good luck,
VZ
pgpKz8pPeM0k4.pgp
Description: PGP signature