Can't bind to dhcp address: Address already in use



  • DHCP service seems to be working but I get this message at startup. I do not have any other server running. What is the explanation of this message?

    php-fpm[57669]: /rc.newwanip: The command '/usr/local/sbin/dhcpd -user dhcpd -group _dhcp -chroot /var/dhcpd -cf /etc/dhcpd.conf -pf /var/run/dhcpd.pid re1' returned exit code '1', the output was 'Internet Systems Consortium DHCP Server 4.2.6 Copyright 2004-2014 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Wrote 0 deleted host decls to leases file. Wrote 0 new dynamic host decls to leases file. Wrote 7 leases to leases file. Listening on BPF/re1/ <snip>Sending on BPF/re1/ <snip>Can't bind to dhcp address: Address already in use Please make sure there is no other dhcp server running and that there's no entry for dhcp or bootp in /etc/inetd.conf. Also make sure you are not running HP JetAdmin software, which includes a bootp server. 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</snip></snip>



  • Have you checked to see if you have a host with a static address on your network which falls within the DHCP range you've specified?



  • Thank you for your input on deciphering my message log for dhcpd.

    I ran nmap to lping scan all computers on the subnet so no surprises. The dhcp range is only 10 addresses. I could narrow it down if it would help troubleshoot.



  • Have you tried changing the available address range? If you're only providing 10 addresses, you might see if you get the same error if you alter the range to start from one up from the top address of the existing range and end ten addresses up from there.

    Just as an afterthought, the IP of your firewall isn't being included in the DHCP range you've specified, has it?



  • "Please make sure there is no other dhcp server running"

    Do you have another router or wireless AP on the network?



  • I used dhcping to scan the entire subnet and only answer received was from pfsense. Since the message does not seem to be a problem I will move on. Thank you.



  • Well - I guess thats not the problem then.  (-:



  • kejianshi

    I have the same error in my logs. Running 2.2-RELEASE (i386).  I am very sure there is no other DHCP server on this lan but pfSense. The range is 20 addresses. 100-120

    I ran DHCPLOC to be sure. Below I asked for a new OFFER several times.

    D:\SC7>dhcploc 10.3.15.77
    23:17:28    OFFER (IP)10.3.15.107    (S)10.3.15.1      ***
    23:17:29    OFFER (IP)10.3.15.107    (S)10.3.15.1      ***
    23:17:29    OFFER (IP)10.3.15.107    (S)10.3.15.1      ***
    23:17:30    OFFER (IP)10.3.15.107    (S)10.3.15.1      ***
    23:17:30    OFFER (IP)10.3.15.107    (S)10.3.15.1      ***
    23:17:30    OFFER (IP)10.3.15.107    (S)10.3.15.1      ***
    23:17:30    OFFER (IP)10.3.15.107    (S)10.3.15.1      ***
    23:17:30    OFFER (IP)10.3.15.107    (S)10.3.15.1      ***

    D:\SC7>

    As you can see only pfSense (10.3.15.1) answered.

    The statement " Can't bind to dhcp address: Address already in use" is curious. I also checked  /etc/inetd.conf
    and it contains:
    tftp-proxy dgram udp wait root /usr/libexec/tftp-proxy tftp-proxy

    I am seeing this alot .. not just at startup

    Any Ideas?




  • I'm not seeing it.  For anyone running 2.2 and having issues my (perhaps obvious and not helpful) recommendation is try 2.2.1



  • I had the same error message as well, I fixed it by disable DHCP on all interface, make sure DHCPD is gone from services list. then enable DHCP again.

    when I had the issue, services would show DHCPD is running, but clients do not receive IP, I see the same error message every time I restart DHCPD. the problem started after I setup HA and upgraded from 2.2 to 2.2.1. I am not sure which action triggered the issue.

    HTH



  • @robinxyz:

    I had the same error message as well, I fixed it by disable DHCP on all interface, make sure DHCPD is gone from services list. then enable DHCP again.

    when I had the issue, services would show DHCPD is running, but clients do not receive IP, I see the same error message every time I restart DHCPD. the problem started after I setup HA and upgraded from 2.2 to 2.2.1. I am not sure which action triggered the issue.

    HTH

    robinxyz - You are the Man!!! Funny how rebooting didn't solve the problem but following your steps does. I had installed a 2.2.1 on my test box and was about to replace the production unit with it when I saw your response.

    Thanks



  • I have this problem too, i have no other DHCP servers running either on the box or on the LAN

    the logfile:

    May 22 10:30:10 stella_nova dhcpd: Received signal 15, initiating shutdown.
    May 22 10:30:10 stella_nova dhcpd: Disabling output on BPF/bridge0/02:72:9c:b8:d0:00/192.168.15.0/24
    May 22 10:30:10 stella_nova dhcpd: Disabling input on BPF/bridge0/02:72:9c:b8:d0:00/192.168.15.0/24
    May 22 10:30:11 stella_nova dhcpd: Internet Systems Consortium DHCP Server 4.2.6
    May 22 10:30:11 stella_nova dhcpd: Copyright 2004-2014 Internet Systems Consortium.
    May 22 10:30:11 stella_nova dhcpd: All rights reserved.
    May 22 10:30:11 stella_nova dhcpd: For info, please visit https://www.isc.org/software/dhcp/
    May 22 10:30:11 stella_nova dhcpd: Internet Systems Consortium DHCP Server 4.2.6
    May 22 10:30:11 stella_nova dhcpd: Copyright 2004-2014 Internet Systems Consortium.
    May 22 10:30:11 stella_nova dhcpd: All rights reserved.
    May 22 10:30:11 stella_nova dhcpd: For info, please visit https://www.isc.org/software/dhcp/
    May 22 10:30:11 stella_nova dhcpd: Wrote 14 leases to leases file.
    May 22 10:30:11 stella_nova dhcpd: Listening on BPF/bridge0/02:72:9c:b8:d0:00/192.168.15.0/24
    May 22 10:30:11 stella_nova dhcpd: Sending on  BPF/bridge0/02:72:9c:b8:d0:00/192.168.15.0/24
    May 22 10:30:11 stella_nova dhcpd: Sending on  Socket/fallback/fallback-net
    May 22 10:30:19 stella_nova dhcpd: Received signal 15, initiating shutdown.
    May 22 10:30:19 stella_nova dhcpd: Disabling output on BPF/bridge0/02:72:9c:b8:d0:00/192.168.15.0/24
    May 22 10:30:19 stella_nova dhcpd: Disabling input on BPF/bridge0/02:72:9c:b8:d0:00/192.168.15.0/24
    May 22 10:30:20 stella_nova dhcpd: Internet Systems Consortium DHCP Server 4.2.6
    May 22 10:30:20 stella_nova dhcpd: Copyright 2004-2014 Internet Systems Consortium.
    May 22 10:30:20 stella_nova dhcpd: All rights reserved.
    May 22 10:30:20 stella_nova dhcpd: For info, please visit https://www.isc.org/software/dhcp/
    May 22 10:30:20 stella_nova dhcpd: Internet Systems Consortium DHCP Server 4.2.6
    May 22 10:30:20 stella_nova dhcpd: Copyright 2004-2014 Internet Systems Consortium.
    May 22 10:30:20 stella_nova dhcpd: All rights reserved.
    May 22 10:30:20 stella_nova dhcpd: For info, please visit https://www.isc.org/software/dhcp/
    May 22 10:30:20 stella_nova dhcpd: Wrote 14 leases to leases file.
    May 22 10:30:20 stella_nova dhcpd: Listening on BPF/bridge0/02:72:9c:b8:d0:00/192.168.15.0/24
    May 22 10:30:20 stella_nova dhcpd: Sending on  BPF/bridge0/02:72:9c:b8:d0:00/192.168.15.0/24
    May 22 10:30:20 stella_nova dhcpd: Sending on  Socket/fallback/fallback-net
    May 22 10:30:43 stella_nova dhcpd: Received signal 15, initiating shutdown.
    May 22 10:30:43 stella_nova dhcpd: Disabling output on BPF/bridge0/02:72:9c:b8:d0:00/192.168.15.0/24
    May 22 10:30:43 stella_nova dhcpd: Disabling input on BPF/bridge0/02:72:9c:b8:d0:00/192.168.15.0/24
    May 22 10:30:44 stella_nova dhcpd: Internet Systems Consortium DHCP Server 4.2.6
    May 22 10:30:44 stella_nova dhcpd: Copyright 2004-2014 Internet Systems Consortium.
    May 22 10:30:44 stella_nova dhcpd: All rights reserved.
    May 22 10:30:44 stella_nova dhcpd: For info, please visit https://www.isc.org/software/dhcp/
    May 22 10:30:44 stella_nova dhcpd: Internet Systems Consortium DHCP Server 4.2.6
    May 22 10:30:44 stella_nova dhcpd: Copyright 2004-2014 Internet Systems Consortium.
    May 22 10:30:44 stella_nova dhcpd: All rights reserved.
    May 22 10:30:44 stella_nova dhcpd: For info, please visit https://www.isc.org/software/dhcp/
    May 22 10:30:44 stella_nova dhcpd: Wrote 14 leases to leases file.
    May 22 10:30:44 stella_nova dhcpd: Listening on BPF/bridge0/02:72:9c:b8:d0:00/192.168.15.0/24
    May 22 10:30:44 stella_nova dhcpd: Sending on  BPF/bridge0/02:72:9c:b8:d0:00/192.168.15.0/24
    May 22 10:30:44 stella_nova dhcpd: Sending on  Socket/fallback/fallback-net
    May 22 10:30:45 stella_nova dhcpd: Internet Systems Consortium DHCP Server 4.2.6
    May 22 10:30:45 stella_nova dhcpd: Copyright 2004-2014 Internet Systems Consortium.
    May 22 10:30:45 stella_nova dhcpd: All rights reserved.
    May 22 10:30:45 stella_nova dhcpd: For info, please visit https://www.isc.org/software/dhcp/
    May 22 10:30:45 stella_nova dhcpd: Internet Systems Consortium DHCP Server 4.2.6
    May 22 10:30:45 stella_nova dhcpd: Copyright 2004-2014 Internet Systems Consortium.
    May 22 10:30:45 stella_nova dhcpd: All rights reserved.
    May 22 10:30:45 stella_nova dhcpd: For info, please visit https://www.isc.org/software/dhcp/
    May 22 10:30:45 stella_nova dhcpd: Wrote 14 leases to leases file.
    May 22 10:30:45 stella_nova dhcpd: Listening on BPF/bridge0/02:72:9c:b8:d0:00/192.168.15.0/24
    May 22 10:30:45 stella_nova dhcpd: Sending on  BPF/bridge0/02:72:9c:b8:d0:00/192.168.15.0/24
    May 22 10:30:45 stella_nova dhcpd: Can't bind to dhcp address: Address already in use
    May 22 10:30:45 stella_nova dhcpd: Please make sure there is no other dhcp server
    May 22 10:30:45 stella_nova dhcpd: running and that there's no entry for dhcp or
    May 22 10:30:45 stella_nova dhcpd: bootp in /etc/inetd.conf.  Also make sure you
    May 22 10:30:45 stella_nova dhcpd: are not running HP JetAdmin software, which
    May 22 10:30:45 stella_nova dhcpd: includes a bootp server.
    May 22 10:30:45 stella_nova dhcpd:
    May 22 10:30:45 stella_nova dhcpd: If you did not get this software from ftp.isc.org, please
    May 22 10:30:45 stella_nova dhcpd: get the latest from ftp.isc.org and install that before
    May 22 10:30:45 stella_nova dhcpd: requesting help.
    May 22 10:30:45 stella_nova dhcpd:
    May 22 10:30:45 stella_nova dhcpd: If you did get this software from ftp.isc.org and have not
    May 22 10:30:45 stella_nova dhcpd: yet read the README, please read it before requesting help.
    May 22 10:30:45 stella_nova dhcpd: If you intend to request help from the dhcp-bugs at isc.org
    May 22 10:30:45 stella_nova dhcpd: mailing list, please read the section on the README about
    May 22 10:30:45 stella_nova dhcpd: submitting bug reports and requests for help.
    May 22 10:30:45 stella_nova dhcpd:
    May 22 10:30:45 stella_nova dhcpd: Please do not under any circumstances send requests for
    May 22 10:30:45 stella_nova dhcpd: help directly to the authors of this software - please
    May 22 10:30:45 stella_nova dhcpd: send them to the appropriate mailing list as described in
    May 22 10:30:45 stella_nova dhcpd: the README file.
    May 22 10:30:45 stella_nova dhcpd:
    May 22 10:30:45 stella_nova dhcpd: exiting.

    it can be after 5 minutes or several hours



  • I made a fix to this by adding the package 'cron' and applying a job every 15 min with

    /usr/bin/killall -9 dhcpd && /usr/local/sbin/dhcpd -cf /var/dhcpd/etc/dhcpd.conf -lf /var/dhcpd/var/db/dhcpd.leases

    it is not a nice way but it works for now



  • have anyone found a better solution than the fix i made?



  • the "disable DHCP on all interface, make sure DHCPD is gone from services list. then enable DHCP again." method worked for me, and I have not had problem with DHCP since. Have you tried that?



  • I know this is a Old topic.

    but i got the same error.

    php-fpm[65635]: /status_services.php: The command '/usr/local/sbin/dhcpd -user dhcpd -group _dhcp -chroot /var/dhcpd -cf /etc/dhcpd.conf -pf /var/run/dhcpd.pid igb1' 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/ Wrote 0 deleted host decls to leases file. Wrote 0 new dynamic host decls to leases file. Wrote 4 leases to leases file. Listening on BPF/igb1/…. Sending on BPF/igb1/.... Can't bind to dhcp address: Address already in use Please make sure there is no other dhcp server running and that there's no entry for dhcp or bootp in /etc/inetd.conf. Also make sure you are not running HP JetAdmin software, which includes a bootp server. 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.

    I do have an HP all in 1. I did do a scan and a print around the time when this happend. and when i wanted to go a website it didnt work when i checked in pfsense Unbound stoped. I could just start it again without any problems.

    i will do when i get back another test where i turn on the printer and see if it will stop unbound again. i normally dont have the printer powered on at all only when i use it so i never had this Unbound problem.

    if it does kill unbound again when i give a command to the printer/scanner then that is the problem.  But no idea how to solve that.



  • norspang…thanks for your cronjob...it has saved me a lot of hassle...not ideal but gets the job done.


Log in to reply