Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1013
  • Last Modified:

Not to show the Spy GET in the access_log file

I am using 9iAS release 2 on windows 2000 platform.

Currently in the access_log file, it logs an endless list of GET requests for dms0/Spy,dmsoc4j/Spy,opromgr-service and opromgr-status. From the access_log file, it seems that the requests are fired every 10 seconds.

Can someone throw some lights on how to configure the system in such a way that those requests are not logged onto the access_log file.

















0
tionghoe
Asked:
tionghoe
  • 4
  • 2
  • 2
1 Solution
 
vzilkaCommented:
Are you using an open enterprise manager window? The EM access the dmsspy all the time.
0
 
tionghoeAuthor Commented:
The EMWebsite is running as a service. Is this the open enterprise manager window that you are referring to  or somehow related ?
0
 
vzilkaCommented:
Yes. This is  the one that sends the DMS requests.
THe EMWebsite process is actually an OC4J isntance that run the administration console (enterprise manager).
It automatically runs DMS requests against the server to check it status.

I don't think you can disable this behavior.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
tionghoeAuthor Commented:
You are right that the DMS behavior cannot be disabled. However, have you or anyone else came across on how not to log these DMS requests on the access_log ? It is taking up too much space when the EMWebSite is running.


0
 
gackiCommented:
Hi,

I came across the same problem a few months ago. I then found metalink doc 226873.1, but it didn't work for me. Today I found that this document has been updated on Feb 15th 2004. I will try it again and let you know if it works now.

Gerald Krieger

0
 
tionghoeAuthor Commented:
Thanx Gerald. Hope to hear positive news from you.
0
 
gackiCommented:
Now it worked for me!

The following are the most important parts of metalink doc 226873.1 "How to Control the Size of the Oracle HTTP Server access_log File in 9iAS R2". The document addresses both Unix and Windows, I will only quote the Windows stuff. No warranty for copy and paste errors:). Part 1 describes preliminary steps needed for 9ias RL 2 prior to 9.0.4. Part 2 describes the configuration changes to make in httpd.conf.

Part 1:

Due to [BUG:2402206] and [BUG:2444298] (internal BUGs) fixed in 9iAS 9.0.4, the  following workaround is required for 9iAS 9.0.2 and 9.0.3 for Option 2 explained  above to be workable. Because this workaround requires a manual change in some  of the 9iAS internal configuration files, Oracle highly recommends to make a full  back of 9iAS prior to the change and to take an extreme caution while updating  these files.  

1-Make a backup of the apache.xsd and modDirectiveMS.xsd file using the following commands:  
DOS>cd <ORACLE_HOME>\dcm\config\plugins\apache    
DOS>copy apache.xsd apache.xsd.org    
DOS>copy modDirectiveMS.xsd modDirectiveMS.xsd.org  

2-If you are running 9iAS 9.0.2.1 or above, then stop the dcm-daemon process  using the following command:  
DOS>cd <ORACLE_HOME>\opmn\bin     DOS>opmnctl stopproc gid="dcm-daemon"  

3-Edit the apache.xsd file:  
Use wordpad.exe to edit <ORACLE_HOME>\dcm\config\plugins\apache\apache.xsd file  

4-Search for a section that looks like:      
<complexType name="AccessLogType">
       <attribute name="LogFile"   type="string"        use="required"/>
       <attribute name="Format"    type="string"        use="required"/>
       <attribute name="Key"       type="apache:keyset" use="fixed" value="LogFile Format"/>
</complexType>  

Insert a new line in the above section so that it looks like:      
<complexType name="AccessLogType">
       <attribute name="LogFile"   type="string"        use="required"/>
       <attribute name="Env"       type="string"        use="optional"/>
       <attribute name="Format"    type="string"        use="required"/>
       <attribute name="Key"       type="apache:keyset" use="fixed" value="LogFile Format"/>    
</complexType>  

5-Save the file  

6-Edit the modDirectiveMS.xsd file:  
Use wordpad.exe to edit <ORACLE_HOME>\dcm\config\plugins\apache\modDirectiveMS.xsd file  

7-Search for a section that looks like:      
<group name="MSIfModule_SETENVIF_Content">      
 <sequence>        
      <element name="BrowserMatch"             type="string"   minOccurs="0" maxOccurs="unbounded"/>
      <element name="BrowserMatchNoCase"      type="string"   minOccurs="0"/>        
      <element name="SetEnvIf"               type="string"   minOccurs="0"/>        
      <element name="SetEnvIfNoCase"           type="string"   minOccurs="0"/>      
 </sequence>    
</group>  

Change it so it looks like:      
<group name="MSIfModule_SETENVIF_Content">      
  <sequence>        
      <element name="BrowserMatch"             type="string"   minOccurs="0" maxOccurs="unbounded"/>               <element name="BrowserMatchNoCase"      type="string"   minOccurs="0" maxOccurs="unbounded"/>               <element name="SetEnvIf"               type="string"   minOccurs="0" maxOccurs="unbounded"/>               <element name="SetEnvIfNoCase"           type="string"   minOccurs="0" maxOccurs="unbounded"/>
  </sequence>    
</group>  

8-Save the file  

9-If you are running 9iAS 9.0.2.1 or above, then start the dcm-daemon process   using the following command:  DOS>cd <ORACLE_HOME>\opmn\bin    
DOS>opmnctl startproc gid="dcm-daemon"

Part 2:

In the steps below, replace any occurrence of <ORACLE_HOME> with the complete path of Oracle Home.  

1-Make a backup of $ORACLE_HOME/Apache/Apache/conf/httpd.conf file using the following commands:  
DOS>cd <ORACLE_HOME>\Apache\Apache\conf    
DOS>copy httpd.conf httpd.conf.org  

2-Edit the httpd.conf file:  
Use wordpad.exe to edit <ORACLE_HOME>\Apache\Apache\conf\httpd.conf file  

3-Comment out the following line, by adding # at the start of the line:
CustomLog logs/access_log common  

4-Add the following lines just after the line commented out in step 3 above:
SetEnvIf Request_URI "^\/dmsoc4j\/Spy" noLog    
SetEnvIf Request_URI "^\/dms0\/Spy" noLog    
SetEnvIf Request_Method HEAD noLog    
CustomLog <ORACLE_HOME>\Apache\Apache\logs\access_log common env=!noLog  

Note: ----- o If you have multiple CustomLog (or TransferLog) directives, you will need to add   env=!noLog option to each of them as shown in step 4 above. It is only enough   to change the CustomLog line in the Server Level Configuration context to bypass    spy requests. Changing the CustomLog or TransferLog in SSL VirtualHost should   not cause any problems, but will not really add any value since OPMN pings OHS    using HTTP and not HTTPS.            

5-Update DCM and stop the OHS using the following commands:  
DOS>cd <ORACLE_HOME>\dcm\bin    
DOS>dcmctl updateConfig -ct ohs -v -d    
DOS>dcmctl stop -ct ohs -v -d  

6-Archive the existing access_log using the following commands:  
DOS>cd <ORACLE_HOME>\Apache\Apache\logs    
DOS>ren access_log access_log.old  

7-Start the OHS using the following command:  
DOS>cd <ORACLE_HOME>\dcm\bin    
DOS>dcmctl start -ct ohs -v -d  

Hope this helps

Gerald
0
 
tionghoeAuthor Commented:
Gerald,

Thanx for the posting.
I tried the 2nd part alone but it was't working then. I am going to try it with the 1st part but it may take me awhile to get hand-on on it again. Anyway, I am going to give you the points now.

Thanx.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 4
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now