dhclient preventing network.service from starting



  • So a user who operates on a centos box had an issue today that I was able to fix, but I'm uncertain of what happened / was changed to have caused it in the first place.

    To summarize the system has 2 NICs installed, one for the network and the other for a target device. The Target device is attached to eth0 on the user system.

    I was told the system was acting funny and rebooted in a hopes to correct the funny-ness. I was called immediately afterwards.

    I checked the NIC interfaces to see if they were up and eth0 didn't have the assigned IP address, which I knew was the issue.

    I attempted to start the network service with systemctl start network.service which failed, because dhclient was running. (error 1)

    I killed the process by confirming it with this ps ax | grep [d]cli then sudo killall dhclient and lastly systemctl start network.service, so what would've changed or caused dhclient to start on the system? What is the fix to keeping dhclient disabled and allowing network.service to manage the interfaces?



  • @dustinb3403 Does the system have an static ip assigned? Because if it does not, if I am not mistaken, NetworkManager should be managing dhclient by default .

    You could have tried

    sudo dhclient -r eth0
    sudo dhclient eth0
    

    or restarting NetworkManager.service, it should have fixed your problem.



  • Both interfaces are statically assigned. Eth0 directly connects to a server using a preassigned IP address (that isn't in our scope) nor browseable.



  • Disabled network manager and the issue appears to be resolved. @Romo thanks for the help.



  • @dustinb3403 said in dhclient preventing network.service from starting:

    Disabled network manager and the issue appears to be resolved. @Romo thanks for the help.

    After all these years, it's still a pain in the neck.



Looks like your connection to MangoLassi was lost, please wait while we try to reconnect.