dhcp報錯

代码你敲我不敲發表於2024-05-13

報錯詳情

  1. 檢視dhcpd.service狀態
  2. 使用命令檢查配置檔案報錯
dhcpd -t -cf /etc/dhcp/dhcpd.conf
  1. 修改配置檔案
  2. 重啟dhcpd服務
[root@servera ~]# systemctl restart dhcpd
Job for dhcpd.service failed because the control process exited with error code.
See "systemctl status dhcpd.service" and "journalctl -xeu dhcpd.service" for details.
[root@servera ~]# journalctl -xeu dhcpd
May 13 19:07:58 servera dhcpd[5893]: 
May 13 19:07:58 servera dhcpd[5893]: This version of ISC DHCP is based on the relea>
May 13 19:07:58 servera dhcpd[5893]: on ftp.isc.org. Features have been added and o>
May 13 19:07:58 servera dhcpd[5893]: have been made to the base software release in>
May 13 19:07:58 servera dhcpd[5893]: it work better with this distribution.
May 13 19:07:58 servera dhcpd[5893]: 
May 13 19:07:58 servera dhcpd[5893]: Please report issues with this software via:
May 13 19:07:58 servera dhcpd[5893]: https://bugzilla.redhat.com/
May 13 19:07:58 servera dhcpd[5893]: 
May 13 19:07:58 servera dhcpd[5893]: exiting.
May 13 19:07:58 servera systemd[1]: dhcpd.service: Main process exited, code=exited>
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://access.redhat.com/support
░░ 
░░ An ExecStart= process belonging to unit dhcpd.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
May 13 19:07:58 servera systemd[1]: dhcpd.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://access.redhat.com/support
░░ 
░░ The unit dhcpd.service has entered the 'failed' state with result 'exit-code'.
May 13 19:07:58 servera systemd[1]: Failed to start DHCPv4 Server Daemon.
░░ Subject: A start job for unit dhcpd.service has failed
░░ Defined-By: systemd
░░ Support: https://access.redhat.com/support
░░ 
░░ A start job for unit dhcpd.service has finished with a failure.
░░ 
░░ The job identifier is 5511 and the job result is failed.
lines 504-535/535 (END)
May 13 19:07:58 servera dhcpd[5893]: 
May 13 19:07:58 servera dhcpd[5893]: This version of ISC DHCP is based on the release available
May 13 19:07:58 servera dhcpd[5893]: on ftp.isc.org. Features have been added and other changes
May 13 19:07:58 servera dhcpd[5893]: have been made to the base software release in order to make
May 13 19:07:58 servera dhcpd[5893]: it work better with this distribution.
May 13 19:07:58 servera dhcpd[5893]: 
May 13 19:07:58 servera dhcpd[5893]: Please report issues with this software via:
May 13 19:07:58 servera dhcpd[5893]: https://bugzilla.redhat.com/
May 13 19:07:58 servera dhcpd[5893]: 
May 13 19:07:58 servera dhcpd[5893]: exiting.
May 13 19:07:58 servera systemd[1]: dhcpd.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://access.redhat.com/support
░░ 
░░ An ExecStart= process belonging to unit dhcpd.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
May 13 19:07:58 servera systemd[1]: dhcpd.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://access.redhat.com/support
░░ 
░░ The unit dhcpd.service has entered the 'failed' state with result 'exit-code'.
May 13 19:07:58 servera systemd[1]: Failed to start DHCPv4 Server Daemon.
░░ Subject: A start job for unit dhcpd.service has failed
░░ Defined-By: systemd
░░ Support: https://access.redhat.com/support
░░ 
░░ A start job for unit dhcpd.service has finished with a failure.
░░ 
░░ The job identifier is 5511 and the job result is failed.
[root@servera ~]# dhcpd -t -cf /etc/dhcp/dhcpd.conf
Internet Systems Consortium DHCP Server 4.4.2b1
Copyright 2004-2019 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
/etc/dhcp/dhcpd.conf line 10: semicolon expected.
  option 
   ^
Configuration file errors encountered -- exiting

This version of ISC DHCP is based on the release available
on ftp.isc.org. Features have been added and other changes
have been made to the base software release in order to make
it work better with this distribution.

Please report issues with this software via: 
https://bugzilla.redhat.com/

exiting.
[root@servera ~]# vim /etc/dhcp/dhcpd.conf 
[root@servera ~]# dhcpd -t -cf /etc/dhcp/dhcpd.conf
Internet Systems Consortium DHCP Server 4.4.2b1
Copyright 2004-2019 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
ldap_gssapi_principal is not set,GSSAPI Authentication for LDAP will not be used
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Config file: /etc/dhcp/dhcpd.conf
Database file: /var/lib/dhcpd/dhcpd.leases
PID file: /var/run/dhcpd.pid
Source compiled to use binary-leases
[root@servera ~]# systemctl restart dhcpd