Exim - remove and reinstall

rdns

Verified User
Joined
Feb 3, 2008
Messages
11
[SOLVED] Exim - remove and reinstall (exim dead but pid file exists)

Greetings,

im trying to find a way to remove and reinstall exim for my FreeBSD 6.3-RELEASE server since i've got problem running exim from DirectAdmin
the exim process was stopped and never starts even forced many times

i tried to find docs on DA remove/install exim but i found none

main problem: unable to start exim
Code:
# /usr/local/etc/rc.d/exim start
Starting exim:          [ OK ]

# /usr/local/etc/rc.d/exim status
exim dead but pid file exists

# ps aux|grep exim
#
(none)

thank you in advanced!
 
Last edited:
[root@matrix /usr/local/directadmin/customapache]# /usr/local/etc/rc.d/exim restart
Shutting down exim: [ FAILED ]
Starting exim: [ OK ]

[root@matrix /usr/local/directadmin/customapache]# /usr/local/etc/rc.d/exim status
exim dead but pid file exists
[root@matrix /usr/local/directadmin/customapache]# locate exim.pid
/var/run/exim.pid

[root@matrix /usr/local/directadmin/customapache]# rm -f /var/run/exim.pid

[root@matrix /usr/local/directadmin/customapache]# /usr/local/etc/rc.d/exim restart
Shutting down exim: [ FAILED ]
Starting exim: [ OK ]

[root@matrix /usr/local/directadmin/customapache]# /usr/local/etc/rc.d/exim status
exim dead but pid file exists

[root@matrix /usr/local/directadmin/customapache]#

i follow the guide here - http://help.directadmin.com/item.php?id=51 but still got the error message -- exim dead but pid file exists

message logs:
[root@matrix /var/log]# tail -n 20 messages
Feb 4 12:55:21 matrix exim: 2008-02-04 12:55:21 Cannot open main log file "/var/log/exim/mainlog": Permission denied: euid=12 egid=6
Feb 4 12:55:21 matrix exim: exim: could not open panic log - aborting: see message(s) above
Feb 4 12:55:32 matrix exim: 2008-02-04 12:55:32 exim 4.62 daemon started: pid=61916, -q1h, listening for SMTP on port 25 (IPv4) port 587 (IPv4)
Feb 4 12:55:32 matrix exim: 2008-02-04 12:55:32 Cannot open main log file "/var/log/exim/mainlog": Permission denied: euid=12 egid=6
Feb 4 12:55:32 matrix exim: exim: could not open panic log - aborting: see message(s) above
Feb 4 12:56:15 matrix exim: 2008-02-04 12:56:15 exim 4.62 daemon started: pid=62413, -q1h, listening for SMTP on port 25 (IPv4) port 587 (IPv4)
Feb 4 12:56:15 matrix exim: 2008-02-04 12:56:15 Cannot open main log file "/var/log/exim/mainlog": Permission denied: euid=12 egid=6
Feb 4 12:56:15 matrix exim: exim: could not open panic log - aborting: see message(s) above
Feb 4 12:56:21 matrix exim: 2008-02-04 12:56:21 exim 4.62 daemon started: pid=62472, -q1h, listening for SMTP on port 25 (IPv4) port 587 (IPv4)
Feb 4 12:56:21 matrix exim: 2008-02-04 12:56:21 Cannot open main log file "/var/log/exim/mainlog": Permission denied: euid=12 egid=6
Feb 4 12:56:21 matrix exim: exim: could not open panic log - aborting: see message(s) above
Feb 4 12:56:31 matrix exim: 2008-02-04 12:56:31 exim 4.62 daemon started: pid=63988, -q1h, listening for SMTP on port 25 (IPv4) port 587 (IPv4)
Feb 4 12:56:31 matrix exim: 2008-02-04 12:56:31 Cannot open main log file "/var/log/exim/mainlog": Permission denied: euid=12 egid=6
Feb 4 12:56:31 matrix exim: exim: could not open panic log - aborting: see message(s) above
Feb 4 12:57:21 matrix exim: 2008-02-04 12:57:21 exim 4.62 daemon started: pid=64522, -q1h, listening for SMTP on port 25 (IPv4) port 587 (IPv4)
Feb 4 12:57:21 matrix exim: 2008-02-04 12:57:21 Cannot open main log file "/var/log/exim/mainlog": Permission denied: euid=12 egid=6
Feb 4 12:57:21 matrix exim: exim: could not open panic log - aborting: see message(s) above
Feb 4 12:57:31 matrix exim: 2008-02-04 12:57:31 exim 4.62 daemon started: pid=64629, -q1h, listening for SMTP on port 25 (IPv4) port 587 (IPv4)
Feb 4 12:57:31 matrix exim: 2008-02-04 12:57:31 Cannot open main log file "/var/log/exim/mainlog": Permission denied: euid=12 egid=6
Feb 4 12:57:31 matrix exim: exim: could not open panic log - aborting: see message(s) above
[root@matrix /var/log]#

exim logs directory permission:
[root@matrix /var/log]# ls -la|grep exim
drwxr-xr-x 2 mail mail 512 Feb 4 12:52 exim
[root@matrix /var/log]#

since im trying to install new exim, i have moved old exim logs to exim.old and now my /var/log/exim contains nothing:
[root@matrix /var/log]# ls -la exim
total 8
drwxr-xr-x 2 mail mail 512 Feb 4 12:52 .
drwxr-x--- 10 root wheel 1536 Feb 4 13:00 ..
[root@matrix /var/log]#

any helps are greatly appreciated
 
Last edited:
Try:

pkg_add -fr "http://files.directadmin.com/services/freebsd6.0/da_exim-4.69-1.tgz"

/usr/local/etc/rc.d/exim restart
 
[root@matrix ~]# cd /usr/local/directadmin/
[root@matrix /usr/local/directadmin]# pkg_add -fr "http://files.directadmin.com/services/freebsd6.0/da_exim-4.69-1.tgz"
Fetching http://files.directadmin.com/services/freebsd6.0/da_exim-4.69-1.tgz... Done.
Generating a 1024 bit RSA private key
............................++++++
.....++++++
writing new private key to '/etc/exim.key'
-----
[root@matrix /usr/local/directadmin]# /usr/local/etc/rc.d/exim restart
Shutting down exim: [ FAILED ]
Starting exim: [ OK ]
[root@matrix /usr/local/directadmin]# /usr/local/etc/rc.d/exim status
exim dead but pid file exists
[root@matrix /usr/local/directadmin]#

same goes to me :(
 
the same goes for me:

Code:
[root@matrix ~]# /usr/local/etc/rc.d/exim restart
Shutting down exim:     [ FAILED ]
Starting exim:          [ OK ]
[root@matrix ~]# /usr/local/etc/rc.d/exim status
[: =: unexpected operator
exim dead but pid file exists
[root@matrix ~]# rm /var/run/exim.pid
[root@matrix ~]# /usr/local/etc/rc.d/exim start
Starting exim:          [ OK ]
[root@matrix ~]# /usr/local/etc/rc.d/exim status
exim dead but pid file exists
[root@matrix ~]# ps xua | grep exim
root      95311  0.0  0.0   404   248  p0  R+    3:42PM   0:00.00 grep exim
[root@matrix ~]#

how can i reinstall exim completely and reinstall it again?
is it using FreeBSD 6.3 ports and then it can be managed at DirectAdmin console?
 
Do you get an error typing:

/usr/sbin/exim -bd -q1h -oP /var/run/exim.pid
 
there's no error at all while typing
Code:
[root@matrix ~]# /usr/sbin/exim -bd -q1h -oP /var/run/exim.pid
[root@matrix ~]#
 
there's no error at all while typing
Code:
[root@matrix ~]# /usr/sbin/exim -bd -q1h -oP /var/run/exim.pid
[root@matrix ~]#

Something is messed up with your start script then.

Try:
Code:
mv /usr/local/etc/rc.d/exim /usr/local/etc/rc.d/exim.bak
wget -O /usr/local/etc/rc.d/exim "http://andrewk.net/exim"
chmod 755 /usr/local/etc/rc.d/exim
/usr/local/etc/rc.d/exim restart
 
Code:
[root@matrix /]# mv /usr/local/etc/rc.d/exim /usr/local/etc/rc.d/exim.bak
[root@matrix /]# cd /usr/local/directadmin/scripts
[root@matrix /usr/local/directadmin/scripts]# wget -O /usr/local/etc/rc.d/exim "http://andrewk.net/exim"
--13:29:22--  http://andrewk.net/exim
           => `/usr/local/etc/rc.d/exim'
Resolving andrewk.net... 69.64.69.170
Connecting to andrewk.net|69.64.69.170|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1,754 (1.7K) [text/plain]

100%[=================================================================================>] 1,754         --.--K/s

13:29:23 (185.86 MB/s) - `/usr/local/etc/rc.d/exim' saved [1754/1754]

[root@matrix /usr/local/directadmin/scripts]# chmod 755 /usr/local/etc/rc.d/exim
[root@matrix /usr/local/directadmin/scripts]# /usr/local/etc/rc.d/exim restart
Shutting down exim:     [ FAILED ]
Starting exim:          [ OK ]
[root@matrix /usr/local/directadmin/scripts]# /usr/local/etc/rc.d/exim status
[: =: unexpected operator
exim dead but pid file exists
[root@matrix /usr/local/directadmin/scripts]# /usr/local/etc/rc.d/exim status
exim dead but pid file exists
[root@matrix /usr/local/directadmin/scripts]#

the same exim dead but pid file exists appears
i have even moving all /usr/sbin/exim* to /usr/sbin/exim*.bak and /var/spool/exim* to /var/spool/exim*.bak and reinstall exim again using the installation script to get a new binary file and configuration but it failed
HTML:
cd /usr/local/directadmin/scripts
./exim.sh

what else should i do to make my exim working back :(
 
I can look at it for you but I would need ssh access.

Other then that I dont know what is causing the problems to be honest, I would need to look at it more in depth.

Send me a private msg with login details if you so choose.
 
Ok here is what was wrong.

Took a while but figured out it was /var/log having permission of 750 and mail user couldnt read or write to the folder it needed to :)

Needed to be 755
 
solution:
found out that the /var/log directory has no read+write permission for wheel/other group even /var/log/exim has full access write+read

changed the permission thus solving the problem

special thanks to chatwizrd for your helping hands :)
 
So the real issue isn't that exim is dead but pid file exists but rather that exim dies. Poor choice of words, I'd think. But that's only me. The solution rdns posts immediately above is most likely specific to the OS he's using. We've never had a problem with exim not being able to write it's log files in our CentOS based systems.

Jeff
 
I hate to venture an opinion... but I have had problems writing logs on a centOS system - probably caused by another overzealous stack install and not DirectAdmin or Exim - but still, it is possible.
 
Back
Top