Choose style:

Author Topic: cant resolve LAN hosts (SOLVED)  (Read 554 times)

0 Members and 1 Guest are viewing this topic.

Offline theedude

  • nOOb
  • *
  • Posts: 12
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
cant resolve LAN hosts (SOLVED)
« on: March 28, 2019, 05:54:27 pm »
This machine unable to ping/ssh to local hosts by hostname (works fine via IP). All my other machines can ping local hostnames normally. In the Network Manager gui, I have my dns server in there but doesn't seem to be working.

This is what I'm getting:

Code: [Select]
root@myserver:~# ping dsnas
PING dsnas(localhost (::1)) 56 data bytes
64 bytes from localhost (::1): icmp_seq=1 ttl=64 time=0.059 ms
64 bytes from localhost (::1): icmp_seq=2 ttl=64 time=0.087 ms

Code: [Select]
root@myserver:~# cat /etc/resolv.conf 
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0
search localhost

I see that it says 127.0.0.53 for nameserver, but I'm not sure where it's pulling that from.
« Last Edit: March 28, 2019, 08:10:47 pm by theedude »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25327
  • Karma: 2794
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: cant resolve LAN hosts
« Reply #1 on: March 28, 2019, 06:40:23 pm »
Does setting IPv6 in networkmanager to "Ignore" make any difference ?
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline theedude

  • nOOb
  • *
  • Posts: 12
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: cant resolve LAN hosts
« Reply #2 on: March 28, 2019, 06:51:55 pm »
It does not.

Offline theedude

  • nOOb
  • *
  • Posts: 12
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: cant resolve LAN hosts
« Reply #3 on: March 28, 2019, 08:10:29 pm »
Ok I was able to fix it. Not sure if its a true fix or a workaround but all seems ok right now.

I was comparing systemctl services against my other machines and noticed systemd-resolved.service was inactive on my Debian systems and was running on Peppermint. So I stop/disabled it and manually configured resolv.conf with my dns server and bam! I can ping local hostnames again! and it survived reboot.

Online VinDSL

  • Global Moderator
  • Hero
  • *****
  • Posts: 5192
  • Karma: 939
  • Peppermint Mod
    • View Profile
  • Peppermint version(s): Developmental Builds
Re: cant resolve LAN hosts
« Reply #4 on: March 28, 2019, 08:54:58 pm »
Ok I was able to fix it. Not sure if its a true fix or a workaround but all seems ok right now.

I was comparing systemctl services against my other machines and noticed systemd-resolved.service was inactive on my Debian systems and was running on Peppermint. So I stop/disabled it and manually configured resolv.conf with my dns server and bam! I can ping local hostnames again! and it survived reboot.

Interesting.

I guess you found the real resolv.conf, eh?

'/etc/resolv.conf' is just a symlink, and I broke it last week, in the middle of the night, fooling around with Stubby.

Took me a couple of hours to reverse-engineer everything, and point it to the real one. LoL  ;D


Extra Credit Reading (between the lines}:
« Last Edit: March 29, 2019, 01:07:22 am by VinDSL, Reason: Addendum »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25327
  • Karma: 2794
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: cant resolve LAN hosts (SOLVED)
« Reply #5 on: March 29, 2019, 05:49:42 am »
Nice, thanks for providing your solution :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline theedude

  • nOOb
  • *
  • Posts: 12
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: cant resolve LAN hosts (SOLVED)
« Reply #6 on: March 29, 2019, 08:33:01 am »
@VinDSL - I had never heard of stub dns stuff before, and the resolve service is new to me, I need to do some reading on it. Thanks for those links! Yes, I'm actually used to always using resolv.conf. All our machines at work, and mine at home, have NetworkManager disabled, and I manually setup the network files, (interfaces on deb, and ifcfg- on centos) and manually edit resolv.conf. Its the way I was taught by my mentor. Maybe its old school, but I'm just used to it. Hey, at least I'm sure you learned a lot in that process of the reverse engineering! =)

@PCNetSpec You're welcome. Hope it can help someone reading this!  8)

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25327
  • Karma: 2794
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: cant resolve LAN hosts (SOLVED)
« Reply #7 on: March 29, 2019, 08:51:24 am »
It was a weird issue, and not one I'd come across before. My systems don't have any problems resolving by hostname but then I'm just using my router as the DNS.

It was kinda odd that yours was seeming to resolve dsnas to localhost :-\

did it refuse to resolve ALL hostnames, or just dsnas ? .. and did they ALL resolve to localhost ?

If it was something your DNS was doing (ie. returning 'localhost' somehow), I wonder if a simple alias in hosts would have fixed things .. it might at least have shown if the problem lay in what was being returned by the DNS (if 'localhost' was still returned).

I may be totally off-track here though, and it still wouldn't explain why Debian got it right ???
« Last Edit: March 31, 2019, 08:32:26 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline theedude

  • nOOb
  • *
  • Posts: 12
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: cant resolve LAN hosts (SOLVED)
« Reply #8 on: March 30, 2019, 11:50:21 pm »
@PCNetSpec Your reply remineded me that I had actually added entries to my host file. That's why I was able to ping and not because it was reading my resolv.conf file. Apparently I did not fix it. LOL. As a test just now,  I commented them out and couldn't ping by hostname again. *facepalm

Anyway, I restarted the resolve service and uncommented my host entries. and its working fine like that. so I'll leave it alone for now.

Jeez...

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25327
  • Karma: 2794
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: cant resolve LAN hosts (SOLVED)
« Reply #9 on: March 31, 2019, 08:30:12 am »
Great stuff, at least you got it working which is the main thing :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec