The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cpanel loses all but primary IP address

Discussion in 'General Discussion' started by nzipfel, Jul 14, 2010.

  1. nzipfel

    nzipfel Member

    Joined:
    Oct 3, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  2. Miraenda

    Miraenda Well-Known Member

    Joined:
    Jul 28, 2004
    Messages:
    242
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Coralville, Iowa USA
    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.
     
  3. nzipfel

    nzipfel Member

    Joined:
    Oct 3, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    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:

    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.
     
  4. FijianTribe

    FijianTribe Well-Known Member

    Joined:
    Jan 30, 2003
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    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:
     
  5. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    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}
     
Loading...

Share This Page