You are not logged in.

#1 2020-06-23 01:41:31

gxt25
Member
Registered: 2017-07-05
Posts: 21

hostname no longer resolving on LAN [SOLVED]

Greetings,
I have 2 workstations and 2 laptops on my LAN all running Arch. Using rsync and ssh/sshd I could remotely log in or move files from any of these machines to the others using each machine's hostname. I did not change any configuration but after some update or other one by one the hostnames no longer resolve and all I get for trying is

Could not resolve hostname *myhostname*: Name or service not known

If I determine the local ip address ssh and rsync still work and all other network functions such as accessing the internet work. It is just that hostnames no longer resolve. I initially set up for the hostname to resolve as per the wiki and installation guide and it worked fine for years.  I am not sure what to change as everything I've tried seems to already be set up correctly yet it doesn't work.

/etc/hosts is

127.0.0.1 localhost
::1            localhost
127.0.1.1 myhostname.localdomain myhostname

and also tried with the last line as

127.0.0.1 myhostname.localdomain myhostname

On the main workstation

sudo systemctl list-unit-files --state=enabled

returns

UNIT FILE 
org.cups.cupsd.path
atd.service 
autovt@.service
cronie.service
dhcpcd.service
display-manager.service
getty@.service
lightdm.service
mariadb.service
mysql.service
ntpd.service
numlock.service
org.cups.cupsd.service
saslauthd.service
sshd.service
org.cups.cupsd.socket
remote-fs.target

This main workstation is wired ethernet and its hostname was resolving until a loss of power in the building today. Afterwards it too suffers the hostname failing to resolve. The other three machines are wireless and lost the ability to have their hostname resolved sometime last week or two weeks ago. I use netctl. On one poor machine I flailed about in vain trying to switch from dhcpcd to dhclient, systemd-resolved, avahi and back... I am not really sure exactly which package upgrade is to blame since all this worked flawlessly for years up until a week or two ago and as far as I can tell from the docs, my system is (or at least was) configured correctly for hostnames to resolve.

I don't see any notes on the news page about manual intervention needed but it seems some update broke hostname resolution across the board (at least on all my systems). Any ideas other than the instructions in the installation guide for getting hostname to resolve - because those methods are no longer working for me.

Thank you

Last edited by gxt25 (2020-06-23 23:20:40)


In this world there are 10 types of people: those who understand binary and those who don't.

Offline

#2 2020-06-23 01:45:04

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 28,905
Website

Re: hostname no longer resolving on LAN [SOLVED]


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2020-06-23 02:51:45

gxt25
Member
Registered: 2017-07-05
Posts: 21

Re: hostname no longer resolving on LAN [SOLVED]

Thank you! I had looked at that page yesterday and tried some different configurations to no avail, but I've just now started and enabled systemd-resolved on both the wired workstation and one of the laptops and these two can now resolve each others hostnames again so I'll count this as a win for now even though I think I tried that yesterday to no avail. Maybe it was making sure both ends had systemd-resolved running that did the trick(?)

I still am fuzzy on what changed and if I missed an announcement since behavior changed on my systems without me making changes other than regular updates... Unless I missed a very recent change, hostname resolution from https://wiki.archlinux.org/index.php/Ne … resolution still says you can just edit /etc/hosts on every machine for it to work. For me at least, this does NOT work anymore.

EDIT - Just confirming that starting (and enabling) systemd-resolved on both ends of the interaction works on all my machines. Everyone is talking nice to each other again. Thanks again for the pointer Jason

Last edited by gxt25 (2020-06-23 23:19:48)


In this world there are 10 types of people: those who understand binary and those who don't.

Offline

Board footer

Powered by FluxBB