Dead On Arrival installation, httpd "SIGTERM" and directory errors

asteroidminer

New member
Joined
Nov 17, 2011
Messages
2
My DirectAdmin installation failed. httpd immediately crashes. Here is the setup, the error messages, and other items. No response yet from support@ so perhaps someone here can help figure this one out?

(I'm not a complete newbie, as I've been running Linux servers for about 10 years, but on and off, whereby I'm not a techie, I'm a DIY business owner, but hints are often good enough to help me solve a problem.)

Fresh reformatted CentOS 5.7 installation, 64 bit, on 1&1 using their standard image for minimal installation, done just minutes before installing DirectAdmin. Just ran yum update and then followed the DirectAdmin notes exactly.

After installation, http never worked, neither to :2222 nor normal :80 not once.

[root@[private] var]# /etc/init.d/httpd stop
Stopping httpd: [ OK ]
[root@[private] var]# /etc/init.d/httpd start
Starting httpd:
[root@[private] var]#

Note that there is neither an [OK] nor an [ERROR] there.
Repeatedly, same thing.

[root@[private] var]# /etc/init.d/httpd start
Starting httpd: httpd (pid 22372) already running
[root@[private] var]# /etc/init.d/httpd stop
Stopping httpd: [ OK ]
[root@[private] var]# /etc/init.d/httpd start
Starting httpd:
[root@[private] var]# /sbin/service httpd stop
Stopping httpd: [ OK ]
[root@[private] var]# /sbin/service httpd start
Starting httpd:
[root@[private] var]

[root@[private] var]# ps aux | grep http
root 22429 0.2 0.3 93788 7588 ? Ss 13:08 0:00 /usr/sbin/httpd -k start -DSSL
apache 22431 0.0 0.2 93788 4956 ? S 13:08 0:00 /usr/sbin/httpd -k start -DSSL
apache 22432 0.0 0.2 93788 4952 ? S 13:08 0:00 /usr/sbin/httpd -k start -DSSL
apache 22433 0.0 0.2 93788 4952 ? S 13:08 0:00 /usr/sbin/httpd -k start -DSSL
apache 22434 0.0 0.2 93788 4952 ? S 13:08 0:00 /usr/sbin/httpd -k start -DSSL
apache 22435 0.0 0.2 93788 4952 ? S 13:08 0:00 /usr/sbin/httpd -k start -DSSL

/var/log/httpd/error_log :
[Thu Nov 17 12:56:02 2011] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Nov 17 12:56:02 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Nov 17 12:56:03 2011] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Thu Nov 17 12:56:03 2011] [notice] Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 configured -- resuming normal operations
[Thu Nov 17 12:57:01 2011] [notice] caught SIGTERM, shutting down

... repeatedly, so it looks to me like this SIGTERM is the reason. (Research on other forums states that the other error messages are unrelated to the SIGTERM, and the 1 minute difference in log entries seems to support that conclusion.)

I tried rebooting but after reboot (the first after installation, about an hour after installation) I started getting this after reboot:

[root@[private]]# /etc/init.d/httpd stop
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Stopping httpd: [ OK ]
[root@[private]]# /etc/init.d/httpd start
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Starting httpd:
[root@[private]]# /sbin/service httpd start
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Starting httpd: httpd (pid 2674) already running

Some items in ps aux:

[root@[private]]# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
[unrelated stuff removed but available upon request]
root 2103 0.0 0.0 6764 756 ? Ss 13:18 0:00 /sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pi
root 2157 0.0 0.0 5928 608 ? Ss 13:18 0:00 syslogd -m 0
root 2160 0.0 0.0 3824 424 ? Ss 13:19 0:00 klogd -x
dbus 2189 0.0 0.0 21276 884 ? Ss 13:19 0:00 dbus-daemon --system
root 2222 0.0 0.0 17896 848 ? Ss 13:19 0:00 /usr/sbin/dovecot
dovecot 2225 0.0 0.1 45760 2748 ? S 13:19 0:00 dovecot/pop3-login
dovecot 2226 0.0 0.1 45760 2748 ? S 13:19 0:00 dovecot/pop3-login
dovecot 2227 0.0 0.1 45760 2748 ? S 13:19 0:00 dovecot/pop3-login
dovecot 2228 0.0 0.1 45760 2748 ? S 13:19 0:00 dovecot/pop3-login
dovecot 2229 0.0 0.1 45760 2752 ? S 13:19 0:00 dovecot/pop3-login
dovecot 2230 0.0 0.1 45760 2748 ? S 13:19 0:00 dovecot/pop3-login
dovecot 2231 0.0 0.1 45760 2748 ? S 13:19 0:00 dovecot/pop3-login
dovecot 2232 0.0 0.1 45760 2748 ? S 13:19 0:00 dovecot/pop3-login
dovecot 2233 0.0 0.1 45760 2752 ? S 13:19 0:00 dovecot/pop3-login
dovecot 2234 0.0 0.1 45760 2748 ? S 13:19 0:00 dovecot/pop3-login
dovecot 2235 0.0 0.1 45760 2748 ? S 13:19 0:00 dovecot/pop3-login
dovecot 2236 0.0 0.1 45760 2744 ? S 13:19 0:00 dovecot/pop3-login
dovecot 2237 0.0 0.1 45760 2744 ? S 13:19 0:00 dovecot/pop3-login
dovecot 2238 0.0 0.1 45760 2748 ? S 13:19 0:00 dovecot/pop3-login
dovecot 2239 0.0 0.1 45760 2748 ? S 13:19 0:00 dovecot/pop3-login
dovecot 2240 0.0 0.1 45760 2748 ? S 13:19 0:00 dovecot/pop3-login
dovecot 2241 0.0 0.1 45764 2756 ? S 13:19 0:00 dovecot/imap-login
dovecot 2242 0.0 0.1 45764 2748 ? S 13:19 0:00 dovecot/imap-login
dovecot 2243 0.0 0.1 45764 2752 ? S 13:19 0:00 dovecot/imap-login
dovecot 2244 0.0 0.1 45764 2752 ? S 13:19 0:00 dovecot/imap-login
dovecot 2245 0.0 0.1 45764 2748 ? S 13:19 0:00 dovecot/imap-login
dovecot 2246 0.0 0.1 45764 2752 ? S 13:19 0:00 dovecot/imap-login
dovecot 2247 0.0 0.1 45764 2756 ? S 13:19 0:00 dovecot/imap-login
dovecot 2248 0.0 0.1 45764 2752 ? S 13:19 0:00 dovecot/imap-login
dovecot 2249 0.0 0.1 45764 2752 ? S 13:19 0:00 dovecot/imap-login
dovecot 2250 0.0 0.1 45764 2748 ? S 13:19 0:00 dovecot/imap-login
dovecot 2251 0.0 0.1 45764 2752 ? S 13:19 0:00 dovecot/imap-login
dovecot 2252 0.0 0.1 45764 2752 ? S 13:19 0:00 dovecot/imap-login
dovecot 2253 0.0 0.1 45764 2756 ? S 13:19 0:00 dovecot/imap-login
dovecot 2254 0.0 0.1 45764 2748 ? S 13:19 0:00 dovecot/imap-login
dovecot 2255 0.0 0.1 45764 2752 ? S 13:19 0:00 dovecot/imap-login
dovecot 2256 0.0 0.1 45764 2752 ? S 13:19 0:00 dovecot/imap-login
dovecot 2257 0.0 0.0 15760 1084 ? S 13:19 0:00 dovecot/anvil [35 connections]
root 2258 0.0 0.0 15888 1116 ? S 13:19 0:00 dovecot/log
root 2264 0.0 0.1 19512 2528 ? S 13:19 0:00 dovecot/config
root 2268 0.0 0.0 18756 1872 ? S 13:19 0:00 dovecot/auth [0 wait, 0 passdb, 0 userdb]
root 2270 0.0 0.0 62664 1216 ? Ss 13:19 0:00 /usr/sbin/sshd
root 2285 0.0 0.0 65908 1388 ? S 13:19 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/[private].onl
mysql 2340 0.0 0.9 148824 18372 ? Sl 13:19 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var/lib/mysql
root 2359 0.0 0.0 14012 476 ? Ss 13:19 0:00 /usr/local/directadmin/da-popb4smtp
nobody 2367 0.0 0.0 49160 1488 ? Ss 13:19 0:00 /usr/local/directadmin/directadmin d
nobody 2374 0.0 0.0 49160 732 ? S 13:19 0:00 /usr/local/directadmin/directadmin d
nobody 2375 0.0 0.0 49160 732 ? S 13:19 0:00 /usr/local/directadmin/directadmin d
nobody 2376 0.0 0.0 49160 732 ? S 13:19 0:00 /usr/local/directadmin/directadmin d
nobody 2377 0.0 0.0 49160 732 ? S 13:19 0:00 /usr/local/directadmin/directadmin d
nobody 2378 0.0 0.0 49160 732 ? S 13:19 0:00 /usr/local/directadmin/directadmin d
mail 2379 0.0 0.0 56952 1212 ? Ss 13:19 0:00 /usr/sbin/exim -bd -q15m -oP /var/run/exim.pid
ftp 2396 0.0 0.0 17368 1120 ? Ss 13:19 0:00 proftpd: (accepting connections)
root 2404 0.0 0.0 74820 1160 ? Ss 13:19 0:00 crond
68 2419 0.0 0.2 31024 4196 ? Ss 13:19 0:01 hald
root 2420 0.0 0.0 21716 1196 ? S 13:19 0:00 hald-runner
68 2427 0.0 0.0 12340 888 ? S 13:19 0:00 hald-addon-acpi: listening on acpi kernel interface /proc/acpi/event
root 2452 0.0 0.0 3808 524 tty1 Ss+ 13:19 0:00 /sbin/mingetty tty1
root 2453 0.0 0.0 3808 524 tty2 Ss+ 13:19 0:00 /sbin/mingetty tty2
root 2454 0.0 0.0 3808 524 tty3 Ss+ 13:19 0:00 /sbin/mingetty tty3
root 2455 0.0 0.0 3808 532 tty4 Ss+ 13:19 0:00 /sbin/mingetty tty4
root 2456 0.0 0.0 3808 524 tty5 Ss+ 13:19 0:00 /sbin/mingetty tty5
root 2457 0.0 0.0 3808 524 tty6 Ss+ 13:19 0:00 /sbin/mingetty tty6
root 2458 0.0 0.0 3820 588 ttyS0 Ss+ 13:19 0:00 /sbin/agetty -L ttyS0 57600 vt100
named 2482 0.0 0.2 98880 4092 ? Ssl 13:20 0:00 named -u named
root 2502 0.0 0.1 91088 3432 ? Ss 13:26 0:00 sshd: root@pts/0
root 2504 0.0 0.0 66044 1616 pts/0 Ss 13:26 0:00 -bash
root 2674 0.0 0.3 93784 7584 ? Ss 13:55 0:00 /usr/sbin/httpd -k start -DSSL
apache 2676 0.0 0.2 93784 4960 ? S 13:55 0:00 /usr/sbin/httpd -k start -DSSL
apache 2677 0.0 0.2 93784 4956 ? S 13:55 0:00 /usr/sbin/httpd -k start -DSSL
apache 2678 0.0 0.2 93784 4956 ? S 13:55 0:00 /usr/sbin/httpd -k start -DSSL
apache 2679 0.0 0.2 93784 4956 ? S 13:55 0:00 /usr/sbin/httpd -k start -DSSL
apache 2680 0.0 0.2 93784 4956 ? S 13:55 0:00 /usr/sbin/httpd -k start -DSSL
root 2707 0.0 0.0 65604 1024 pts/0 R+ 14:01 0:00 ps aux

I've researched this all over the net but found no solution yet, and also tried analyzing this myself but am stumped. No response from support@ , either, over the past hour and a half since I've been asking for help. If they can come up with a solution then I will post it here, as I believe that I'm probably not the only person with this problem.

All the best.
 
Try:

Code:
cd /usr/local/directadmin/custombuild
./build update
./build clean
./build apache d

Sigterm means something is killing it. Maybe a cronjob. The getcwd errors are caused due to some miss configuration.

See if the above command helps.
 
This is good to know. support@ also replied, and their solution worked. Here it is, useful advice and tips to broadcast:

1) Start with a forceful restart:
killall -9 httpd

run that many times, until it shows "no such process".
Then start httpd normally:
/etc/init.d/httpd start

to this very quickly or else the dataskq will start up httpd for you (which is also fine)..
If that happens, you will see the "httpd (pid 123) already running" message again.


2) Then test:

telnet 127.0.0.1 80

and type:
HEAD / HTTP/1.1
Host: asdf

and press enter twice.
Ensure apache generates output.

Then test the same thing, but do so to your server IP, eg:
telnet 74.208.147.197 80

and issue the same HEAD command.

3) If you can connect locally, then test remotely (can be done with windows, or another linux box)
Do the same telnet to the server IP.

If you cannot connect, then it's likely a firewall:
/etc/init.d/iptables stop
/sbin/chkconfig iptables off
 
Back
Top