Thursday Dec 13, 2012

How to Run Apache Commands From Oracle HTTP Server 11g Home

Every now and then you come across a problem when there is nothing in the "troubleshooting manual" which can help you. Instead you need to think outside the box. This happened to me two or three years back. Oracle HTTP Server (OHS) 11g did not start. The error reported back by OPMN was generic and gave no clue, and worse the HTTP Server error log was empty, and remained so even after I had increased the OPMN and HTTP Server log levels. After checking configuration files, operating system resources, etc I was still no nearer the solution.

And then the light bulb moment!

OHS is based on Apache - what happens if I attempt to start HTTP Server using the native apache command. Trouble was the OHS 11g solution has its binaries and configuration files in separate "home" directories

  • ORACLE_HOME contains the binaries
  • ORACLE_INSTANCE contains the configuration files

How to set the environment so that native apache commands run without error? Eventually, with help from a colleague, the knowledge article

How to Start Oracle HTTP Server 11g Without Using opmnctl [ID 946532.1]

was born!

To be honest, I cannot remember the exact cause and solution to that OHS problem two or three years ago. But, I do remember that an attempt to start HTTP Server using the native apache command threw back an error to the console which led me to discover the culprit was some unusual filesystem fault.

The other day, I was asked to review and publish a new knowledge article which described how to use the apache command to dump a list of static and shared loaded modules. This got me thinking that it was time
[ID 946532.1] was given an update. The result

How To Run Native Apache Commands in an Oracle HTTP Server 11g Environment [
ID 946532.1]

Highlights:

  • Title change
  • Improved environment setting scripts
    • Interactive, should be no need to manually edit the scripts (although readers are welcome to do so)
    • Automatically dump out some diagnostic information
  • Inclusion of some links to other troubleshooting collateral

To view the knowledge article you need a My Oracle Support login. For convenience, you can obtain the scripts via the links below.

MS Windows:

Wrapper cmd script - calls main cmd script [After download, remove the ".txt" file extension]
Main cmd script - sets OHS 11g environment to run Apache commands [After download, remove the ".txt" file extension]

Unix:

Shell script - sets OHS 11g environment to run Apache commands on Unix

Please note: I cannot guarantee that the scripts held in the blog repository will be maintained. Any enhancements or faults will applied to the scripts attached to the knowledge article.

Lastly, to find out more about native apache commands, refer to the Apache Documentation

apachectl - Apache HTTP Server Control Interface
[http://httpd.apache.org/docs/2.2/programs/apachectl.html]

httpd - Apache Hypertext Transfer Protocol Server
[http://httpd.apache.org/docs/2.2/programs/httpd.html]

About

This is the blog of the Oracle Fusion Middleware Proactive Support Delivery Team. Here we will provide information about our activities, publications, product related information and more. Feedback welcome.

Follow OracleMWSupport on Twitter

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today