apparmor prevents kea launch
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
isc-kea (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Dear Sir or Madam,
during installation of kea-2.4 (kea-dhcp4, kea-dhcp6 and kea-ctrl-agent) some profiles for apparmor are installed/created as well.
Unfortunately these profiles prevent kea services to start when for example MySQL as backend is configured.
Config snippet from kea-dhcp4.conf:
"
"type": "mysql",
"name": "kea",
"user": "kea",
"password": "password",
"host": "",
"port": 3306
},
Error message from kea-dhcp4-server:
ERROR [kea-dhcp4.
ERROR [kea-dhcp4.
Message from dmesg:
[ 685.201719] audit: type=1400 audit(171481135
As you can see, kea can't connect to mysql through the socket, since apparmor is preventing it.
There is a similar issue with using the kea-ctrl-agent with the other services.
In your installed apparmor profiles you specifically allow the socket /run/kea/
profile snippet:
# Control sockets
# Before LP: #1863100, these were in /tmp. For compatibility, let's keep both
# locations
owner /{tmp,run/
owner /{tmp,run/
Naming it anything else prevents the server to start as well.
It's really time-consuming and nerve racking to debug this, since the issue with apparmor is not directly apparently.
ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: kea-dhcp4-server 2.4.1-3build3
ProcVersionSign
Uname: Linux 6.8.0-31-generic x86_64
ApportVersion: 2.28.1-0ubuntu2
Architecture: amd64
CasperMD5CheckR
Date: Sat May 4 10:33:20 2024
ProcEnviron:
LANG=en_US.UTF-8
PATH=(custom, no user)
SHELL=/bin/bash
TERM=xterm-
XDG_RUNTIME_
SourcePackage: isc-kea
UpgradeStatus: No upgrade log present (probably fresh install)
modified.
mtime.conffile.