Job for dhcpd.service failed because the control process exited with error code. See "systemctl status dhcpd.service" and "journalctl -xe" for details.問題


我總結了下啟動dhcp服務報這個錯誤原因,大概有以下三種情況:

1、配置文件默認為空

2、配置文件配置錯誤導致

3、與網卡設置有關,不能自動獲取到地址,導致dhcp服務不能啟動。

上面兩種錯誤一般很少出現,只要正確配置就能成功,但第三種配置正確后也不一定會成功,今天我就遇到了這個問題,后面發現是網卡這邊問題,就成功而解。

當我們做實驗時,會把VMware workstations dhcp功能關閉,並把網卡設置自動獲取,重啟網卡時。就會報 network.service failed錯誤,網卡此時報這個錯誤很正常,沒有獲取到IP地址肯定啟不來的。現在我們需要給網卡設置一個在dhcp范圍內的一個地址,把 network服務啟起來,再去啟動dhcpd服務。注:IPv4地址為自動獲取,保存即可

[root@www ~]# nmtui

 

此時如果network服務還是起不來,需要把 /etc/sysconfig/network-scripts/目錄下 ifcfg 網卡配置文件多余的刪除即可。

現在dhcpd服務就可啟動啦,並且還為網卡重新配置了一個地址

  

 

 

為避免地址沖突,把之前設置的地址刪掉,重啟network服務就可以了,此時我們就能自動獲取到dhcp范圍內的地址。

注:我總結了下第三種出錯的原因,就是在搭建dhcp服務時,網卡IP地址網段與dhcp IP網段不一致導致的。只需要把網卡與dhcp服務網段保持一致就行。如果當網卡沒獲取到地址,報了啟動失敗錯誤時,我們只能手動為網卡設置一個地址,保證網卡能正常啟動,在去啟動 dhcpd 服務,重新把之前設置的地址只刪除,網卡設置為自動獲取就可以啦。 

 

如果以上解決不了可根據提示執行systemctl status dhcpd.service 和 journalctl -xe命令,查找關鍵詞分析錯誤原因或者查看相關日志文件,在進行相關操作。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



猜您在找 [linux]DHCP服務器啟動報錯Job for dhcpd.service failed because the control process exited with error code. See “systemctl status dhcpd.service” and “journalctl -xe” for details. Job for postfix.service failed because the control process exited with error code. See "systemctl status postfix.service" and "journalctl -xe" for details. Linux 重啟網卡失敗 Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details. mysql—Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details. 【問題管理】 -- RabbitMQ啟動時報錯:Job for rabbitmq-server.service failed because the control process exited with error code. See "systemctl status rabbl -xe" for details. Jenkins 安裝啟動提示“iJob for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.” Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details 045.PGSQL-啟動數據庫報錯Job for postgresql-13.service failed because the control process exited with error code. See "systemctl status postgresql-13.service" and "journalctl -xe" for details. Job for nginx.service failed because the control process exited with error code. See “systemctl stat See "systemctl status postfix.service" and "journalctl -xe" for details.
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM