restarting Exim question ?

Spirogg

Well-Known Member
Feb 21, 2018
700
163
43
chicago
cPanel Access Level
Root Administrator
Hello,
server VPS CentOS 7 Fresh Install cPanel 84.06
when I restart service exim

my question : is this an issue that i need to fix? why does it say after start : No such file or directory ?

Nov 03 19:19:28 cloud1.com systemd[1]: Can't open PID file /var/spool/exim/exim-daemon.pid (yet?) after start: No such file or directory


Restarting Exim Mail Server

Waiting for “exim” to restart ………waiting for “exim” to initialize ………finished.

Service Status
exim (/usr/sbin/exim -ps -bd -q1h -oP /var/spool/exim/exim-daemon.pid) is running as mailnull with PID 8975 (systemd+/proc check method).
exim (/usr/sbin/exim -ps -bd -q1h -oP /var/spool/exim/exim-daemon.pid) is running as mailnull with PID 8976 (systemd+/proc check method).

Startup Log
Nov 03 19:19:28 cloud1.com systemd[1]: Starting Exim is a Mail Transport Agent, which is the program that moves mail from one machine to another....
Nov 03 19:19:28 cloud1.com systemd[1]: Can't open PID file /var/spool/exim/exim-daemon.pid (yet?) after start: No such file or directory
Nov 03 19:19:28 cloud1.com systemd[1]: Started Exim is a Mail Transport Agent, which is the program that moves mail from one machine to another..

Log Messages
2019-11-03 19:19:28 exim 4.92 daemon started: pid=8975, -q1h, listening for SMTP on port 25 (IPv6 and IPv4) port 587 (IPv6 and IPv4) and for SMTPS on port 465 (IPv6 and IPv4)

exim restarted successfully.

thanks in advance.

Spiro
 
Last edited:

Spirogg

Well-Known Member
Feb 21, 2018
700
163
43
chicago
cPanel Access Level
Root Administrator
ok maybe its because we just restarted exim and its still off so PID cant open file, that's why it says (Yet?) : Can't open PID file /var/spool/exim/exim-daemon.pid (yet?) after start:

just making sure never noticed this before

thanks again in advance

Spiro
 

Spirogg

Well-Known Member
Feb 21, 2018
700
163
43
chicago
cPanel Access Level
Root Administrator
Hello,

Do you by chance have anything added in /etc/exim.conf.local?

I do not see a file called /etc/exim.conf.local

here is whats the etc folder

1572912358651.png

i do see a /etc/exim.conf.localopts

contents are below of /etc/exim.conf.localopts


Code:
acl_dont_delay_greylisting_trusted_hosts=1
malware_deferok=1
spamassassin_plugin_CPANEL=1
acl_dont_delay_greylisting_common_mail_providers=0
acl_requirehelonoforge=1
trust_x_php_script=1
spf_include_hosts=
smarthost_routelist=
acl_spamcop_rbl=0
callouts=0
no_forward_outbound_spam=0
allowweakciphers=0
acl_dkim_bl=0
acl_dkim_disable=1
require_secure_auth=1
acl_primary_hostname_bl=0
globalspamassassin=0
custom_mailhelo=0
acl_requirehelonold=0
acl_0tracksenders=0
acl_spamhaus_rbl=0
query_apache_for_nobody_senders=1
rbl_whitelist_greylist_trusted_netblocks=0
filter_spam_rewrite=1
acl_slow_fail_block=1
acl_trustedmailhosts=0
acl_ratelimit=1
exiscanall=0
rbl_whitelist_neighbor_netblocks=1
spamassassin_plugin_BAYES_POISON_DEFENSE=1
acl_spam_scan_secondarymx=1
acl_deny_spam_score_over_int
acl_dictionary_attack=1
spamassassin_plugin_P0f=1
spamassassin_plugin_KAM=1
rewrite_from=disable
spam_deferok=1
filter_attachments=1
spam_header=***SPAM***
acl_delay_unknown_hosts=1
acl_mailproviders=1
systemfilter=/etc/cpanel_exim_system_filter
senderverify=1
acl_outgoing_spam_scan=0
custom_mailips=0
tls_require_ciphers=ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
smarthost_autodiscover_spf_include=1
srs=0
per_domain_mailips=0
acl_outgoing_malware_scan=0
hiderecpfailuremessage=0
max_spam_scan_size=1000
acl_ratelimit_spam_score_over_int
openssl_options= +no_sslv2 +no_sslv3 +no_tlsv1 +no_tlsv1_1
acl_requirehelo=1
rbl_whitelist=
filter_fail_spam_score_over_int
rbl_whitelist_greylist_common_mail_providers=1
acl_requirehelosyntax=1
setsenderheader=0
i never added anything in this file just fyi

thanks please let me know if you need any other content from another file in etc/ ?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,309
363
Houston
I was looking specifically for an advanced configuration in which exim was requested to listen on specific ports - in older versions folks were having exim listen on ports it already listens on and while it functioned in previous versions, it causes similar behavior with exim.

When you restart exim every time does this occur or it was just the one time?
 

Spirogg

Well-Known Member
Feb 21, 2018
700
163
43
chicago
cPanel Access Level
Root Administrator
I was looking specifically for an advanced configuration in which exim was requested to listen on specific ports - in older versions folks were having exim listen on ports it already listens on and while it functioned in previous versions, it causes similar behavior with exim.

When you restart exim every time does this occur or it was just the one time?
it happens every time I restart Exim

Code:
Restarting Exim Mail Server
Waiting for “exim” to restart ………waiting for “exim” to initialize ………finished.

Service Status
exim (/usr/sbin/exim -ps -bd -q1h -oP /var/spool/exim/exim-daemon.pid) is running as mailnull with PID 21845 (systemd+/proc check method).
exim (/usr/sbin/exim -ps -bd -q1h -oP /var/spool/exim/exim-daemon.pid) is running as mailnull with PID 21846 (systemd+/proc check method).

Startup Log
Nov 06 00:42:31 cloud1.com systemd[1]: Starting Exim is a Mail Transport Agent, which is the program that moves mail from one machine to another....
Nov 06 00:42:31 cloud1.com systemd[1]: Can't open PID file /var/spool/exim/exim-daemon.pid (yet?) after start: No such file or directory
Nov 06 00:42:31 cloud1.com systemd[1]: Started Exim is a Mail Transport Agent, which is the program that moves mail from one machine to another..

Log Messages
2019-11-06 00:42:31 exim 4.92 daemon started: pid=21845, -q1h, listening for SMTP on port 25 (IPv6 and IPv4) port 587 (IPv6 and IPv4) and for SMTPS on port 465 (IPv6 and IPv4)

exim restarted successfully.
Not sure if it's just adding this to startup log because it's in-between restarts ?

or if it's really an issue?

@cPanelLauren , Thanks again in advance for your Help :)
Code:
Restarting Exim Mail Server
Waiting for “exim” to restart ………waiting for “exim” to initialize ………finished.

Service Status
exim (/usr/sbin/exim -ps -bd -q1h -oP /var/spool/exim/exim-daemon.pid) is running as mailnull with PID 22659 (systemd+/proc check method).
exim (/usr/sbin/exim -qG) is running as root with PID 22660 (systemd+/proc check method).

Startup Log
Nov 06 00:51:14 cloud1.com systemd[1]: Starting Exim is a Mail Transport Agent, which is the program that moves mail from one machine to another....
Nov 06 00:51:14 cloud1.com systemd[1]: Can't open PID file /var/spool/exim/exim-daemon.pid (yet?) after start: No such file or directory
Nov 06 00:51:14 cloud1.com systemd[1]: Started Exim is a Mail Transport Agent, which is the program that moves mail from one machine to another..

Log Messages
2019-11-06 00:51:14 exim 4.92 daemon started: pid=22659, -q1h, listening for SMTP on port 25 (IPv6 and IPv4) port 587 (IPv6 and IPv4) and for SMTPS on port 465 (IPv6 and IPv4)
2019-11-06 00:42:31 exim 4.92 daemon started: pid=21845, -q1h, listening for SMTP on port 25 (IPv6 and IPv4) port 587 (IPv6 and IPv4) and for SMTPS on port 465 (IPv6 and IPv4)

exim restarted successfully.
 
Last edited:

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,309
363
Houston
So what it seems like is happening is that exim is taking a while to restart - This is why when the PID is looked for it's not being found immediately. It is restarting though, and then it is running. Is the load on the server high or resources constrained at all?
 

Spirogg

Well-Known Member
Feb 21, 2018
700
163
43
chicago
cPanel Access Level
Root Administrator
So what it seems like is happening is that exim is taking a while to restart - This is why when the PID is looked for it's not being found immediately. It is restarting though, and then it is running. Is the load on the server high or resources constrained at all?
Hi sorry for the late response but the answer is NO load is normal and not constrained. but it does restart, just was wondering why.. have you been able to verify that on your server it does the same ? i install server VPS CentOS 7 Fresh Install cPanel 84.06 and now I have upgraded to 84.08 and it still does this.

if you can replicate this on a server then its as you say it is, if not maybe an issue on my vps for some reason ?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,309
363
Houston
I do not get the same behavior when restarting exim:

Code:
[root@server ~]# /scripts/restartsrv_exim
Waiting for “exim” to restart ………waiting for “exim” to initialize ………finished.

Service Status
    exim (/usr/sbin/exim -ps -bd -q1h -oP /var/spool/exim/exim-daemon.pid) is running as mailnull with PID 30814 (systemd+/proc check method).
    exim (/usr/sbin/exim -ps -bd -q1h -oP /var/spool/exim/exim-daemon.pid) is running as mailnull with PID 30815 (systemd+/proc check method).

Startup Log
    Nov 11 10:20:11 server.hostname.com systemd[1]: Starting Exim is a Mail Transport Agent, which is the program that moves mail from one machine to another....
    Nov 11 10:20:11 server.hostname.com systemd[1]: Started Exim is a Mail Transport Agent, which is the program that moves mail from one machine to another..

Log Messages
    2019-11-11 10:20:11 exim 4.92 daemon started: pid=30814, -q1h, listening for SMTP on port 25 (IPv6 and IPv4) port 587 (IPv6 and IPv4) and for SMTPS on port 465 (IPv6 and IPv4)

exim restarted successfully.
How long does restart take?
 

Spirogg

Well-Known Member
Feb 21, 2018
700
163
43
chicago
cPanel Access Level
Root Administrator
I do not get the same behavior when restarting exim:

Code:
[root@server ~]# /scripts/restartsrv_exim
Waiting for “exim” to restart ………waiting for “exim” to initialize ………finished.

Service Status
    exim (/usr/sbin/exim -ps -bd -q1h -oP /var/spool/exim/exim-daemon.pid) is running as mailnull with PID 30814 (systemd+/proc check method).
    exim (/usr/sbin/exim -ps -bd -q1h -oP /var/spool/exim/exim-daemon.pid) is running as mailnull with PID 30815 (systemd+/proc check method).

Startup Log
    Nov 11 10:20:11 server.hostname.com systemd[1]: Starting Exim is a Mail Transport Agent, which is the program that moves mail from one machine to another....
    Nov 11 10:20:11 server.hostname.com systemd[1]: Started Exim is a Mail Transport Agent, which is the program that moves mail from one machine to another..

Log Messages
    2019-11-11 10:20:11 exim 4.92 daemon started: pid=30814, -q1h, listening for SMTP on port 25 (IPv6 and IPv4) port 587 (IPv6 and IPv4) and for SMTPS on port 465 (IPv6 and IPv4)

exim restarted successfully.
How long does restart take?
Maybe 1-2 mins. I am going to do a fresh install of cPanel on a fresh install of CentOS 7 vps and will see if I get the same error. Maybe it was the first build if cPanel will repost in a little bit with the outcome.
 

Spirogg

Well-Known Member
Feb 21, 2018
700
163
43
chicago
cPanel Access Level
Root Administrator
I do not get the same behavior when restarting exim:


Fresh Install on CentOS7 using upcloud service, created new cloud server Stopped and disabled NetworkManager, then installed cPanel using command line from your website

Logged into WHM enabled Quotas, restarted server Gracefully. Logged back in and clicked restart Exim.. also tried restart exim from command line, and I still get the same log error

i went to /var/spool/exim/ and there is a PID file located there

/var/spool/exim/exim-daemon.pid
Capture.PNG



This is the same issue with new install of cPanel 84.08

Code:
Restarting Exim Mail Server
Waiting for “exim” to restart ………waiting for “exim” to initialize ………finished.

Service Status
exim (/usr/sbin/exim -ps -bd -q1h -oP /var/spool/exim/exim-daemon.pid) is running as mailnull with PID 9737 (systemd+/proc check method).
exim (/usr/sbin/exim -qG) is running as root with PID 9740 (systemd+/proc check method).
exim (/usr/sbin/exim -qG) is running as root with PID 9742 (systemd+/proc check method).

Startup Log
Nov 11 22:56:19 host.domain.us systemd[1]: Starting Exim is a Mail Transport Agent, which is the program that moves mail from one machine to another....
Nov 11 22:56:20 host.domain.us systemd[1]: Can't open PID file /var/spool/exim/exim-daemon.pid (yet?) after start: No such file or directory
Nov 11 22:56:20 host.domain.us systemd[1]: Started Exim is a Mail Transport Agent, which is the program that moves mail from one machine to another..

Log Messages
2019-11-11 22:56:20 exim 4.92 daemon started: pid=9737, -q1h, listening for SMTP on port 25 (IPv6 and IPv4) port 587 (IPv6 and IPv4) and for SMTPS on port 465 (IPv6 and IPv4)
2019-11-11 22:49:58 exim 4.92 daemon started: pid=9518, -q1h, listening for SMTP on port 25 (IPv6 and IPv4) port 587 (IPv6 and IPv4) and for SMTPS on port 465 (IPv6 and IPv4)
2019-11-11 22:47:02 exim 4.92 daemon started: pid=9405, -q1h, listening for SMTP on port 25 (IPv6 and IPv4) port 587 (IPv6 and IPv4) and for SMTPS on port 465 (IPv6 and IPv4)
2019-11-11 22:41:14 exim 4.92 daemon started: pid=9267, -q1h, listening for SMTP on port 25 (IPv6 and IPv4) port 587 (IPv6 and IPv4) and for SMTPS on port 465 (IPv6 and IPv4)

exim restarted successfully.
Really Weird
latest version of cPanel that got installed was 84.08 fresh install

thanks again for the help @cPanelLauren
 

Spirogg

Well-Known Member
Feb 21, 2018
700
163
43
chicago
cPanel Access Level
Root Administrator
hi @cPanelLauren just FYI..

ok I did some testing and tried a few other configurations of vps servers in the cloud,

the one I have is just 1 cpu 2 gm ram, it always does this,


the second was 2 cpu 4 gb ram this server was intermittent first it does it then i restart again and it doesnt


the third server was 4cpu 8 gb ram and it never showed this, no matter how many times i restarted exim.

So I am starting to think its the server ram that creates this issue, the less cpu and ram you have the longer it takes to restart and maybe that's why

not sure if its worth the trouble of trying a few different configs on your own cloud servers if you can to verify

Thanks

Spiro
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,309
363
Houston
Hi @Spirogg

Yea, 1-2 minutes is a REALLY long time for exim to restart and would definitely explain why thats occurring.

So I am starting to think its the server ram that creates this issue, the less cpu and ram you have the longer it takes to restart and maybe that's why

This is a result of the amount of available resources on the server, the less it has to work with the longer it's going to take to process a request.
 
  • Like
Reactions: Spirogg

Spirogg

Well-Known Member
Feb 21, 2018
700
163
43
chicago
cPanel Access Level
Root Administrator
@cPanelLauren

Yes that is the issue. If you have anything less than 2cpu 4gb ram it will throw that warning always. If it's above 2cpu and 4 GB ram it doesn't throw that error.

We can mark this as solved.
Sorry for the headache and thanks for all the help

Warm regards,
Spiro
 
  • Like
Reactions: cPanelLauren