/etc/resolv.conf and "Symlink error"

:uk:/:us: Message template (english)

My YunoHost server

Hardware: VPS bought online @strato.de
YunoHost version: (stable)
I have access to my server : Through SSH | through the webadmin | direct access via keyboard: everything fine at that point!
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

I installed a new yunohost on my vps. This time I user another VPS-Provider. I managed so far good, but I m having a Error concerning DNS, that I m not sure about, what this might be. Sorry, but its in german.

DNS Auflösung scheint zu funktionieren, aber sei vorsichtig wenn du deine eigene /etc/resolv.conf verwendest.
Die Datei /etc/resolv.conf muss ein Symlink auf /etc/resolvconf/run/resolv.conf sein, welcher auf (dnsmasq) zeigt. Falls du die DNS-Resolver manuell konfigurieren möchtest, bearbeite bitte /etc/resolv.dnsmasq.conf.

I have no explanation. I tried my best to configure DNS as yunohost demanded. For my knowledge, I did not do any “strange tweaks”. I just installed Yunohost and ran diagnostics. As far as I understand: seems to be my localhost. But I can’t think of, what it has to do with my installation and DNS and my VPS… Hope someone can help. Thanks in advance!

Yeah it’s an annoying issue because many program in the Linux world want to take over the /etc/resolv.conf which defines which DNS resolver the system is using …

Let’s try to : ln -sf /etc/resolvconf/run/resolv.conf /etc/resolv.conf (possibly with sudo)

Hi! Thank you for your fast and kind answer!

I tried, what you said. But I got:

ln: die symbolische Verknüpfung ‘/ect/resolv.conf’ konnte nicht angelegt werden: Datei oder Verzeichnis nicht gefunden

Folder can’t be found, I suppose…


Tried it again. This time no error in CLI. However…Diagnose still displays the same issue again…

In the meantime I disabled my pi-hole at home. Still the same issue…cant help myself.

Maybe I did a mistake myself(I know, that the person is often the failure and not the machine):

Was it right to put the suggested command in one line in die CLI and press Enter once? Or should I had put it into two lines?

Did you do it as root ?
sudo ln...

Yes. I did it as root with sudo command

Here is the proof, that ln was successful.

sudo ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 31 4. Mär 16:08 /etc/resolv.conf → /etc/resolvconf/run/resolv.conf

Issue still persists. My conclusion: The Diagnosis seems to be be hung. Everytime i run the diagnosis the section „internetconectivitity“ tells me the diagnosis is 2 days old. But: all other sections tell me diagnosis 1min old.

I was able to copy this at startup of diagnosis-system:

Die Diagnosefunktion wird versuchen, gängige Probleme in verschiedenen Teilen Ihres Servers zu finden, damit alles reibungslos läuft. Haben Sie keine Angst, wenn Sie ein paar Fehlermeldungen sehen, nachdem Sie ihren Server aufgesetzt haben: es soll versuchen Ihnen zu helfen, Probleme zu identifizieren und Tipps für Lösungen zu zeigen. Die Diagnose wird auch automatisch zweimal täglich ausgeführt, falls Fehler gefunden werden, bekommt der Administrator eine E-Mail.
Die Diagnose durchführen
Der Server verarbeitet die Aktion...

Alles sieht OK aus für Grundsystem!
Diagnose fehlgeschlagen für die Kategorie 'ip': 
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/yunohost/diagnosis.py", line 183, in diagnosis_run
code, report = diagnoser.diagnose(force=force)
File "/usr/lib/python3/dist-packages/yunohost/diagnosis.py", line 430, in diagnose
items = list(self.run())
File "/usr/lib/python3/dist-packages/yunohost/diagnosers/10-ip.py", line 67, in run
good_resolvconf = self.good_resolvconf()
File "/usr/lib/python3/dist-packages/yunohost/diagnosers/10-ip.py", line 221, in good_resolvconf
content = read_file("/etc/resolv.conf").strip().split("\n")
File "/usr/lib/python3/dist-packages/moulinette/utils/filesystem.py", line 34, in read_file
raise MoulinetteError("file_not_exist", path=file_path)
moulinette.core.MoulinetteError: Datei ist nicht vorhanden: '/etc/resolv.conf'
Alles sieht OK aus für DNS-Einträge! (+ 1 ignorierte(s) Problem(e))
Alles sieht OK aus für Geöffnete Ports!
Alles sieht OK aus für Web!

Letzte Aktion:
Angetrieben von YunoHost (stable).```

Then let’s check ls -l /etc/resolvconf/run/resolv.conf

and systemctl status resolvconf

1 Like

I tried and I got this:

sudo ls -l /etc/resolvconf/run/resolv.conf
ls: Zugriff auf '/etc/resolvconf/run/resolv.conf' nicht möglich: Datei oder Verzeichnis nicht gefunden
● resolvconf.service - Nameserver information manager
     Loaded: loaded (/lib/systemd/system/resolvconf.service; enabled; vendor preset: enabled)
     Active: active (exited) since Fri 2023-03-03 18:07:46 CET; 22h ago
       Docs: man:resolvconf(8)
   Main PID: 80 (code=exited, status=0/SUCCESS)
     CGroup: /system.slice/resolvconf.service ```

Update: I kept searching for the reason of that Issue and may have found something.

It seems that my vps-provider (Strato) has an option concerning “/etc/resolv.conf” turned on as default. I just stumbled across that option by coincidence. There was no hint in the installation-process!

Überschreiben der Datei /etc/resolv.conf
aktiviert: STRATO Nameserver werden bootfest zur Namensauflösung genutzt.
deaktiviert: Sie können eigene Nameserver in resolv.conf eintragen.

I turned the option off and restarted my yunohost. No effect! I will do a clean install and report here.

I usually link it to /var/run/resolvconf/resolve.conf or /run/resolvconf/resolv.conf. There is not usually a run directory in /etc/resolvconf since /etc is for config and not variable files like a run directory.

If you have it properly linked to /var/run/resolvconf/resolve.conf or /run/resolvconf/resolvconf.conf you will be using dnsmasq and you can safely ignore that warning.

Edit: @Chrisster I’m pretty sure there is an issue in the diagnosis since without changing anything, there is no /etc/resolvconf/run/resolv.conf on the yunohosts I have installed.

1 Like

Did a clean reinstall. Issue still persists.

DNS Auflösung scheint zu funktionieren, aber sei vorsichtig wenn du deine eigene /etc/resolv.conf verwendest.
Die Datei /etc/resolv.conf muss ein Symlink auf /etc/resolvconf/run/resolv.conf sein, welcher auf (dnsmasq) zeigt. Falls du die DNS-Resolver manuell konfigurieren möchtest, bearbeite bitte /etc/resolv.dnsmasq.conf.

That might be true. I have two instances running at different providers. One has that issue, the other doesn’t. I think, it may be connected to different versions of Debian 11…

Maybe that can help you?

1 Like

Here is the screen I get from sudo dpkg - reconfigure resolvconf

So there we have it… Resolvconf does link /etc/resolv.conf to /run/resolvconf/resolv.conf by default.

1 Like

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