dnsmasq konnte unter Debian nicht gestartet werden

dnsmasq konnte unter Debian nicht gestartet werden

Dies ist der Inhalt von systemctl status dnsmasq.service:

● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
   Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2019-06-29 12:37:37 CEST; 23s ago
  Process: 24641 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=2)
  Process: 24638 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)

Dies ist der Inhalt der Zeitschrift:

-- Logs begin at Tue 2019-06-25 11:49:21 CEST, end at Sat 2019-06-29 12:48:50 CEST. --
Jun 25 11:49:29 EddLinux kernel: nouveau 0000:01:00.0: preinit failed with -22
Jun 25 11:49:29 EddLinux kernel: nouveau: DRM:00000000:00000080: init failed with -22
Jun 25 11:49:32 EddLinux avahi-daemon[297]: chroot.c: open() failed: No such file or directory
Jun 25 11:49:33 EddLinux systemd-rfkill[421]: Failed to open device: No such device
Jun 25 11:49:35 EddLinux dhclient[502]: Failed to get interface index: No such device
Jun 25 11:49:35 EddLinux dhclient[502]: 
Jun 25 11:49:35 EddLinux dhclient[502]: If you think you have received this message due to a bug rather
Jun 25 11:49:35 EddLinux dhclient[502]: than a configuration issue please read the section on submitting
Jun 25 11:49:35 EddLinux dhclient[502]: bugs on either our web page at www.isc.org or in the README file
Jun 25 11:49:35 EddLinux dhclient[502]: before submitting a bug.  These pages explain the proper
Jun 25 11:49:35 EddLinux dhclient[502]: process and the information we find helpful for debugging..
Jun 25 11:49:35 EddLinux dhclient[502]: 
Jun 25 11:49:35 EddLinux dhclient[502]: exiting.
Jun 25 11:49:35 EddLinux systemd[1]: Failed to start Raise network interfaces.
Jun 25 11:49:44 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 25 12:17:49 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 25 13:32:38 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 25 13:32:43 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 25 17:36:10 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 25 18:29:26 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 25 18:46:36 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 25 18:50:57 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 26 12:29:22 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 26 13:08:52 EddLinux anacron[4522]: Can't find sendmail at /usr/sbin/sendmail, not mailing output
Jun 26 14:20:05 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 26 14:31:18 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 26 15:38:34 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 26 15:38:47 EddLinux kernel: sd 6:0:0:0: [sdb] No Caching mode page found
Jun 26 15:38:47 EddLinux kernel: sd 6:0:0:0: [sdb] Assuming drive cache: write through
Jun 26 15:42:56 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 26 15:52:46 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 26 16:21:11 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 26 17:39:35 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 26 18:16:05 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 26 18:25:44 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 26 20:30:11 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 27 16:39:10 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 27 17:06:50 EddLinux anacron[11980]: Can't find sendmail at /usr/sbin/sendmail, not mailing output
Jun 27 17:38:13 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 27 18:11:44 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 27 18:12:28 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 27 18:50:12 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 28 11:46:18 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 28 11:48:33 EddLinux kernel: sd 6:0:0:0: [sdb] No Caching mode page found
Jun 28 11:48:33 EddLinux kernel: sd 6:0:0:0: [sdb] Assuming drive cache: write through
Jun 28 11:48:55 EddLinux kernel: FAT-fs (sdb1): unable to read boot sector to mark fs as dirty
Jun 28 11:53:31 EddLinux kernel: sd 6:0:0:0: [sdb] No Caching mode page found
Jun 28 11:53:31 EddLinux kernel: sd 6:0:0:0: [sdb] Assuming drive cache: write through
Jun 28 11:53:41 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 28 12:08:31 EddLinux anacron[17533]: Can't find sendmail at /usr/sbin/sendmail, not mailing output
Jun 28 12:52:24 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 29 12:13:35 EddLinux anacron[21404]: Can't find sendmail at /usr/sbin/sendmail, not mailing output
Jun 29 12:35:05 EddLinux dnsmasq[24574]: failed to create listening socket for port 53: Address already in use
Jun 29 12:35:05 EddLinux dnsmasq[24574]: FAILED to start up
Jun 29 12:35:05 EddLinux systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Jun 29 12:37:37 EddLinux dnsmasq[24641]: failed to create listening socket for port 53: Address already in use
Jun 29 12:37:37 EddLinux dnsmasq[24641]: FAILED to start up
Jun 29 12:37:37 EddLinux systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.

Ich habe es bereits neu installiert. Jede Hilfe ist willkommen!

Antwort1

Das Problem

Fehler beim Erstellen des Listening-Sockets für Port 53: Adresse wird bereits verwendet

Das ist es.

DNS verwendet Abfragen, die Daten über Port 53 senden (meistens UDP, aber auch TCP kann verwendet werden).

dnsmasqist (unter anderem) ein sogenanntes Forwarding DNSServer,und die Tatsache, dass es ein Server ist, bedeutet, dass erHörenauf mindestens 53/UDP und vielleicht auch auf 53/TCP.

Nur ein einziger Prozess (laufendes Programm) kann auf einem Port mit einer bestimmten Nummer auf einer bestimmten IP-Adresse lauschen. Der Fehler bedeutet also, dass ein anderes Programm bereits auf Port 53 lauscht, dnsmasqdies aber nicht tut und beendet wird.

Was tun?

Finden Sie zunächst heraus, was auf 53/UDP lauscht.

  1. Installieren iproute2:

    # apt install iproute2
    
  2. Sehen Sie, wer 53/UDP verwendet:

    # ss -nlup
    

    Die Optionen bedeuten:

    • ZeigenNVersuchen Sie nicht, numerische Adressen per DNS aufzulösen.
    • nur AnzeigenmHörbuchsen.
    • nur AnzeigenSieDP-Sockets (eigentlich Endpunkte, aber egal).
    • ZeigenPProzesse, die diese Sockets geöffnet haben.

    root(Beachten Sie, dass Sie dieses Programm als – möglicherweise über – ausführen müssen sudo; dies hängt davon ab, wie Sie die Methode zur Erhöhung der Berechtigungen auf Ihrem System konfiguriert haben.)

    Suchen Sie nun in der Ausgabe nach einem Datensatz, der etwa Folgendes enthält [::]:53– der genaue Wert kann abweichen, sagen wir beispielsweise „, 0.0.0.0:53aber Sie werden das :53Suffix mit Sicherheit sehen – das ist die Portnummer – und sehen Sie sich dann die Spalte „Benutzer“ an – dort sollte der Name des Programms aufgeführt sein, das diesen Socket geöffnet hat.

    Angenommen, auf meinem System sieht das entsprechende „like“ so aus UNCONN 0 0 [::]:53 [::]:* users:(("dnsmasq",pid=601,fd=6))(der Kürze halber habe ich Leerzeichen etwas gekürzt). Beachten Sie dnsmasq, dass der Benutzer „ ist“. Auf Ihrem System sieht das anders aus.

OK, wenn Sie also herausgefunden haben, wer der Übeltäter ist, überlegen Sie, wie Sie das Programm deinstallieren können. Danach # systemctl restart dnsmasqsollte es ganz einfach sein.

verwandte Informationen