OC4J MBeans Overwrite Changes That Were Made To opmn.xml Manually
Last updated on NOVEMBER 05, 2016
Applies to:Oracle Application Server 10g Enterprise Edition - Version: 10.1.3.0.0 to 10.1.3.3.0
Oracle Containers for J2EE - Version: 10.1.3.0.0 to 10.1.3.3.0
This problem can occur on any platform.
When changes are made to the file opmn.xml are done manually (via text editor) OpmnConfig MBean does not recognizes these changes, therefore any changes made through ASC (i.e. system properties) will undo changes that were made manually to opmn.xml previously.
The problem can be seen where there are servers in a clustered environment as follows.
- The file opmn.xml is manually modified to add the <topology> elements and issues an opmnctl reload to add it to the cluster, where its discovered and visible in ASC.
- Then proceed to ASC and issue the server properties change.
- The OpmnConfig MBean on the new node does not yet know about the manual change that was made, thus when the specified server properties change is written out to opmn.xml, it writes out the previous state of the opmn.xml with the new server property -- effectively nuking the added <topology> tags, so that when OPMN is reloaded the new node is dropped from the cluster.
There are 2 ways shown here that will reproduce the problem:-
- simple non-clustered test
- via a clustered environment
Example 1 - Non Clustered Steps (Simple Test)
- Start an instance of OAS 10.1.3.X.
- Open the file $ORACLE_HOME/opmn/conf/opmn.xml in a text editor, and add any of the following System properties to an OC4J instance, i.e.
- Verbose: -verbose
- Verbose GC: -verbose:gc
- Change default heap size (Max and initial heap size): -Xmx1024m -Xms512m
- Log into ASC, go to the Server Properties screen (in Administration) for the instance that changes were made to in previous step.
- Add another System property and save it.
- Look at opmn.xml and will see the change done in step 2 has been erased.
Example 2 - Clustered Topology Steps
- Install (or use) three 10.1.3.3 OAS instances, "red", "black", "blue".
- Cluster 2 of the servers by adding something like the following in opmn.xml in each of the 2 servers:
- Stop and start both servers:
- Log into ASC to verify both nodes exists.
- On the 3rd OAS node, add the <topology> elements to opmn.xml run the following command to add the node same cluster:
- View the cluster topology in ASC, you will see all 3 nodes.
- In the Groups section select the group 'default_group'.
- Select Administration | Server Properties.
- Modify any of the properties in the Server Properties screen, i.e. verbose settings, heap size etc and press [Apply].
- Will see the following message more opmn is getting updated:
Server Properties are being updated for all instances in this group
- The following error message might appear:
An error occurred while editing the server properties for one or more instances in the group. Below are the results for each OC4J instance.
default_group on black.acampanaro-pc2.au.oracle.com OC4J_WebCenter - Succeeded
default_group on black.acampanaro-pc2.au.oracle.com home - Failed due to error: "ias:type=OpmnConfig,name=black.acampanaro-pc2.au.oracle.com"
default_group on blue.acampanaro-pc2.au.oracle.com OC4J_WebCenter - Succeeded
default_group on blue.acampanaro-pc2.au.oracle.com home - Succeeded
default_group on red.acampanaro-pc2.au.oracle.com OC4J_WebCenter - Succeeded
default_group on red.acampanaro-pc2.au.oracle.com home - Succeeded
- Press the link 'Cluster Topology'.
- Will see that the third OAS instance that was added to the clustered topology no longer appears.
- Check the file opmn.xml for the third OAS instance and will see that the <topology> elements erased.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms