Apache won´t start

Support for webhosts that use CentOS
n3r0x
Posts: 13
Joined: 2007/08/09 01:17:20
Location: Sweden
Contact:

Apache won´t start

Postby n3r0x » 2007/11/12 10:34:47

Hi

Have a few problems in 4.5 minimal install

After Upgrading apache i get this when im trying to start it
1, /usr/sbin/httpd: error while loading shared libraries: libldap-2.2.so.7: cannot open shared object file: Permission denied

Looked all over the place and cant find anything in english that can help me.


2, having some issues using chmod i set chmod 755 -R in a Dir and still couldnt access the webpage in it anyone got a clue why?


Thanks in advance

User avatar
toracat
Forum Moderator
Posts: 7229
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Apache won´t start

Postby toracat » 2007/11/12 13:22:23

I am trying to get some more info. What do you see with:

rpm -q httpd

rpm -q openldap

ldd /usr/sbin/httpd

ls -l /usr/lib/libldap-2.*

EDIT: ... and *how* did you try to start httpd?

n3r0x
Posts: 13
Joined: 2007/08/09 01:17:20
Location: Sweden
Contact:

Re: Apache won´t start

Postby n3r0x » 2007/11/12 18:55:09

rpm -q httpd gave:
httpd-2.0.52-32.ent.centos4

rpm -q ldap gave:
openldap-2.2.13-7.4E


ldd /usr/sbin/httpd gave:

libpcre.so.0 => /lib64/libpcre.so.0 (0x0000002a9566c000)
libpcreposix.so.0 => /usr/lib64/libpcreposix.so.0 (0x0000002a9577b000)
libaprutil-0.so.0 => /usr/lib64/libaprutil-0.so.0 (0x0000002a9587f000)
libldap-2.2.so.7 => /usr/lib64/libldap-2.2.so.7 (0x0000002a95997000)
liblber-2.2.so.7 => /usr/lib64/liblber-2.2.so.7 (0x0000002a95acd000)
libdb-4.2.so => /lib64/tls/libdb-4.2.so (0x0000002a95bdc000)
libexpat.so.0 => /usr/lib64/libexpat.so.0 (0x0000002a95dbb000)
libapr-0.so.0 => /usr/lib64/libapr-0.so.0 (0x0000002a95edd000)
librt.so.1 => /lib64/tls/librt.so.1 (0x0000002a9600a000)
libm.so.6 => /lib64/tls/libm.so.6 (0x0000002a96124000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000002a962aa000)
libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x0000002a963df000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000002a964f4000)
libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a965f7000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x0000002a9682d000)
libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x0000002a96942000)
libssl.so.4 => /lib64/libssl.so.4 (0x0000002a96a59000)
libcrypto.so.4 => /lib64/libcrypto.so.4 (0x0000002a96b96000)
/lib64/ld-linux-x86-64.so.2 (0x0000002a95556000)
libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x0000002a96dc6000)
libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x0000002a96edd000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x0000002a9704e000)
libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x0000002a97150000)
libz.so.1 => /usr/lib64/libz.so.1 (0x0000002a97274000)

ls -l /usr/sbin/libldap gave:

no file or folder..



i used:
# /sbin/service httpd start

User avatar
toracat
Forum Moderator
Posts: 7229
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Apache won´t start

Postby toracat » 2007/11/12 19:38:14

ls -l /usr/sbin/libldap gave:

no file or folder..

You missed that one. It is ls -l /usr/lib/libldap-2.*

Note the path and the *

n3r0x
Posts: 13
Joined: 2007/08/09 01:17:20
Location: Sweden
Contact:

Re: Apache won´t start

Postby n3r0x » 2007/11/12 22:10:08

Ah like this

# ls -l /usr/lib/libldap-2.*
lrwxrwxrwx 1 root root 20 Nov 12 20:52 /usr/lib/libldap-2.2.so.7 -> libldap-2.2.so.7.0.6
-rwxr-xr-x 1 root root 201188 May 3 2007 /usr/lib/libldap-2.2.so.7.0.6

User avatar
toracat
Forum Moderator
Posts: 7229
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Apache won´t start

Postby toracat » 2007/11/12 23:39:00

Sorry, I should have asked to do a:

ls -l /usr/lib64/libldap-2.*

because you are running a 64-bit OS. Everything so far looks normal to me. Once again, when you start httpd by running 'service httpd start', you get the "libldap-2.2.so.7: cannot open shared object file: Permission denied" error ? This is odd; httpd correctly finds libldap-2.2.so.7 as shown by ldd.

What is the output of 'rpm -V openldap' ?

n3r0x
Posts: 13
Joined: 2007/08/09 01:17:20
Location: Sweden
Contact:

Re: Apache won´t start

Postby n3r0x » 2007/11/13 07:11:09

# rpm -V openldap
S.5....T. c /etc/openldap/ldap.conf
........? /usr/lib64/liblber-2.2.so.7.0.6
prelink: /usr/lib64/libldap-2.2.so.7.0.6: at least one of file's dependencies has changed since prelinking
SM?..UG.? /usr/lib64/libldap-2.2.so.7.0.6
.......T. d /usr/share/man/man5/ldap.conf.5.gz
.......T. d /usr/share/man/man5/ldif.5.gz
S.5....T. c /etc/openldap/ldap.conf

User avatar
toracat
Forum Moderator
Posts: 7229
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Apache won´t start

Postby toracat » 2007/11/13 12:05:26

........? /usr/lib64/liblber-2.2.so.7.0.6
prelink: /usr/lib64/libldap-2.2.so.7.0.6: at least one of file's dependencies has changed since prelinking
SM?..UG.? /usr/lib64/libldap-2.2.so.7.0.6

Here it shows something. Apparently, your libldap-2.2.so.7.0.6 is not the same as the original. Show us the output of:

ls -l /usr/lib64/libldap-2.*

rpm -qf /usr/lib64/libldap-2.2.so.7.0.6

n3r0x
Posts: 13
Joined: 2007/08/09 01:17:20
Location: Sweden
Contact:

Re: Apache won´t start

Postby n3r0x » 2007/11/13 13:55:13

# ls -l /usr/lib64/libldap-2.*
lrwxrwxrwx 1 root root 20 Nov 10 01:31 /usr/lib64/libldap-2.2.so.7 -> libldap-2.2.so.7.0.6
-rwxrwxrwx 1 apache apache 224296 May 3 2007 /usr/lib64/libldap-2.2.so.7.0.6




# rpm -qf /usr/lib64/libldap-2.2.so.7.0.6
openldap-2.2.13-7.4E

User avatar
toracat
Forum Moderator
Posts: 7229
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Apache won´t start

Postby toracat » 2007/11/13 15:49:39

n3r0x wrote:
# ls -l /usr/lib64/libldap-2.*
lrwxrwxrwx 1 root root 20 Nov 10 01:31 /usr/lib64/libldap-2.2.so.7 -> libldap-2.2.so.7.0.6
-rwxrwxrwx 1 apache apache 224296 May 3 2007 /usr/lib64/libldap-2.2.so.7.0.6

Mine looks like this:

# ls -l /usr/lib64/libldap-2.*
lrwxrwxrwx 1 root root 20 Jul 28 13:38 /usr/lib64/libldap-2.2.so.7 -> libldap-2.2.so.7.0.6
-rwxr-xr-x 1 root root 224296 May 2 2007 /usr/lib64/libldap-2.2.so.7.0.6

I have the same version of httpd and openldap as yours. Something on your system has changed the owner and group of the libldap-2.2.so.7.0.6 file (I suspect other files as well). At this point, you might want to go ahead and re-install openldap and see if that fix the problem. However, it is possible that whatever caused this change broke things other than openldap.

If you decide to replace the openldap rpm (after saving any customized file like ldap.conf),

wget http://mirror.centos.org/centos/4/os/x8 ... x86_64.rpm

rpm -Uvh --replacepkgs openldap-2.2.13-7.4E.x86_64.rpm

After that, re-run 'rpm -V openldap' to make sure it does not show any line for libldap-2.2.so.7.0.6