Join GitHub today
Hostname Invalid Output #1764
Digital Ocean 1GB Droplet
hostname -s is expected to return the original hostname if no short version is found
Type hostname -s
I'm unable to reproduce the issue on the latest Alpha.
Could you try again?
There are a number of ways this can be fixed.
Update /etc/nsswitch.conf's "hosts" line to be the following:
This will allow
It's possible this should be the default on Container Linux and we just haven't bothered to make it so yet.
Appending "$public_ip4 $my_hostname" to
Actual valid dns
This one won't work on DO necessarily, but I solve this for myself by running a dns resolver for my VMs which contains a mapping of ip<->hostname and can resolve those locally.
Hopefully one of those things helps.