Unable to start HTTP server after restore
After a restore of the Application Server and Oracle SOA Suite we were unable to start OHS (Oracle HTTP Server). The result of opmnctl status was:
Processes in Instance: <<>> ---------------------------------+--------------------+---------+--------- ias-component | process-type | pid | status ---------------------------------+--------------------+---------+--------- OC4JGroup:admin_group | OC4J:admin_apps | 241672 | Alive ASG | ASG | N/A | Down OC4JGroup:default_group | OC4J:oc4j_soa | 409618 | Alive OC4JGroup:default_group | OC4J:home | 340092 | Alive HTTP_Server | HTTP_Server | 462964 | Down
The command opmnctl startproc ias-component=HTTP_Server resulted in:
Error --> Process (pid=13365) failed to start a managed process after the maximum retry limit
The log file /opmn/logs/HTTP_Server~1.log. Was not very helpfull:
-------- 09/08/19 10:25:37 Start process -------- ORACLE_HOME/Apache/Apache/bin/apachectl startssl: execing httpd
After a lot of Google, OTN and searching on our server we found out that the owner and rights for the .apachectl somehow got lost during the back up (compression?) or restore operation. On UNIX the HTTP server should run as root. Changing the ownership and rights as described in the link solved our problem:
- Change to root user
- Navigate to
ORACLE_HOME/Apache/Apache/binand execute the following command: chown root .apachectlchmod 6750 .apachectl- Exit root.
It’s only needed to set SUID and SGID if the port or ports on which the webserver is set to run is < 1024 and if it’s on unix or linux.
indeed the daemon itself then runs using UID ’0′, the ‘childs’ of the daemon (with which clients communicate) run with the userid and groupid set in the apache configuration.
compression does not reset file properties. if using tar, there are limitations on the properties of files, like rights, ownership, etc. (a normal user can not restore a file with root ownership and SUID and/or SGID bits)
Thanks Frits for the addition. Indeed we used tar, and a “normal user” to restore.
I had a similar issue. Same error. my .apachectl file is owned by oracle and that seems to work.
Stopped everything including the database (check for leftover processes ps -ef). My home/oms/Appache/Appache/logs directory was really full. Cleared out the logs and deleted the httpd.pid file.
did ./opmctl startall.
took a while but eventually came back. I think the httpd.pid file was the key but i can’t be sure.
thanks
Chris
One other solution /* before */ changing any configuration
Go to the directory $OMS_HOME/Apache/Apache/logs then
rm error_log *.sem access_log
Cause could be an $OMS_HOME/Apache/Apache/logs/error_log file to large
And please, read Note 436690.1 on the subject (logs does not rotate)