[Bug 1543794] Re: isc-dhcp-server fails to start on second & further attempts with 'Can't open /var/lib/dhcp/dhcpd.leases for append'
Rolly Ng
rollyng at gmail.com
Mon Jan 9 14:31:12 UTC 2017
Issue still exists with fresh installation of 16.04 server.
rolly at head:~$ apt-show-versions | grep isc-dhcp-server
isc-dhcp-server:amd64/xenial-updates 4.3.3-5ubuntu12.6 uptodate
it works with the solution:
sudo ln -s /etc/apparmor.d/usr.sbin.dhcpd /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.dhcpd
I am running dhcpd on infiniband, ipoib on ib0, here is the working output:
rolly at head:~$ sudo service isc-dhcp-server status
[sudo] password for rolly:
● isc-dhcp-server.service - ISC DHCP IPv4 server
Loaded: loaded (/lib/systemd/system/isc-dhcp-server.service; disabled; vendor preset: enabled)
Active: active (running) since Mon 2017-01-09 22:05:34 HKT; 19min ago
Docs: man:dhcpd(8)
Main PID: 5173 (dhcpd)
Tasks: 1
Memory: 9.0M
CPU: 25ms
CGroup: /system.slice/isc-dhcp-server.service
└─5173 dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-server/dhcpd.pid -cf /etc/dhcp/dhcpd.conf ib0
Jan 09 22:05:34 head dhcpd[5173]: All rights reserved.
Jan 09 22:05:34 head dhcpd[5173]: For info, please visit https://www.isc.org/software/dhcp/
Jan 09 22:05:34 head dhcpd[5173]: Wrote 0 leases to leases file.
Jan 09 22:05:34 head dhcpd[5173]: Listening on LPF/ib0//192.168.0.0/24
Jan 09 22:05:34 head sh[5173]: Listening on LPF/ib0//192.168.0.0/24
Jan 09 22:05:34 head sh[5173]: Sending on LPF/ib0//192.168.0.0/24
Jan 09 22:05:34 head sh[5173]: Sending on Socket/fallback/fallback-net
Jan 09 22:05:34 head dhcpd[5173]: Sending on LPF/ib0//192.168.0.0/24
Jan 09 22:05:34 head dhcpd[5173]: Sending on Socket/fallback/fallback-net
Jan 09 22:05:34 head dhcpd[5173]: Server starting service.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1543794
Title:
isc-dhcp-server fails to start on second & further attempts with
'Can't open /var/lib/dhcp/dhcpd.leases for append'
Status in isc-dhcp package in Ubuntu:
Fix Released
Bug description:
During the first start of isc-dhcp-server (using the systemd service
unit), a blank dhcpd.leases file is created (presumably owned by
root:root). dhcpd starts successfully (and then exits due to no
subnet definitions, that's expected).
Attempting to start the service again fails with 'Can't open
/var/lib/dhcp/dhcpd.leases for append' (the dhcpd.leases file
ownership is now dhcpd.dhcpd), and apparmor logs a denial of the
dac_override capability.
Removing the leases file repeats this process (first start works as
expected, future ones do not).
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: isc-dhcp-server 4.3.3-5ubuntu4
ProcVersionSignature: Ubuntu 4.4.0-2.16-generic 4.4.0
Uname: Linux 4.4.0-2-generic x86_64
ApportVersion: 2.19.4-0ubuntu2
Architecture: amd64
Date: Tue Feb 9 20:58:12 2016
InstallationDate: Installed on 2016-02-09 (0 days ago)
InstallationMedia: Ubuntu-Server 16.04 LTS "Xenial Xerus" - Alpha amd64 (20160206)
ProcEnviron:
LANGUAGE=en_GB:en
TERM=linux
PATH=(custom, no user)
LANG=en_GB.UTF-8
SHELL=/bin/bash
SourcePackage: isc-dhcp
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1543794/+subscriptions
More information about the foundations-bugs
mailing list