Install on Debian Jessie: Name resolution issue

imrazor

Member
Nov 3, 2015
40
0
6
I'm trying to set up Proxmox with Debian 8 on a laptop to create a mobile lab running a few Windows servers.

I went ahead and tried to set it up on Debian 8 with these instructions:

EDIT: Can't post links. Google "install proxmox on debian jessie" to get the link.

However, I’ve hit a snag. I replaced this line in /etc/hosts:

127.0.1.1 debm6400

With this one:

192.168.1.22 debm6400

and made sure that hostname wasn’t on any other line. However, I get this when I run getent

$ getent hosts $(hostname)
::1 debm6400

However, looking it up by IP address works correctly.

$ getent hosts 192.168.1.22

192.168.1.22 debm6400

The “::1” result sure looks like IPv6 (which I'm not at all familiar with) and I’m not really sure what the getent command does. Looking at the man page, it looks like I might need to edit nsswitch.conf and put files ahead of dns. Or maybe I need to just rip IPv6 out by the roots. Do I really need an FQDN? Should I just ignore this discrepancy and proceed with installation?
 
/etc/nsswitch.conf :

Code:
passwd:         compat
group:          compat
shadow:         compat
gshadow:        files

hosts:          files myhostname mdns4_minimal [NOTFOUND=return] dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

Output of:
Code:
$ grep "::1" /etc/hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
 
/etc/nsswitch.conf :

Code:
passwd:         compat
group:          compat
shadow:         compat
gshadow:        files

hosts:          files myhostname mdns4_minimal [NOTFOUND=return] dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

Output of:
Code:
$ grep "::1" /etc/hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
Hi,
use this in nsswitch.conf:
Code:
hosts:          files mdns4_minimal [NOTFOUND=return] dns
and this in hosts
Code:
127.0.0.1       localhost
::1     ip6-localhost ip6-loopback
Udo
 
Thanks, Udo, worked like a charm. I wonder how "myhostname" got into nsswitch.conf. It's a new, vanilla install of Debian 8.

Thanks again.