DHCP-Server not handing out leases, "please make sure no other dhcp server is running..."
-
Hi everybody,
So I set up my new E200-9A system with the latest 2.4.4-DEVELOPMENT (2.4.4.a.20180601.0821 to be axact) version pfsense. I have everything configured like I want. There's only one thing bugging me. The DHCP-Server is not handing out leases. I usually have a Server 2012r2 running a DHCP-Server, but I shut that one off, before I turn on the pfsense dhcp-servcer. In the pfsense dhcp-log it says
Jun 2 22:55:08 dhcpd Can't bind to dhcp address: Address already in use Jun 2 22:55:08 dhcpd Please make sure there is no other dhcp server Jun 2 22:55:08 dhcpd running and that there's no entry for dhcp or Jun 2 22:55:08 dhcpd bootp in /etc/inetd.conf. Also make sure you Jun 2 22:55:08 dhcpd are not running HP JetAdmin software, which Jun 2 22:55:08 dhcpd includes a bootp server. Jun 2 22:55:08 dhcpd If you think you have received this message due to a bug rather Jun 2 22:55:08 dhcpd than a configuration issue please read the section on submitting Jun 2 22:55:08 dhcpd bugs on either our web page at www.isc.org or in the README file Jun 2 22:55:08 dhcpd before submitting a bug. These pages explain the proper Jun 2 22:55:08 dhcpd process and the information we find helpful for debugging. Jun 2 22:55:08 dhcpd exiting.
How do I tell the service that the other DHCP-Server isn't running anymore?
Thanks in advance,
Ben -
Hi,
Try this : kill them all - and restart (the) one !
The message doesn't mean some other DHCP server is running on your LAN, but some other dhcp server is running on your pfSense box.
The issue is this : " Can't bind to dhcp address: Address already in use " which means another process is already bound to "0.0.0.0" port 67.Run :
[2.4.3-RELEASE][admin@pfsense.brit-hotel-fumel.net]/root: ps ax | grep dhcp
You should see :
23027 - Ss 1:13.29 /usr/sbin/syslogd -s -c -c -l /var/dhcpd/var/run/log -P /var/run/syslog.pid -f /etc/syslog.conf -b 192.168.1.1 34814 - Ss 4:24.40 /usr/local/sbin/dhcpd -user dhcpd -group _dhcp -chroot /var/dhcpd -cf /etc/dhcpd.conf -pf /var/run/dhcpd.pid fxp0 sis0 38953 - Ss 3:50.35 /usr/local/sbin/dhcpd -6 -user dhcpd -group _dhcp -chroot /var/dhcpd -cf /etc/dhcpdv6.conf -pf /var/run/dhcpdv6.pid fxp0 39293 - Is 0:00.07 /usr/local/sbin/dhcpleases6 -c /usr/local/bin/php-cgi -f /usr/local/sbin/prefixes.php|/bin/sh -l /var/dhcpd/var/db/dhcpd6.leases 80698 0 S+ 0:00.00 grep dhcp
Line 1, 4 and 5 are not related.
For me, line 2 is the IPv4 process and line 3 the IPv6 process of dhcpd.Check also :
[2.4.3-RELEASE][admin@pfsense.brit-hotel-fumel.net]/root: sockstat -4l | grep 67 dhcpd dhcpd 34814 8 udp4 *:67 *:* root xinetd 18673 0 udp4 127.0.0.1:6969 *:*
-
@gertjan said in DHCP-Server not handing out leases, "please make sure no other dhcp server is running...":
The message doesn’t mean some other DHCP server is running on your LAN, but some other dhcp server is running on your pfSense box.
Quite so. Multiple DHCP servers are permitted on a LAN and may be used for redundancy etc.. I also got the impression it was about multiple servers on one box. That would definitely cause problems.
-
Thank you all for you responses.
@gertjan said in DHCP-Server not handing out leases, "please make sure no other dhcp server is running...":
Try this : kill them all - and restart (the) one !
How do I do this? What do you mean by kill and by them all? Which one should I restart?
I ran the commands you gave me, here are the outputs, I can't get any useful info out of them. If you could break it down for me, I would be very thankful.
I noticed that the second command didn't work, I can't figure out why though. Any suggestions?
I should also probably mention I tried this but that didn't work also.
-
@bendroid said in DHCP-Server not handing out leases, "please make sure no other dhcp server is running...":
I noticed that the second command didn’t work, I can’t figure out why though. Any suggestions?
Yes, Try the Ctrl-C Ctrl-V method.
You typedsockstat -41 | grep 67
it should be
sockstat -4l | grep 67 (There should be a letter 'l', non a number '1' (one) after the '4')
And instead of coping images, can you copy the text, so we can see the end of the "ps ax" output ?
Like this :[2.4.3-RELEASE][admin@pfsense.brit-hotel-fumel.net]/root: ps ax | grep dhcp 23027 - Ss 1:15.56 /usr/sbin/syslogd -s -c -c -l /var/dhcpd/var/run/log -P /var/run/syslog.pid -f /etc/syslog.conf -b 192.168.1.1 34814 - Ss 4:48.31 /usr/local/sbin/dhcpd -user dhcpd -group _dhcp -chroot /var/dhcpd -cf /etc/dhcpd.conf -pf /var/run/dhcpd.pid fxp0 sis0 ....
Instead of :
.... 34814 - Ss 4:48.31 /usr/local/sbin/dhcpd -user dhcpd -group _dhcp -chroot /var/dhcpd -cf /etc/dhcpd.conf -pf /var/run/d ....
-
Hi
Ah looked right over that one. Thanks for the detailed explanation though.
Output for 'ps ax | grep dhcp' when I run it in the Command Prompt in the web gui:
57253 - S 0:00.00 sh -c ps ax | grep dhcp 2>&1 57387 - S 0:00.00 grep dhcp 63737 - Ss 0:06.44 /usr/local/sbin/dhcpd -user dhcpd -group _dhcp -chro 96036 - Is 0:01.10 /usr/sbin/syslogd -s -c -c -l /var/dhcpd/var/run/log
And when I run it on locally administered machine (IPMI Console, so no copy sorry):
I don't know hot to get the ful line. Any suggestions? Which other console is there? I can't SSH into pfSense.
Output for 'sockstat -4l | grep 67':
dhcpd dhcpd 63737 7 udp4 *:67 *:* root nginx 55679 5 tcp4 *:80 *:*
-
@bendroid said in DHCP-Server not handing out leases, "please make sure no other dhcp server is running...":
dhcpd Can't bind to dhcp address: Address already in use
Hummm.
Google told me this : https://forum.netgate.com/topic/81232/can-t-bind-to-dhcp-address-address-already-in-use/16 - it's time to try what is proposed over there.edit : stop the dhcpd server on all 'LAN' interfaces.
Check that it isn't running anymore in the GUI.
Do the same thing using theps ax | grep dhcp
command. There shouldn't be any instance of dhcpd running.
Reboot pfSEnse.
Start the dhcpd again.Check also the dhcp log, when you start the dhcpd - as shown in the URL above.
-
I don't know if it helps but here's some more info on my setup: I have my LAN on a lagg (lagg0). Range is 192.168.0.0/22 and Router IP-Adress is 192.168.2.1. Yes I know it's weird, but it's how I want it. And I just upgraded to pfSense-DEVELOPMENT 2.4.4.a.20180604.2150. This install is a fresh clean install not much settings changed. So there shouldn't be any settings that could have borked it.
I tried the following steps from the Link you posted:
-
- Disable DHCP service on LAN
-
- Check that there is no dhcp running under services
-
- Reboot pfSense
-
- Enable DHCP service on LAN
Didn't work.
-
- Stop dhcp service under services
-
- Check that the service is stopped
-
- Reboot pfSense
-
- Start dhcp service under services
Also didn't work.
Also: In the log it now only displays this:
Jun 5 21:47:03 dhcpd Internet Systems Consortium DHCP Server 4.3.6-P1 Jun 5 21:47:03 dhcpd Copyright 2004-2018 Internet Systems Consortium. Jun 5 21:47:03 dhcpd All rights reserved. Jun 5 21:47:03 dhcpd For info, please visit https://www.isc.org/software/dhcp/ Jun 5 21:47:03 dhcpd Config file: /etc/dhcpd.conf Jun 5 21:47:03 dhcpd Database file: /var/db/dhcpd.leases Jun 5 21:47:03 dhcpd PID file: /var/run/dhcpd.pid Jun 5 21:47:03 dhcpd Internet Systems Consortium DHCP Server 4.3.6-P1 Jun 5 21:47:03 dhcpd Copyright 2004-2018 Internet Systems Consortium. Jun 5 21:47:03 dhcpd All rights reserved. Jun 5 21:47:03 dhcpd For info, please visit https://www.isc.org/software/dhcp/ Jun 5 21:47:03 dhcpd Wrote 0 leases to leases file. Jun 5 21:47:03 dhcpd Listening on BPF/lagg0/ac:1f:6b:44:bc:2d/192.168.0.0/22 Jun 5 21:47:03 dhcpd Sending on BPF/lagg0/ac:1f:6b:44:bc:2d/192.168.0.0/22 Jun 5 21:47:03 dhcpd Sending on Socket/fallback/fallback-net Jun 5 21:47:03 dhcpd Server starting service.
Which would technically indicate that the dhcp service is running now. But devices are still not getting an IP-adress. Could it have something todo with my lagg?
Also: here's my dhcpd.conf:
option domain-name "bendroid.ch"; option ldap-server code 95 = text; option domain-search-list code 119 = text; option arch code 93 = unsigned integer 16; # RFC4578 default-lease-time 7200; max-lease-time 86400; log-facility local7; one-lease-per-client true; deny duplicates; ping-check true; update-conflict-detection false; authoritative; subnet 192.168.0.0 netmask 255.255.252.0 { pool { option domain-name-servers 192.168.2.1,192.168.2.102; range 192.168.2.121 192.168.2.199; } option routers 192.168.2.1; option domain-name "bendroid.ch"; option domain-name-servers 192.168.2.1,192.168.2.102; }
And I gotta ask: What does the command "ps ax | grep dhcp" do exactly?
-
-
@bendroid said in DHCP-Server not handing out leases, "please make sure no other dhcp server is running...":
Which would technically indicate that the dhcp service is running now. But devices are still not getting an IP-adress. Could it have something todo with my lagg?
So, the log indicates that all should be fine now.
It's time to wireshark, check if DHCP requests are coming into pfSense.I don't know what "lagg" is (I'll look it up).
Btw : the earth, and all things on it and around it were created in several days - a week, I guess.
The story continues : on day 8 it was the command 'ps' - and on day 9 it as 'grep'.
(Ok, I admit, I made this one up just right now)
These two commands could be the most documented things on the Internet. I even tend to say that the Internet was created with the help of these two commands.
Really, Google them up ^^Also : the "|" should be seen as "pipe the output of the left part of the | into the command on the right part".
-
Alright, I figured it out. Stupid me had a DHCP Relay configured on the switch. I noticed it when I started doing packet captures and there was a complete absence of any DCHP-packets over UDP. I remembered thinking it would reduce network load if there weren't DHCP-packets flying aroung all the time. Is that still true nowadays?
Now pfSense receives DHCP-packets and is handing out IP-Adresses. Problem solved on my terms.
Big thanks to @Gertjan for staying and helping. And of course for the hint to start packet capturing.