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.

Unable to restart Exim

Discussion in 'E-mail Discussions' started by ITGabs, Apr 16, 2016.

  1. ITGabs

    ITGabs Well-Known Member

    Joined:
    Jul 30, 2013
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hi,

    I tried many things
    /usr/local/cpanel/scripts/restartsrv_exim
    is trying to start exim but fail all the time

    Waiting for “exim” to start …………………failed.

    Service Error
    (XID nutj3q) The “exim” service failed to start.

    exim has failed. Contact your system administrator if the service does not automagically recover.


    /etc/rc.d/init.d/exim start
    not show anything but if I do a a ps aux | grep exim I can see this

    root 15633 0.5 0.1 72600 24504 ? S 05:05 0:00 /usr/local/cpanel/scripts/restartsrv_exim --restart
    root 15823 6.6 0.1 72752 24620 ? S 05:05 0:00 /usr/local/cpanel/scripts/restartsrv_exim --html --wait --verbose

    But after some seconds or few minutes the process disappear


    This started to happen from 4 or 5 months ago when we upgrade from 11.52 to 54.x

    The only way to keep exim working is rebooting the servers.

    Also Exim fails after any update, also when I removed clamd and exim stopped to work, I installed it again and the same behavior, seems that something is locking exim.

    also the panic log shows only the clamd problem days and weeks ago.

    now I am rebooting but I want the automagically recover back.

    ...I forgot something in whm - service status exim looks like it's working, also changing the service monitor settings doesn't restart exim

    Thanks
     
    #1 ITGabs, Apr 16, 2016
    Last edited: Apr 16, 2016
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    My guess is you have something custom in your exim.conf that preventing exim to start

    backup your custom config ( so maybe you can re-implement it )

    set it back to cpanel defaults and see if it starts
     
  3. ITGabs

    ITGabs Well-Known Member

    Joined:
    Jul 30, 2013
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Probably, but I tried in the Exim configuration in WHM to reset with each option of the "reset tab", also deleted all the /etc/exim*.conf and later force the "Update Server Software" and the behavior is exactly the same.

    If it is safe I could tried to uninstall and install Exim manually but I didn't find info about
     
  4. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    326
    Likes Received:
    24
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi,

    Can you please try to update exim using the below command :

    /scripts/eximup --force

    Also, please check the post related exim issue :

    Exim Mail Server will not start
     
  5. ITGabs

    ITGabs Well-Known Member

    Joined:
    Jul 30, 2013
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    /scripts/eximup should do the work but is already deprecated in cPanel v 56??
    Probably I need something like that script, in the documentation I didn't find anything about a new script to reinstall exim
     
  6. albagarcia

    albagarcia Member

    Joined:
    Mar 11, 2016
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Madrid
    cPanel Access Level:
    DataCenter Provider
    Hello!

    Please try /scripts/upcp --force

    Cheers.
     
    #6 albagarcia, Apr 17, 2016
    Last edited by a moderator: Apr 18, 2016
  7. ITGabs

    ITGabs Well-Known Member

    Joined:
    Jul 30, 2013
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    That I meant that with 'force the "Update Server Software" and the behavior is exactly the same.'
    I also tried things with
    /scripts/restartsrv_exim
    /scripts/restartsrv_eximstats
    /scripts/restartsrv_mailman
    /scripts/restartsrv_imap
    /scripts/restartsrv_clamd
    /scripts/restartsrv_dovecot
    /scripts/restartsrv_spamd
    /scripts/restartsrv_queueprocd
    /scripts/restartsrv_syslogd
    /scripts/restartsrv_p0f
    /scripts/restartsrv_exim
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Could you review /var/log/exim_mainlog and /var/log/exim_paniclog and let us know the output when attempting to start Exim?

    Thank you.
     
  9. ITGabs

    ITGabs Well-Known Member

    Joined:
    Jul 30, 2013
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I found the root of the problem!

    From an answer in another thread Documentation doubt about Configure PHP-FPM with User Pools for EasyApache 4
    I figure out that maybe exim is ok but the commands to restart exim are wrong

    This is a long history I checked many files in /etc/rc.d/init.d/ visudo .bash* profile* /bin/sh > /bin/bash

    and I found the first work around
    service exim status #not show anything
    bash service exim status #show status
    bash service exim restart #it works!

    but this will not restart exim automatically if fails

    playing around
    changing #!/bin/sh to #!/bin/bash in /sbin/services do the trick

    I compared files with other centos servers but I can't find where is the real problem, I know that is some environment variable. (/sbin/service in all the other servers start with #!/bin/sh)

    This somewhat explain why bash behave differently
    Why does /bin/sh behave differently to /bin/bash even if one points to the other?

    UPDATE:
    checking inside /etc/profile.d/ I found some differences with other centos servers, a instalation of ruby, redmine, passenger libs make changes in /etc/profile.d/ some months ago apache didn't start because of that, I cleaned the files manually, checking the code of lang.sh I was suspicious so I renamed it...

    when /etc/profile.d/lang.sh is not present /sbin/service start using sh as shell
    when /etc/profile.d/lang.sh is in present /sbin/service start using bash as shell

    I hope this help someone else, this problem generated a lot of little bugs hard to find.
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page