apache update completing but not updating

benwestfall

New member
Joined
Nov 7, 2013
Messages
3
We're having troubles updating apache from 2.2.21 to .2.2.25 on one of our servers DA 1.44.0, COS 5.7, PHP 5.4. Running the typical...

Code:
 cd /usr/local/directadmin/custombuild
 ./build update
 ./build apache
 ./build php n
 ./build rewrite_confs

works fine and completes w/o issues but upon apache restart the version still shows as 2.2.21. There are no errors from the any of the builds. Any ideas?
 
To confirm, are you using the full path to check the apache version? There could be other binaries with higher priority in the $PATH env.. so check it like this:
Code:
/usr/sbin/httpd -v
also look for others, eg:
Code:
which httpd
locate httpd | grep bin
John
 
which bin

which httpd responds with the /usr/sbin/httpd one. The locate httpd provided the following:

Code:
locate httpd | grep bin
/usr/local/apache2/bin/httpd
/usr/sbin/httpd

The /usr/sbin file is 2.2.21 and the other is the newer 2.2.25. Do I just need to replace the /usr/sbin one with the /usr/local/apache2/bin one?
 
Check the dates on each:
Code:
ls -la /usr/sbin/httpd
ls -la /usr/local/apache2/bin/httpd
also give us an upper case -V from each binary to see what's what.
Code:
/usr/sbin/httpd -V
/usr/local/apache2/bin/httpd -V

Make sure there are no custom configure files for apache.
Code:
cd /usr/local/directadmin/custombuild
./build used_configs
Possibly renaming the /usr/local/apache2/bin/httpd to httpd.old, and recompile apache may show us that it's working correctly.

It's also possibly the /usr/sbin/httpd is locked.. or it's directory is locked. Check with
Code:
lsattr /usr/sbin/httpd
which is sometimes done by security suites, or admins.

John
 
latest attempts

Check the dates on each:
ls -la /usr/sbin/httpd
ls -la /usr/local/apache2/bin/httpd
also give us an upper case -V from each binary to see what's what.
Code:
/usr/sbin/httpd -V
/usr/local/apache2/bin/httpd -V

As expected I think...

Code:
ls -al /usr/sbin/httpd
-rwxr-xr-x 1 root root 4.0M Nov 17  2011 /usr/sbin/httpd*

ls -al /usr/local/apache2/bin/httpd
-rwxr-xr-x 1 root root 2.1M Nov 14 18:55 /usr/local/apache2/bin/httpd*


/usr/sbin/httpd -V
Server version: Apache/2.2.21 (Unix)
Server built:   Nov 17 2011 12:11:07
Server's Module Magic Number: 20051115:30
Server loaded:  APR 1.4.5, APR-Util 1.3.12
Compiled using: APR 1.4.5, APR-Util 1.3.12
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="/var/logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="/var/logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

/usr/local/apache2/bin/httpd -V
Server version: Apache/2.2.25 (Unix)
Server built:   Nov 14 2013 18:55:42
Server's Module Magic Number: 20051115:33
Server loaded:  APR 1.4.5, APR-Util 1.3.12
Compiled using: APR 1.4.5, APR-Util 1.3.12
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/usr/local/apache2"
 -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

Make sure there are no custom configure files for apache.
Code:
cd /usr/local/directadmin/custombuild
./build used_configs
Possibly renaming the /usr/local/apache2/bin/httpd to httpd.old, and recompile apache may show us that it's working correctly.

No custom configure files as the used_configs returns nothing. I renamed to .old and did a ./build apache once again and there was no change.

It's also possibly the /usr/sbin/httpd is locked.. or it's directory is locked. Check with
Code:
lsattr /usr/sbin/httpd
which is sometimes done by security suites, or admins.

John

I don't know what this one should show but here is the response.

Code:
lsattr /usr/sbin/httpd
------------- /usr/sbin/httpd

-Ben
 
Ok.. so my guess would be that the /usr/local/apache2/bin/httpd file got there by a change to to the configure.apache, and recompile.. where the http root wasn't in the configure.

For now, we can probably just delete the wrong file:
Code:
rm -f /usr/local/apache2/bin/httpd

As for why the correct /usr/sbin/httpd is only showing 2.2.21.. that's less clear.
Try:
Code:
./build update
./build apache n;
and paste us the output.. starting from the very end, to about 3-4 ssh pages up.. as much as you can scroll up..

Also make sure you see 2.2.25 in the versoins.txt, eg:
Code:
grep apache2.2 versions.txt
John
 
I attached a doc with the entire build process results in it.

When I stop the httpd service and replace httpd with the 2.2.25 version Apache starts, and logs nothing to the error log, however none of the sites on the server work. They just churn and timeout or return file not found errors - almost as though it has lost some of it's config or something.
 

Attachments

  • apache build process.txt
    116.6 KB · Views: 87
Back
Top