LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   Apache 2.0.47 Error when try to run the command httpd -S (https://www.linuxquestions.org/questions/linux-enterprise-47/apache-2-0-47-error-when-try-to-run-the-command-httpd-s-565266/)

wanna13e 06-29-2007 12:09 AM

Apache 2.0.47 Error when try to run the command httpd -S
 
Hi All Guru,

I encountered the error below when trying to run the command httpd -S to check my configuration. Both my webservers is running on RHEL4 64bit and using IBM HTTP Server 2.0.47. Hope anyone can give me an idea here.

./httpd -S
Segmentation fault

Another server give me a different error.

./httpd -S
./httpd: error while loading shared libraries: libaprutil-0.so.0: cannot open shared object file: No such file or directory


Thanks alot in advance.

twantrd 06-29-2007 02:55 PM

Install apr-util and give that a shot.

-twantrd

wanna13e 07-01-2007 08:43 PM

Hi twantrd,

Thanks alot for your response. I did below but still encounter the error.

up2date apr-util

Fetching Obsoletes list for channel: rhel-x86_64-as-4...

Fetching rpm headers...

Name Version Rel
----------------------------------------------------------


The following packages you requested are already updated:
apr-util
[root@iyp-web3 bin]# ./httpd -S
./httpd: error while loading shared libraries: libaprutil-0.so.0: cannot open shared object file: No such file or directory

twantrd 07-01-2007 11:38 PM

Quote:

./httpd: error while loading shared libraries: libaprutil-0.so.0: cannot open shared object file: No such file or directory
Look under /lib. The library probably does exist but under a different name. Do you see a libaprutil-?.so.?. If the library exists as a different filename, make a symlink (ie. libaprutil-0.so.0 -> /lib/the_name_of_the_library_that_exists_here). Give that a shot.

If you don't know how to do this, then run this command and paste it to us.
Code:

ls -l /lib/libapr*
-twantrd

wanna13e 07-02-2007 01:44 AM

Hi twantrd,

Thanks alot for your response. Below is a continuous ssh session. Please see below.

./httpd -S
./httpd: error while loading shared libraries: libaprutil-0.so.0: cannot open shared object file: No such file or directory
[root@iyp-web3 bin]# cd ../lib
[root@iyp-web3 lib]# ls -lrt libaprutil-0.so.0
lrwxrwxrwx 1 root root 37 Jun 21 10:18 libaprutil-0.so.0 -> /opt/IBMIHS/lib/libaprutil-0.so.0.9.4

twantrd 07-02-2007 04:05 AM

And the real file does exist right? If so, then it seems that it's not looking in the right path? Can you paste us the output of the below command? Thanks.

Code:

ldd httpd
-twantrd

wanna13e 07-02-2007 04:18 AM

Hi twantrd,

Thanks alot for your response. Below is the output.

ldd httpd
linux-gate.so.1 => (0xffffe000)
libaprutil-0.so.0 => not found
libexpat.so.0 => /usr/lib/libexpat.so.0 (0x00323000)
libapr-0.so.0 => /usr/lib/libapr-0.so.0 (0xf7fb2000)
libm.so.6 => /lib/tls/libm.so.6 (0x00cde000)
libnsl.so.1 => /lib/libnsl.so.1 (0xf7f9c000)
libresolv.so.2 => /lib/libresolv.so.2 (0x00279000)
libdl.so.2 => /lib/libdl.so.2 (0x00cd8000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00101000)
libc.so.6 => /lib/tls/libc.so.6 (0x00baa000)
librt.so.1 => /lib/tls/librt.so.1 (0xf7f87000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0xf7f59000)
/lib/ld-linux.so.2 (0x00b90000)

twantrd 07-02-2007 01:48 PM

Hmm, what happens if you do a
Code:

cp -a /opt/IBMIHS/lib/libaprutil-0.so.0.9.4 /usr/lib/libaprutil-0.so.0
??

-twantrd

wanna13e 07-02-2007 08:42 PM

Hi twantrd,

Thanks alot for your response and kind help. Now I get a new error.

[root@iyp-web3 lib]# cp -a /opt/IBMIHS/lib/libaprutil-0.so.0.9.4 /usr/lib/libaprutil-0.so.0
[root@iyp-web3 lib]# cd ../bin/
[root@iyp-web3 bin]# ./httpd -S
Segmentation fault
[root@iyp-web3 bin]# ps -ef | grep httpd
root 4170 1 0 04:03 ? 00:00:00 /opt/IBMIHS/bin/httpd -d /opt/IBMIHS -k start
nobody 4595 4170 0 04:03 ? 00:00:10 /opt/IBMIHS/bin/httpd -d /opt/IBMIHS -k start
nobody 4597 4170 0 04:03 ? 00:00:10 /opt/IBMIHS/bin/httpd -d /opt/IBMIHS -k start
nobody 4599 4170 0 04:03 ? 00:00:10 /opt/IBMIHS/bin/httpd -d /opt/IBMIHS -k start
root 7458 7434 0 09:39 pts/1 00:00:00 grep httpd

I did google this but no help found.

twantrd 07-03-2007 07:17 PM

You get a segfault but apache is running. Hmmm. Is apache working (ie. port 80 open, does it serve pages)??

Also, what happens if you do a ./httpd start instead of ./httpd -S.

-twantrd

wanna13e 07-05-2007 01:00 AM

Hi twantrd,

Below is the error I get when I try to use 'httpd start'.

[root@iyp-web1 bin]# ./httpd start
Usage: ./httpd [-D name] [-d directory] [-f file]
[-C "directive"] [-c "directive"]
[-k start|restart|graceful|stop]
[-v] [-V] [-h] [-l] [-L] [-t] [-S]
Options:
-D name : define a name for use in <IfDefine name> directives
-d directory : specify an alternate initial ServerRoot
-f file : specify an alternate ServerConfigFile
-C "directive" : process directive before reading config files
-c "directive" : process directive after reading config files
-e level : show startup errors of level (see LogLevel)
-E file : log startup errors to file
-v : show version number
-V : show compile settings
-h : list available command line options (this page)
-l : list compiled in modules
-L : list available configuration directives
-t -D DUMP_VHOSTS : show parsed settings (currently only vhost settings)
-S : a synonym for -t -D DUMP_VHOSTS
-t : run syntax check for config files
[root@iyp-web1 bin]# ./httpd -t
Segmentation fault
[root@iyp-web1 bin]# ps -ef | grep httpd
root 4072 1 0 04:02 ? 00:00:00 /opt/IBMIHS/bin/httpd -d /opt/IBMIHS -k start
nobody 7532 4072 0 09:34 ? 00:00:20 /opt/IBMIHS/bin/httpd -d /opt/IBMIHS -k start
nobody 7567 4072 0 09:40 ? 00:00:19 /opt/IBMIHS/bin/httpd -d /opt/IBMIHS -k start
nobody 7709 4072 0 10:00 ? 00:00:17 /opt/IBMIHS/bin/httpd -d /opt/IBMIHS -k start
nobody 9431 4072 0 13:59 ? 00:00:00 /opt/IBMIHS/bin/httpd -d /opt/IBMIHS -k start
root 9462 9413 0 13:59 pts/1 00:00:00 grep httpd

twantrd 07-05-2007 02:48 PM

You didn't answer my first question :). Is it serving pages? The process appears to be running...

-twantrd

wanna13e 07-05-2007 08:23 PM

Hi twantrd,

Yes. It's serving the pages for www.yellowpages.com.sg but not www.asiacni.com.sg

wanna13e 07-05-2007 11:53 PM

Hi twantrd,

Just an update here, I'm using iptables to loadbalance another IP here to load the website www.asiacni.com.sg. Another website on this IP is working fine but not www.asiacni.com.sg

/sbin/iptables -t nat -A PREROUTING -d 165.21.60.68 -j REDIRECT

twantrd 07-06-2007 01:31 AM

Make a new subject thread for this as your original question (httpd not running) is now resolved. That way, your problem gets exposed to more people who can assist you better.

-twantrd


All times are GMT -5. The time now is 02:52 PM.