Can't start dhcp service
Please help! I went my Centos4 server today to restart my dhcp service, and I discover that I can't restart it. It is stopped now, but won't start. It says, "Can't open lease database... Permission denied... Check for failed database rewrite attept!" but I am logged in as root via the CLI over the network.
I did make some changes to the dhcp.conf file. But the service is acting differently than it used to. It used to tell me whether there were errors in the conf file, and where where they were. Now it tells me something else. Please help! |
Well, it seems that somehow selinux became enabled (I'm not sure how), and that conflicts with the dhcp service, as I understand. I disabled it, but would have to reboot the machine to put that in place.
Is there not a way to restart the dhcp service with selinux running? |
Put selinux into permissive mode by typing
Code:
# setenforce 0 Code:
# setsebool -P dhcpd_disable_trans 1 |
SELinux does not conflict with DHCP it just means you have it incorrectly configured. I may be able to walk you through configuring it if you're willing rather than blanket disabling everything.
|
Solved
Well, folks, I did change the selinux option to disable and then restarted the server when noone was on the phone (asterisk). When it came back on line everything worked fine.
I didn't make up the part about selinux blocking the dhcp (I can't remember where someone said that would solve it) - I don't doubt you are right, sag47, but disabling it did in fact, work. If it were a configuration error then the service wouldn't start. But now I can start and restart as I like (which is how it worked before when I had selinux disabled in the first place). @mikey99, thanks for the tidibit about the selinux configuration entry. Thank you all for helping me out! I appreciate your advice and attention. |
Quote:
My dhcp works just fine with SELinux enabled. Code:
[root@stealth lib]# ls -Z /var/lib | grep dhcpd I would also like you to note the security context type on /etc/dhcp/dhcpd.conf (the type is dhcp_etc_t) and /var/lib/dhcpd/ folder (the type is dhcpd_state_t). The contents of /var/lib/dhcpd/ should also be of type dhcpd_state_t. If it's not then see the man page for restorecon command (namely the -R option) search my LQ blog entries for selinux where I encounter problems and resolve them. By disabling SELinux you're removing a primary feature that makes having CentOS or RHEL worth having over other operating systems. |
All times are GMT -5. The time now is 02:19 AM. |