Unbound startet nicht nach proxmox-mailgate installation

LyriC

Member
Jan 4, 2021
21
5
8
48
Hallo zusammen,

bin gerade dabei ein neues PMG System aufzusetzen.
Habe dafür Debian 11.3 installiert und eingerichtet (fail2ban und unbound) und dann per apt die Pakete für PMG installiert.
Nach der Installation der PMG Pakete folgte ein reboot und schon sah ich das Problem :-( unbound startet nicht mehr.
hier ein auszug aus dem status von unbound

Code:
systemctl status unbound.service
● unbound.service - Unbound DNS server
     Loaded: loaded (/lib/systemd/system/unbound.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2022-04-07 21:29:16 CEST; 6min ago
       Docs: man:unbound(8)
    Process: 1273 ExecStartPre=/usr/lib/unbound/package-helper chroot_setup (code=exited, status=0/SUCCESS)
    Process: 1276 ExecStartPre=/usr/lib/unbound/package-helper root_trust_anchor_update (code=exited, status=0/SUCCESS)
    Process: 1279 ExecStart=/usr/sbin/unbound -d -p $DAEMON_OPTS (code=exited, status=1/FAILURE)
    Process: 1280 ExecStopPost=/usr/lib/unbound/package-helper chroot_teardown (code=exited, status=0/SUCCESS)
   Main PID: 1279 (code=exited, status=1/FAILURE)
        CPU: 28ms

Apr 07 21:29:16 zerberus.it-contact.de systemd[1]: unbound.service: Scheduled restart job, restart counter is at 5.
Apr 07 21:29:16 zerberus.it-contact.de systemd[1]: Stopped Unbound DNS server.
Apr 07 21:29:16 zerberus.it-contact.de systemd[1]: unbound.service: Start request repeated too quickly.
Apr 07 21:29:16 zerberus.it-contact.de systemd[1]: unbound.service: Failed with result 'exit-code'.
Apr 07 21:29:16 zerberus.it-contact.de systemd[1]: Failed to start Unbound DNS server.

vielleicht hat das Problem ja schon einer von euch gehabt und kann mir hier weiterhelfen.
Danke im Voraus

Grüße
 
hi,

leider ist der log abgeschnitten, du kannst den ganzen (seit boot) mit folgenden befehl bekommen:

Code:
journalctl -b -u unbound.service
 
Hallo,

erstmal Danke für die Rückantwort. :)
Ich habe mal das Log abgerufen
Code:
journalctl -b -u unbound.service
-- Journal begins at Thu 2022-04-07 20:38:59 CEST, ends at Fri 2022-04-08 09:47:59 CEST. --
Apr 07 21:24:03 <FQDN> systemd[1]: Starting Unbound DNS server...
Apr 07 21:24:03 <FQDN> unbound[585]: [1649359443] unbound[585:0] error: can't create socket: Permission denied
Apr 07 21:24:03 <FQDN> unbound[585]: [1649359443] unbound[585:0] fatal error: could not open ports
Apr 07 21:24:03 <FQDN> systemd[1]: unbound.service: Main process exited, code=exited, status=1/FAILURE
Apr 07 21:24:03 <FQDN> systemd[1]: unbound.service: Failed with result 'exit-code'.
Apr 07 21:24:03 <FQDN> systemd[1]: Failed to start Unbound DNS server.
Apr 07 21:24:03 <FQDN> systemd[1]: unbound.service: Scheduled restart job, restart counter is at 1.
Apr 07 21:24:03 <FQDN> systemd[1]: Stopped Unbound DNS server.
Apr 07 21:24:03 <FQDN> systemd[1]: Starting Unbound DNS server...
Apr 07 21:24:03 <FQDN> unbound[626]: [1649359443] unbound[626:0] error: can't create socket: Permission denied
Apr 07 21:24:03 <FQDN> unbound[626]: [1649359443] unbound[626:0] fatal error: could not open ports
Apr 07 21:24:03 <FQDN> systemd[1]: unbound.service: Main process exited, code=exited, status=1/FAILURE
Apr 07 21:24:03 <FQDN> systemd[1]: unbound.service: Failed with result 'exit-code'.
Apr 07 21:24:03 <FQDN> systemd[1]: Failed to start Unbound DNS server.
Apr 07 21:24:03 <FQDN> systemd[1]: unbound.service: Scheduled restart job, restart counter is at 2.
Apr 07 21:24:03 <FQDN> systemd[1]: Stopped Unbound DNS server.
Apr 07 21:24:03 <FQDN> systemd[1]: Starting Unbound DNS server...
Apr 07 21:24:04 <FQDN> unbound[637]: [1649359443] unbound[637:0] error: can't create socket: Permission denied
Apr 07 21:24:04 <FQDN> unbound[637]: [1649359443] unbound[637:0] fatal error: could not open ports
Apr 07 21:24:04 <FQDN> systemd[1]: unbound.service: Main process exited, code=exited, status=1/FAILURE
Apr 07 21:24:04 <FQDN> systemd[1]: unbound.service: Failed with result 'exit-code'.
Apr 07 21:24:04 <FQDN> systemd[1]: Failed to start Unbound DNS server.
Apr 07 21:24:04 <FQDN> systemd[1]: unbound.service: Scheduled restart job, restart counter is at 3.
Apr 07 21:24:04 <FQDN> systemd[1]: Stopped Unbound DNS server.
Apr 07 21:24:04 <FQDN> systemd[1]: Starting Unbound DNS server...
Apr 07 21:24:04 <FQDN> unbound[647]: [1649359444] unbound[647:0] error: can't create socket: Permission denied
Apr 07 21:24:04 <FQDN> unbound[647]: [1649359444] unbound[647:0] fatal error: could not open ports
Apr 07 21:24:04 <FQDN> systemd[1]: unbound.service: Main process exited, code=exited, status=1/FAILURE
Apr 07 21:24:04 <FQDN> systemd[1]: unbound.service: Failed with result 'exit-code'.
Apr 07 21:24:04 <FQDN> systemd[1]: Failed to start Unbound DNS server.
Apr 07 21:24:04 <FQDN> systemd[1]: unbound.service: Scheduled restart job, restart counter is at 4.
Apr 07 21:24:04 <FQDN> systemd[1]: Stopped Unbound DNS server.
Apr 07 21:24:04 <FQDN> systemd[1]: Starting Unbound DNS server...
Apr 07 21:24:04 <FQDN> unbound[660]: [1649359444] unbound[660:0] error: can't create socket: Permission denied
Apr 07 21:24:04 <FQDN> unbound[660]: [1649359444] unbound[660:0] fatal error: could not open ports
Apr 07 21:24:04 <FQDN> systemd[1]: unbound.service: Main process exited, code=exited, status=1/FAILURE
Apr 07 21:24:04 <FQDN> systemd[1]: unbound.service: Failed with result 'exit-code'.
Apr 07 21:24:04 <FQDN> systemd[1]: Failed to start Unbound DNS server.
Apr 07 21:24:05 <FQDN> systemd[1]: unbound.service: Scheduled restart job, restart counter is at 5.
Apr 07 21:24:05 <FQDN> systemd[1]: Stopped Unbound DNS server.
Apr 07 21:24:05 <FQDN> systemd[1]: unbound.service: Start request repeated too quickly.
Apr 07 21:24:05 <FQDN> systemd[1]: unbound.service: Failed with result 'exit-code'.
Apr 07 21:24:05 <FQDN> systemd[1]: Failed to start Unbound DNS server.
Apr 07 21:29:15 <FQDN> systemd[1]: Starting Unbound DNS server...
Apr 07 21:29:15 <FQDN> unbound[1237]: [1649359755] unbound[1237:0] error: can't create socket: Permission denied
Apr 07 21:29:15 <FQDN> unbound[1237]: [1649359755] unbound[1237:0] fatal error: could not open ports
Apr 07 21:29:15 <FQDN> systemd[1]: unbound.service: Main process exited, code=exited, status=1/FAILURE
Apr 07 21:29:15 <FQDN> systemd[1]: unbound.service: Failed with result 'exit-code'.
Apr 07 21:29:15 <FQDN> systemd[1]: Failed to start Unbound DNS server.
Apr 07 21:29:15 <FQDN> systemd[1]: unbound.service: Scheduled restart job, restart counter is at 1.
Apr 07 21:29:15 <FQDN> systemd[1]: Stopped Unbound DNS server.
Apr 07 21:29:15 <FQDN> systemd[1]: Starting Unbound DNS server...
Apr 07 21:29:15 <FQDN> unbound[1248]: [1649359755] unbound[1248:0] error: can't create socket: Permission denied
Apr 07 21:29:15 <FQDN> unbound[1248]: [1649359755] unbound[1248:0] fatal error: could not open ports
Apr 07 21:29:15 <FQDN> systemd[1]: unbound.service: Main process exited, code=exited, status=1/FAILURE
Apr 07 21:29:15 <FQDN> systemd[1]: unbound.service: Failed with result 'exit-code'.
Apr 07 21:29:15 <FQDN> systemd[1]: Failed to start Unbound DNS server.
Apr 07 21:29:15 <FQDN> systemd[1]: unbound.service: Scheduled restart job, restart counter is at 2.
Apr 07 21:29:15 <FQDN> systemd[1]: Stopped Unbound DNS server.
Apr 07 21:29:15 <FQDN> systemd[1]: Starting Unbound DNS server...
Apr 07 21:29:15 <FQDN> unbound[1258]: [1649359755] unbound[1258:0] error: can't create socket: Permission denied
Apr 07 21:29:15 <FQDN> unbound[1258]: [1649359755] unbound[1258:0] fatal error: could not open ports
Apr 07 21:29:15 <FQDN> systemd[1]: unbound.service: Main process exited, code=exited, status=1/FAILURE
Apr 07 21:29:15 <FQDN> systemd[1]: unbound.service: Failed with result 'exit-code'.
Apr 07 21:29:15 <FQDN> systemd[1]: Failed to start Unbound DNS server.
Apr 07 21:29:15 <FQDN> systemd[1]: unbound.service: Scheduled restart job, restart counter is at 3.
Apr 07 21:29:15 <FQDN> systemd[1]: Stopped Unbound DNS server.
Apr 07 21:29:15 <FQDN> systemd[1]: Starting Unbound DNS server...
Apr 07 21:29:16 <FQDN> unbound[1269]: [1649359756] unbound[1269:0] error: can't create socket: Permission denied
Apr 07 21:29:16 <FQDN> unbound[1269]: [1649359756] unbound[1269:0] fatal error: could not open ports
Apr 07 21:29:16 <FQDN> systemd[1]: unbound.service: Main process exited, code=exited, status=1/FAILURE
Apr 07 21:29:16 <FQDN> systemd[1]: unbound.service: Failed with result 'exit-code'.
Apr 07 21:29:16 <FQDN> systemd[1]: Failed to start Unbound DNS server.
Apr 07 21:29:16 <FQDN> systemd[1]: unbound.service: Scheduled restart job, restart counter is at 4.
Apr 07 21:29:16 <FQDN> systemd[1]: Stopped Unbound DNS server.
Apr 07 21:29:16 <FQDN> systemd[1]: Starting Unbound DNS server...
Apr 07 21:29:16 <FQDN> unbound[1279]: [1649359756] unbound[1279:0] error: can't create socket: Permission denied
Apr 07 21:29:16 <FQDN> unbound[1279]: [1649359756] unbound[1279:0] fatal error: could not open ports
Apr 07 21:29:16 <FQDN> systemd[1]: unbound.service: Main process exited, code=exited, status=1/FAILURE
Apr 07 21:29:16 <FQDN> systemd[1]: unbound.service: Failed with result 'exit-code'.
Apr 07 21:29:16 <FQDN> systemd[1]: Failed to start Unbound DNS server.
Apr 07 21:29:16 <FQDN> systemd[1]: unbound.service: Scheduled restart job, restart counter is at 5.
Apr 07 21:29:16 <FQDN> systemd[1]: Stopped Unbound DNS server.
Apr 07 21:29:16 <FQDN> systemd[1]: unbound.service: Start request repeated too quickly.
Apr 07 21:29:16 <FQDN> systemd[1]: unbound.service: Failed with result 'exit-code'.
Apr 07 21:29:16 <FQDN> systemd[1]: Failed to start Unbound DNS server.

wie gesagt before ich den pmg installiert habe ging unbound.
Danke im Voraus für die Hilfe.

Gruß
Michael
 
Genau dies Problem habe ich auch festgestellt.

Problem ist hier das Apparmor eingreift. Allerdings tritt das Problem erst auf wenn man proxmox-mailgateway installiert.

Code:
systemd[1]: unbound.service: Main process exited, code=exited, status=1/FAILURE
kernel: [  902.103997] audit: type=1400 audit(1649411319.080:49): apparmor="DENIED" operation="create" profile="/usr/sbin/unbound" pid=1502 comm="unbound" family="unix" sock_type="stream" protocol=0 requested_mask="create" denied_mask="create" addr=none

Zum Test habe ich auch noch einmal eine frische Debian Installation genommen und dort apparmor und unbound installiert. Kein Problem. Installiert man dann proxmox-mailgateway startet unbound nach dem Reboot nicht mehr.
Weiter habe ich das noch nicht geschaut. Aber ich kann es bestätigen.

Übrigens hat clamav-freshclam dann auch Apparmor Probleme:

Code:
kernel: [ 1201.385524] audit: type=1400 audit(1649411618.364:57): apparmor="DENIED" operation="create" profile="/usr/bin/freshclam" pid=1567 comm="freshclam" family="unix" sock_type="stream" protocol=0 requested_mask="create" denied_mask="create" addr=none
kernel: [ 1201.385537] audit: type=1400 audit(1649411618.364:58): apparmor="DENIED" operation="create" profile="/usr/bin/freshclam" pid=1567 comm="freshclam" family="unix" sock_type="stream" protocol=0 requested_mask="create" denied_mask="create" addr=none
kernel: [ 1201.385670] audit: type=1400 audit(1649411618.364:59): apparmor="DENIED" operation="create" profile="/usr/bin/freshclam" pid=1567 comm="freshclam" family="unix" sock_type="stream" protocol=0 requested_mask="create" denied_mask="create" addr=none
kernel: [ 1201.385679] audit: type=1400 audit(1649411618.364:60): apparmor="DENIED" operation="create" profile="/usr/bin/freshclam" pid=1567 comm="freshclam" family="unix" sock_type="stream" protocol=0 requested_mask="create" denied_mask="create" addr=none
kernel: [ 1201.385735] audit: type=1400 audit(1649411618.364:61): apparmor="DENIED" operation="create" profile="/usr/bin/freshclam" pid=1567 comm="freshclam" family="unix" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create" addr=none
kernel: [ 1201.385758] audit: type=1400 audit(1649411618.364:62): apparmor="DENIED" operation="create" profile="/usr/bin/freshclam" pid=1567 comm="freshclam" family="unix" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create" addr=none
kernel: [ 1201.385800] audit: type=1400 audit(1649411618.364:63): apparmor="DENIED" operation="create" profile="/usr/bin/freshclam" pid=1567 comm="freshclam" family="inet" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create"
kernel: [ 1201.385810] audit: type=1400 audit(1649411618.364:64): apparmor="DENIED" operation="create" profile="/usr/bin/freshclam" pid=1567 comm="freshclam" family="inet" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create"
kernel: [ 1201.385825] audit: type=1400 audit(1649411618.364:65): apparmor="DENIED" operation="create" profile="/usr/bin/freshclam" pid=1567 comm="freshclam" family="unix" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create" addr=none
kernel: [ 1201.385836] audit: type=1400 audit(1649411618.364:66): apparmor="DENIED" operation="create" profile="/usr/bin/freshclam" pid=1567 comm="freshclam" family="unix" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create" addr=none
 
Ein Nachtrag habe ich noch.
Das Problem tritt mit dem Original Debian Kernel nicht auf. Sobald ich auf der gleichen Maschine den Debian Kernel starte läuft unbound mit Apparmor ohne Problem.
 
Ich habe jetzt noch einmal weiter getestet. Es muss irgendwas, vielleicht ein patch, vom pmg Kernel sein. Ich habe auf der VM nun den Vanilla Kernel 5.17.2 mit der .config vom 5.15 pmg Kernel compiliert und getestet. Mit dem 5.17.2 Kernel läuft Unbound und clamav-freshclam in Verbindung mit Apparmor sofort wieder.
Auch den pmg Kernel 5.13 habe ich noch einmal getestet aber auch hier die gleichen Probleme.
 
wenn apparmor nicht unbedingt gebraucht wird, kann man es auch deinstallieren: 'apt remove apparmor'
in der default installation von der iso wird es gar nicht erst installiert (der stock debian kernel 'recommends' apparmor deswegen wird es da standardmäßig installiert)
 
Ja, Apparmor deinstallieren hilft natürlich und wurde nun auch gemacht. Es ist jedoch schon interessant das der Fehler nur mit dem PMG Kernel auftritt. Selbst mit dem Ubuntu Kernel scheint das Problem nicht vorhanden zu sein.
 
Selbst mit dem Ubuntu Kernel scheint das Problem nicht vorhanden zu sein.
der Ubuntu Kernel auf einem Debian (oder PMG) installiert? - Falls ja - wie genau wurde das gemacht/getestet?

Es ist jedoch schon interessant das der Fehler nur mit dem PMG Kernel auftritt.
Ich hatte bisher angenommen, dass das am mismatch zwischen dem Apparmor profilen (userspace) und der unterschiedlichen Version im Kernel liegt - wie auch schon in der pmg 5 auf 6 Anleitung beschrieben:

https://pmg.proxmox.com/wiki/index....ilure_Caused_By_Apparmor_Featureset_Missmatch

Falls das mit dem feature-pinning für euch funktioniert - freuen wir uns über einen Bericht.
 
Also ich hatte mir den Ubuntu Mainline Kernel (https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.15.33/) per GIT gezogen und mit der Config vom PMG compiliert. Der Kernel lief auch problemlos. Da Unbound sofort startet sobald ich beim booten einen "nicht pmg" Kernel auswähle würde ich aktuell nicht auf die Profile tippen. Auch der aktuellste Vanilla Kernel 5.17.2 läuft ja mit den gleichen Userspace Tools.
Den letzten 5.15.30 aus dem PVE Test Repositoy habe ich auch probiert, gleiches Problem.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!