The /etc/resolv.conf problem comes back

,

Hardware: ARM board
YunoHost version: 4.1.7.3
I have access to my server : Through SSH | through the webadmin

Hello!

I installed Yunohost, and the Diagnosis tool gave me this:

DNS resolution seems to be working, but it looks like you're using a custom /etc/resolv.conf.

    The file /etc/resolv.conf should be a symlink to /etc/resolvconf/run/resolv.conf itself pointing to 127.0.0.1 (dnsmasq). If you want to manually configure DNS resolvers, please edit /etc/resolv.dnsmasq.conf.

I found this issue was already reported and solved in the forum, so I applied @Aleks’ solution and it worked great.

The day after I found the problem was there again. I was not sure if I applied Aleks’ solution correctly, so I reapplied it and everything worked great again.

But not that great, because today I see the problem remains there!

Maybe the solution does not survive a reboot. Because these days I have been rebooting the system.

How could I have a permanent solution?

Thank you.

Zblerg

can you tell what ARM board you’re running and if you used the pre-installed image or some external armbian image ?

Wow, it seems like you already know my setup!

It’s a Lime2. Armbian installed manually. Then I manually installed Yunohost.

Hmmmokay and what’s the content of /etc/resolv.conf when the issue shows up again ?

(Using for example: cat /etc/resolv.conf)

peer@ynh:~$ cat /etc/resolv.conf
# Generated by NetworkManager
search lan mydomain.tld
nameserver (one IPv4 address here)
nameserver (one IPv4 address here)
nameserver (one IPv4 address here)
# NOTE: the libc resolver may not support more than 3 nameservers.
# The nameservers listed below may not be recognized.
nameserver (one IPv4 address here)
nameserver (one IPv4 address here)
nameserver (one IPv6 address here)
nameserver (one IPv4 address here) 

Ah I see … that’s goddamn NetworkManager messing with the file …

Naively I would uninstall it … not sure what’s the package name, maybe network-manager, so : apt remove network-manager

Or if that’s not the right name, let’s find it with dpkg --list | grep -i manager

Done. Thank you very much Aleks!!

Do you know about any other thing I should pay attention to because of the manual installation?

@Aleks Things got worse… I rebooted to check if the solution keeps permanent and… it happened: I don’t have network now.

The leds of the network interface are off.

I tried to use the HDMI connection: no success.

Hmpf …

If you are comfortable with mounting sd cards and stuff, you could try mounting the sd card on your computer and adding this content in the /etc/network/interfaces.d/eth0.conf of the card (i believe the file doesnt exist already, it should be created) :

auth eth0
allow-hotplug eth0
iface eth0 inet dhcp

Thank you.

I did another thing, I got in through serial.

This is what I have:

admin@ynh:/etc/network$ ls -hal
total 36K
drwxr-xr-x   7 root root 4.0K Mar  6 14:56 .
drwxr-xr-x 113 root root 4.0K Mar  9 01:17 ..
drwxr-xr-x   2 root root 4.0K Mar  6 18:56 if-down.d
drwxr-xr-x   2 root root 4.0K Mar  6 18:55 if-post-down.d
drwxr-xr-x   2 root root 4.0K Mar  5 15:30 if-pre-up.d
drwxr-xr-x   2 root root 4.0K Mar  6 18:56 if-up.d
-rw-r--r--   1 root root  106 Mar  6 14:56 interfaces
drwxr-xr-x   2 root root 4.0K Jan 28  2019 interfaces.d
-rw-r--r--   1 root root  106 Feb 14 22:04 interfaces.default
admin@ynh:/etc/network$ 
admin@ynh:/etc/network$ ls -hal interfaces.d
total 8.0K
drwxr-xr-x 2 root root 4.0K Jan 28  2019 .
drwxr-xr-x 7 root root 4.0K Mar  6 14:56 ..
admin@ynh:/etc/network$ 
admin@ynh:/etc/network$ cat interfaces
source /etc/network/interfaces.d/*
# Network is managed by Network manager
auto lo
iface lo inet loopback
admin@ynh:/etc/network$ 
admin@ynh:/etc/network$ cat interfaces.default 
source /etc/network/interfaces.d/*
# Network is managed by Network manager
auto lo
iface lo inet loopback
admin@ynh:/etc/network$ 

So, should I add that eth0.conf as suggested?

I added the file as you suggested, but I guess I’m doing something wrong:

root@ynh:/etc/network/interfaces.d# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 02:01:0a:82:a6:e4 brd ff:ff:ff:ff:ff:ff
root@ymh:/etc/network/interfaces.d# 
root@ynh:/etc/network/interfaces.d# ifup eth0
ifup: /etc/network/interfaces.d/eth0.conf:1: misplaced option
ifup: unknown interface eth0
root@ynh:/etc/network/interfaces.d# 

Solved!! There was just a typo there! I changed auth into auto.

And I have checked the DNS thing keeps solved too.

Anyway, if something comes up to your mind that I should check because of the manual installation I did, please let me know…

Thank you very much again!

Hhmmm not really but I would naively ask why you ended up doing a manual install rather than using the preinstalled image :stuck_out_tongue_winking_eye: (I have a few guesses)

Yes, that’s the right question. The answer is I wanted to have the system encrypted and remotely unlockable.

I mean having Dropbear in its unencrypted boot partition. So when the board boots I can remotely access it to enter the passphrase which unencrypts the root partition to completely boot the system.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.