[SOLVED] Cant restart DHCP Server

Started by jstrebel, July 03, 2015, 01:23:55 PM

Previous topic - Next topic
Jakob, do you mean "production" as in you brought back /var MFS? That'll bring back the bug.

I don't know about this. It is fixable and there'll be a fix today, with 15.7.1 out hopefully on Wednesday, but it'll happen again some day. I still remember the times we had the "no firmware updates available" issues, which correspond to the same problem class.

Maybe there is something I can do with pkgng in that regard that it won't point to a stale directory/database by default anymore. More on this later today.

Franco,
I disabled the Ramdisk (/var) and did a double boot. On the testbed it seemed working normal. But Back in the Production network. ( I mean the full office network) the problem was back.

I am more than happy the help you out with some testing to track down the root cause. But you do not need to do a special for me. Jakob

This takes care of woes with the package database by keeping a /var/db/pkg symlink in the real file system after the move, at least as long as our /var MFS on/off migration works:

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

Unfortunately, it'll require anyone with /var MFS usage to disable, reboot, enable, reboot. I do not want to add more than this clean fix to not introduce another issue now or in the future.

A temporary workaround is to switch /var MFS off till 15.7.1.

Jakob has helped to verify that the fix works as intended. Thank you all for the participation. :)

I'm confused

I have the same issue. I applied the rc.recover stuff and reboot and nothing changed, still stuck with a non working brick unable  to provide IP address to LAN.

system log continue to claim :
OPNsense opnsense: /usr/local/etc/rc.bootup: The command '/bin/sh /tmp/dhcpd.sh' returned exit code '1', the output was 'chown: dhcpd: illegal group name'


It's on an Alix with 4 Gb Flash, fresh install from openssl_nano & upgrade to 15.7.2.

If you have any advise it will be very helpful.

Best regards

Just guessing. Alix has just 256mb memory. Could this be the root cause the upgrade does not work?


Gesendet von iPhone mit Tapatalk

The release notes for 15.7.1 state the following:

If you are being affected by the DHCP server startup issue reboots are necessary in order to fix the root cause. Please follow these steps:

1. Upgrade to 15.7.1 using your preferred method.
2. Disable RAM disks in "System: Settings: Misc." and reboot.
3. Enable RAM disks in  "System: Settings: Misc." and reboot.
4. The DHCP server will now startup correctly.

@Franco, Sorry I was assuming your upgrade instructions where properly followed. Jakob

No worries, Jakob. Maybe they were, but I saw no indication thereof. The fix is a little non-obvious since we can't mount/remount on the fly without breaking the operational status of the system. Better to make sure this non-obvious fix is as visible as possible. :)

July 12, 2015, 02:32:38 AM #24 Last Edit: July 12, 2015, 02:36:54 AM by kaipanoi
I had this problem as well. What I saw in the logs was this:


opnsense: /status_services.php: The command '/usr/local/sbin/dhcpd -user dhcpd -group dhcpd -chroot /var/dhcpd -cf /etc/dhcpd.conf -pf /var/run/dhcpd.pid em0' returned exit code '1', the output was 'Internet Systems Consortium DHCP Server 4.2.8 Copyright 2004-2015 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ no such user: dhcpd If you did not get this software from ftp.isc.org, please get the latest from ftp.isc.org and install that before requesting help. If you did get this software from ftp.isc.org and have not yet read the README, please read it before requesting help. If you intend to request help from the dhcp-bugs at isc.org mailing list, please read the section on the README about submitting bug reports and requests for help. Please do not under any circumstances send requests for help directly to the authors of this software - please send them to the appropriate mailing list as described in the README file. exiting


I checked /etc/passwd and sure enough there was no dhcpd user. The next closest thing was "_dhcp":


_dhcp:*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin


I ssh'd in and manually created a system account named dhcpd, gave it rights to the pid file dhcpd wanted and the service started properly at the next request.

The fix does not survive a reboot. I am running RAM disks like OP.

Quote from: kaipanoi on July 12, 2015, 02:32:38 AM
I had this problem as well. What I saw in the logs was this:


opnsense: /status_services.php: The command '/usr/local/sbin/dhcpd -user dhcpd -group dhcpd -chroot /var/dhcpd -cf /etc/dhcpd.conf -pf /var/run/dhcpd.pid em0' returned exit code '1', the output was 'Internet Systems Consortium DHCP Server 4.2.8 Copyright 2004-2015 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ no such user: dhcpd If you did not get this software from ftp.isc.org, please get the latest from ftp.isc.org and install that before requesting help. If you did get this software from ftp.isc.org and have not yet read the README, please read it before requesting help. If you intend to request help from the dhcp-bugs at isc.org mailing list, please read the section on the README about submitting bug reports and requests for help. Please do not under any circumstances send requests for help directly to the authors of this software - please send them to the appropriate mailing list as described in the README file. exiting


I checked /etc/passwd and sure enough there was no dhcpd user. The next closest thing was "_dhcp":


_dhcp:*:65:65:dhcp programs:/var/empty:/usr/sbin/nologin


I ssh'd in and manually created a system account named dhcpd, gave it rights to the pid file dhcpd wanted and the service started properly at the next request.

The fix does not survive a reboot. I am running RAM disks like OP.

Did you read, and do as mentioned in, post #21? Two whole posts above yours?
Hobbyist at home, sysadmin at work. Sometimes the first is mixed with the second.

To fix the issue (from fresh openssl_nano install with 15.7.2 updates) I've done the following :

1) boot

2) from console as root (to get IP adress for LAN) :
/usr/local/etc/rc.recover
/bin/sh /tmp/dhcpd.sh
/usr/local/sbin/dhcpd -user dhcpd -group dhcpd -chroot /var/dhcpd -cf /etc/dhcpd.conf -pf /var/run/dhcpd.pid vr0 vr2

3) Disable RAM disks in "System: Settings: Misc."

4) Reboot (from web GUI)

After reboot still same credentials issue : "The command '/bin/sh /tmp/dhcpd.sh' returned exit code '1', the output was 'chown: dhcpd: illegal group name'"

5) Tried from console another time :
/usr/local/etc/rc.recover
/bin/sh /tmp/dhcpd.sh
/usr/local/sbin/dhcpd -user dhcpd -group dhcpd -chroot /var/dhcpd -cf /etc/dhcpd.conf -pf /var/run/dhcpd.pid vr0 vr2

=> then dhcpd starts.

6) reboot (from web gui)

After reboot dhcpd was working !


7) Enable RAM disks in  "System: Settings: Misc."

8) Reboot from webGUI

=> Back to normal working operations !!