Cpanel loses all but primary IP address

nzipfel

Member
Oct 3, 2008
5
0
51
I have this random problem on my server. cPanel will periodically lose all the IP addresses assigned to my server accept the primary IP address (I have 7 IPs). If I look at the file /etc/ips the IPs are all still there but if I look at the "Show IP Address Usage" only the primary IP is shown. I then have to delete the entries in /etc/ips and then add them through cPanel. Any idea what could be causing this to occur? My hosting provider hasn't been able to provide an answer for it.

Nathan
 

Miraenda

Well-Known Member
Jul 28, 2004
243
5
168
Coralville, Iowa USA
cPanel Access Level
Root Administrator
Please run the following command using one of the IPs your machine keeps losing as the IP# in the command:

Code:
egrep IP# /var/log/messages
If you have avahi improperly configured and running on your machine, it will withdraw the IPs on running either a) a reboot, or b) a network restart, so you'll see lines like the following in /var/log/messages for that IP:

Code:
Jul 4 02:45:41 server avahi-daemon[415]: Registering new address record for IP# on eth0.
Jul 4 02:45:42 server avahi-daemon[415]: Withdrawing address record for IP# on eth0.
Jul 4 02:54:45 server avahi-daemon[415]: Registering new address record for IP# on eth0.
Jul 4 02:56:14 server named[486]: no longer listening on IP#53
Jul 4 02:56:14 server named[644]: listening on IPv4 interface eth0:1, IP#53
Next, when you ps aux|grep for it, you'll see these type of processes:

Code:
# ps aux|grep avahi
avahi   415  0.0  0.0  2172  1412 ?  Ss 02:45 0:00 avahi-daemon: running
avahi   417  0.0  0.0  2148   336 ?  Ss 02:45 0:00 avahi-daemon: chroot helper
If you do see this type of information, then please contact your datacenter to have them either stop avahi or properly register your IPs in avahi for these to be recognized. That service is what is causing the issue to occur.

Until the issue is fixed by your datacenter, service provider or NOC, you can run /etc/init.d/ipaliases restart to get the IPs back in the list. An ipaliases restart will bring back any missing IPs without removing and re-adding them. Unfortunately, avahi will withdraw them again on network restart (/etc/init.d/network restart) or server reboot.
 

nzipfel

Member
Oct 3, 2008
5
0
51
follow-up

Thanks for the quick reply.

I ran the first egrep and didn't find what you said to look for. Looking around I did see the following entries that happened prior to me noticing one of my domains was down due to this issue:

Jul 14 11:01:52 DED-004 kernel: e1000: eth0: e1000_clean_tx_irq: Detected Tx Unit Hang
Jul 14 11:01:54 DED-004 kernel: e1000: eth0: e1000_clean_tx_irq: Detected Tx Unit Hang
Jul 14 11:01:56 DED-004 kernel: e1000: eth0: e1000_clean_tx_irq: Detected Tx Unit Hang
Jul 14 11:01:58 DED-004 NetworkManager: <info> (eth0): carrier now OFF (device state 8)
Jul 14 11:01:58 DED-004 NetworkManager: <info> (eth0): device state change: 8 -> 2
Jul 14 11:01:58 DED-004 NetworkManager: <info> (eth0): deactivating device (reason: 40).
Jul 14 11:01:58 DED-004 NetworkManager: <WARN> check_one_route(): (eth0) error -34 returned from rtnl_route_del(): Sucess#012
Jul 14 11:01:58 DED-004 NetworkManager: <WARN> check_one_address(): (eth0) error -99 returned from rtnl_addr_delete(): Sucess#012
Jul 14 11:01:58 DED-004 NetworkManager: <WARN> check_one_address(): (eth0) error -99 returned from rtnl_addr_delete(): Sucess#012
Jul 14 11:01:58 DED-004 NetworkManager: <WARN> check_one_address(): (eth0) error -99 returned from rtnl_addr_delete(): Sucess#012
Jul 14 11:01:58 DED-004 NetworkManager: <WARN> check_one_address(): (eth0) error -99 returned from rtnl_addr_delete(): Sucess#012
Jul 14 11:01:58 DED-004 NetworkManager: <WARN> check_one_address(): (eth0) error -99 returned from rtnl_addr_delete(): Sucess#012
Jul 14 11:01:58 DED-004 NetworkManager: <WARN> check_one_address(): (eth0) error -99 returned from rtnl_addr_delete(): Sucess#012
Jul 14 11:02:00 DED-004 kernel: e1000: eth0: e1000_watchdog: NIC Link is Up 10 Mbps Full Duplex, Flow Control: RX
Jul 14 11:02:00 DED-004 NetworkManager: <info> (eth0): carrier now ON (device state 2)
Jul 14 11:02:00 DED-004 NetworkManager: <info> (eth0): device state change: 2 -> 3
Jul 14 11:02:00 DED-004 NetworkManager: <info> Activation (eth0) starting connection 'System eth0'
Jul 14 11:02:00 DED-004 NetworkManager: <info> (eth0): device state change: 3 -> 4
Jul 14 11:02:00 DED-004 NetworkManager: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) scheduled...
Jul 14 11:02:00 DED-004 NetworkManager: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) started...
Jul 14 11:02:00 DED-004 NetworkManager: <info> Activation (eth0) Stage 2 of 5 (Device Configure) scheduled...
Jul 14 11:02:00 DED-004 NetworkManager: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) complete.
Jul 14 11:02:00 DED-004 NetworkManager: <info> Activation (eth0) Stage 2 of 5 (Device Configure) starting...
Jul 14 11:02:00 DED-004 NetworkManager: <info> (eth0): device state change: 4 -> 5
Jul 14 11:02:00 DED-004 NetworkManager: <info> Activation (eth0) Stage 2 of 5 (Device Configure) successful.
Jul 14 11:02:00 DED-004 NetworkManager: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) scheduled.
Jul 14 11:02:00 DED-004 NetworkManager: <info> Activation (eth0) Stage 2 of 5 (Device Configure) complete.
Jul 14 11:02:00 DED-004 NetworkManager: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) started...
Jul 14 11:02:00 DED-004 NetworkManager: <info> (eth0): device state change: 5 -> 7
Jul 14 11:02:00 DED-004 NetworkManager: <info> Activation (eth0) Stage 4 of 5 (IP Configure Get) scheduled...
Jul 14 11:02:00 DED-004 NetworkManager: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) complete.
Jul 14 11:02:00 DED-004 NetworkManager: <info> Activation (eth0) Stage 4 of 5 (IP Configure Get) started...
Jul 14 11:02:00 DED-004 NetworkManager: <info> Activation (eth0) Stage 5 of 5 (IP Configure Commit) scheduled...
Jul 14 11:02:00 DED-004 NetworkManager: <info> Activation (eth0) Stage 4 of 5 (IP Configure Get) complete.
Jul 14 11:02:00 DED-004 NetworkManager: <info> Activation (eth0) Stage 5 of 5 (IP Configure Commit) started...
I did check and avahi is running like you showed. I will contact the datacenter about it to make sure all of my IPs are properly registered.
 

FijianTribe

Well-Known Member
Jan 30, 2003
70
0
156
I have this same issue and I've also validated that avahi-deamon is disabled and not running.

Anytime I have to restart the network service, all but my primary IP addresses are lost.

:mad:
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
I have this same issue and I've also validated that avahi-deamon is disabled and not running.

Anytime I have to restart the network service, all but my primary IP addresses are lost.

:mad:
Have you checked your system logs for clues, as suggested earlier? What log entries were found?

Via root SSH access, please run the following commands and provide their output:
Code:
# grep -H '' /etc/redhat-release /usr/local/cpanel/version /var/cpanel/envtype
# chkconfig --list | egrep "^(ipaliases|avahi)"
If ipaliases is off for all run-levels, try the following to enable it:
Code:
# chkconfig ipaliases on
The init script may be used to manually test ipaliases:
Code:
# /etc/init.d/ipaliases 
Usage: ipaliases {start|stop|restart|reload}