Friday, 16 March 2012

Resolving a "deadlock" issue with IBM HTTP Server

I did a silly thing this morning - I deleted the IHS log files whilst the web server was still running - IHS and, I guess, Apache, from whence IHS is derived, is really dependant upon it's Process ID ( PID ) file, as evidenced below: -

$ sudo /sbin/service ibmhttpd start

Starting IBM HTTP Server:                                  [  OK  ]

$ ls /opt/IBM/HTTPServer/logs

error_log.20120316  httpd.pid  siddport

$ rm -Rf *

$ sudo /sbin/service ibmhttpd stop

Stopping IBM HTTP Server: httpd (no pid file) not running 
                                                           [  OK  ]

$ sudo /sbin/service ibmhttpd start

Starting IBM HTTP Server: (98)Address already in use: make_sock: could not bind to address [::]:80 
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 
no listening sockets available, shutting down 
Unable to open logs 
                                                           [FAILED]

so now we have the "deadlock" - I can't stop OR start IHS …. but there is a hack solution

$ ps auxw | grep -i httpd

nobody    1227  0.0  0.0  66796  2876 ?        Sl   11:22   0:00 /opt/IBM/HTTPServer/bin/httpd -d /opt/IBM/HTTPServer -k start

ihsadmin  1940  0.0  0.0  61200   720 pts/0    S+   11:22   0:00 grep -i httpd 
root     32285  0.1  0.1  11392  7424 ?        Ss   11:21   0:00 /opt/IBM/HTTPServer/bin/httpd -d /opt/IBM/HTTPServer -k start

nobody   32292  0.0  0.0  11392  2792 ?        S    11:21   0:00 /opt/IBM/HTTPServer/bin/httpd -d /opt/IBM/HTTPServer -k start

nobody   32293  0.0  0.0  66924  4748 ?        Sl   11:21   0:00 /opt/IBM/HTTPServer/bin/httpd -d /opt/IBM/HTTPServer -k start

$ echo 32285 > /opt/IBM/HTTPServer/logs/httpd.pid

$ sudo /sbin/service ibmhttpd stop

Stopping IBM HTTP Server:                                  [  OK  ]

$ sudo /sbin/service ibmhttpd start

Starting IBM HTTP Server:                                  [  OK  ]

Seemples :-)

No comments:

Reminder - installing podman and skopeo on Ubuntu 22.04

This follows on from: - Lest I forget - how to install pip on Ubuntu I had reason to install podman  and skopeo  on an Ubuntu box: - lsb_rel...