Httpd and Dovecot do not start after reboot

AndreaWeb

New member
Joined
Jan 17, 2012
Messages
6
Hello, I've my server run for 6 months.
Yesterday I've rebooted and then I cannot get httpd and dovecot to run:
I'm running the latest versione of DA and CentOS,
please help me because I cheked files and they exist with correct permissions.

Code:
[root@s1 ~]# /sbin/service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: /usr/sbin/httpd: error while loading shared libraries: libaprutil-1.so.0: failed to map segment from shared object: Permission denied

[root@s1 ~]# /sbin/service dovecot
Usage: /etc/init.d/dovecot {start|stop|restart|condrestart|status}
[root@s1 ~]# /sbin/service dovecot start
Starting dovecot: doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 35: ssl_cert: Can't open file /etc/httpd/conf/ssl.crt/server.crt: Permission denied
                                                           [FAILED]
 
Hi,
in the last hour i did some tries...
using
Code:
chcon --reference=/usr/sbin/httpd /etc/httpd/lib/libaprutil-1.so.0

now i get
Code:
Starting httpd: Warning: DocumentRoot [/home/arts/domains/xxx.com/public_html] does not exist
Warning: DocumentRoot [/home/arts/domains/xxx.eu/public_html] does not exist

but the direcotry exists

Also i notice that if I log via FTP whith correct user/passwd id says alvayw password incorrect
 
I did: setenforce 0

Now starting httpd is says:
Starting httpd:

Ando nothing else,
in apache error log I see:

[Wed Jan 18 09:50:41 2012] [error] (17)File exists: Cannot create SSLMutex with file `/var/log/httpd/ssl_mutex'
Configuration Failed
 
Yes, httpd is a daemon of Apache.

Try to delete /var/log/httpd/ssl_mutex if it exists.
 
ok i did:
rm -rfv /var/log/httpd/ssl_mutex

Apache started,
but If possible whould like to understand why I had to disable SELinux,
and if it could be a security issue to keep it disabled.
It does conflict with suEXEC ?

Thanks!
 
You'd better Google then with "selinux site:directadmin.com" as a request, or wait for somebody else's answer. I've never used SELinux on servers.
 
Thanks zEitEr!

If anybody else can explain the reason why SElinux conflicted only after a system reboot, after 6 months of regular running, will be appreciated!
 
If it was turned off in the kernel, but not shut off in the actual config, then that would explain it.
This is the code we run in the setup.sh at install time:
Code:
if [ -e /etc/selinux/config ]; then
        perl -pi -e 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
        perl -pi -e 's/SELINUX=permissive/SELINUX=disabled/' /etc/selinux/config
fi

if [ -e /selinux/enforce ]; then
        echo "0" > /selinux/enforce
fi
which both setos the /etc/selinux/config to turn it off.
Check this file to see what it's set to. We want to see
Code:
SELINUX=disabled
It also sets the /selinux/enforce to 0, which I believe is the realtime kernel setting (similar to proc), I may be wrong here though. In any case, it should be set to 0 either way.

Joh
 
Back
Top