dhcpd: no such user: dhcpd

Started by mircsicz, May 22, 2016, 02:08:07 PM

Previous topic - Next topic
I've imported an existing config into a fresh nanosd 16.1.8 CF Install on an ALIX.

And I only had to do so because the system crashed while trying to upgrade with disabled RAM-Disks...

On the first but after restore DHCPD was running and I got an IP, a few hours later dhcpd seems no to be running and when trying to start it I see the following log:


May 22 12:00:26 dhcpd: no such user: dhcpd
May 22 12:00:26 dhcpd: For info, please visit https://www.isc.org/software/dhcp/
May 22 12:00:26 dhcpd: All rights reserved.
May 22 12:00:26 dhcpd: Copyright 2004-2016 Internet Systems Consortium.
May 22 12:00:26 dhcpd: Internet Systems Consortium DHCP Server 4.3.3-P1
May 22 12:00:21 dhcpd: exiting.
May 22 12:00:21 dhcpd:
May 22 12:00:21 dhcpd: process and the information we find helpful for debugging..
May 22 12:00:21 dhcpd: before submitting a bug. These pages explain the proper
May 22 12:00:21 dhcpd: bugs on either our web page at www.isc.org or in the README file
May 22 12:00:21 dhcpd: than a configuration issue please read the section on submitting


So I ran adduser on the console and could successfully start dhcpd from the webif afterwards...

If your're willing to debug I can supply the config!

This used to happen sparsely, fixed with 16.1.13:

https://github.com/opnsense/changelog/blob/master/doc/16.1.13#L28

To manually fix... Can you first let me know what these commands yield?

# ls -lah /var/db
# ls -lah /root/var/db/pkg

Hi Franco,

thx for all your effort! ;-)


root@router:~ #  ls -lah /var/db
total 36
drwxr-xr-x   7 root    wheel   432B May 23 05:44 .
drwxr-xr-x  13 root    wheel   396B May 21 14:45 ..
-rw-r--r--   1 root    wheel     0B May 21 14:51 currentipsecpinghosts
drwxr-xr-x   2 root    wheel   108B May 21 14:48 dnscache
drwxr-xr-x   2 root    wheel     0B May 21 14:43 entropy
-rw-r-----   1 root    wheel    62B May 21 14:44 growlnotices_lastmsg.txt
-rw-r-----   1 root    wheel     0B May 22 14:44 ipsecpinghosts
-rw-r-----   1 root    wheel     8B May 23 05:44 ntpd.drift
drwxr-xr-x   2 root    wheel     0B May 21 14:51 pingmsstatus
drwxr-xr-x   2 root    wheel     0B May 21 14:51 pingstatus
lrwxr-xr-x   1 root    wheel    16B May 21 14:43 pkg -> /root/var/db/pkg
drwxr-xr-x   2 nobody  wheel   720B May 21 14:45 rrd
-rw-r-----   1 root    wheel    12B May 22 14:44 wan_cacheip
-rw-r-----   1 root    wheel    12B May 22 14:44 wan_ip
root@router:~ # ls -lah /root/var/db/pkg
total 5321
drwxr-xr-x  2 root  wheel   512B May 21 14:30 .
drwxr-xr-x  3 root  wheel   512B May 21 14:07 ..
-rw-r--r--  1 root  wheel     0B May 21 14:30 OPNsense.meta
-rw-r--r--  1 root  wheel   4.7M May 21 14:30 local.sqlite
-rw-r--r--  1 root  wheel   2.5K May 21 14:30 local.sqlite-journal
-rw-r--r--  1 root  wheel   502K May 21 14:30 repo-OPNsense.sqlite

That looks ok now, one more to be sure:

# pkg info

It should show all packages...

If that is the case updating to 16.1.14 would likely fix this for you if the dhcpd issue persists on reboot.

Hi franco,

as I'm on ALIX I can't upgrade....

and "pkg info" just returns nothing

But it's reproducable, just changed the CF again, and restored the config and the problem was back!

This was still happening on 16.1.14, especially after a kernel panic+reboot

That means we'll have to start backing up the package database because we really can't trust UFS at all.

I just wanted to add that in my case, restarting the box solved the problem, unless this happens at random of course...

The first reboot may not recover completely, but the second one does... we've seen this, but don't really know why.

I've added pkg database dump/restore though I do not think it will help very much.

https://github.com/opnsense/core/commit/a6132af6e4d8d904a6b40770e7ef9bce9918584e

mircsicz, in your case the database is already gone. You can force an upgrade for all packages like this:

# pkg install opnsense

That should bring it back.