13 November 2006

Tip on Deploying to Oracle Application Server Using admin_client.jar

When using admin_client.jar to operate against an Oracle Application Server instance, the deployer_uri takes the form:

deployer:oc4j:opmn://opmn-host:opmn-request-port/oc4j-instance-name

which commonly translates into something like

deployer:oc4j:opmn://localhost:6003/home

or even

deployer:oc4j:opmn://localhost/home

Note that in the last realized form, the opmn-request-port is left off, so the port will default to 6003.

When its operating against Oracle Application Server, admin_client.jar uses the OPMN request port to determine what the exact network location is for the OC4J instance that is specified.

If you find you are running into an error that states "Failed at Could not get DeploymentManager", then its well worth double checking what the actual OPMN request port actually is.

This can be done in three ways I can think of:

1. From the command line using the opmnctl command

C:\oracleas\opmn\bin>opmnctl status -port
127.0.0.1:6005

2. By looking at the $ORACLE_HOME/opmn/conf/opmn.xml and looking for the value of the defined request attribute in the port tag:



3. And finally, with the 10.1.3.1 release, you can use Application Server Control (ASC) to display the port values of the OPMN service. On the Cluster Topology page, scroll down to the bottom and click the Runtime Ports link. This will display all of the ports currently in use by the server, including the OPMN service.



Once you have the OPMN request port, if it differs from 6003 then ensure that you use the correct value with the deployer_uri so that admin_client can connect to the OPMN service.

For example, given the information above, a valid deployer URL would be:

deployer:oc4j:opmn://localhost:6005/admin

Which can be validated as accurate:

C:\oracleas\j2ee\home>java -jar admin_client.jar
deployer:oc4j:opmn://localhost:6005/admin oc4jadmin welcome1 -validateURI

URI deployer:oc4j:opmn://localhost:6005/admin is valid and connected





8 comments:

Anonymous said...

Fixed my web services deployment problem. Thanks.
If only Oracle documentation were as clear and helpful.

ziaur said...

Thanks a lot buddy .. really it helped me in solving my problem. I found that my rmi port config is wrong

java -jar admin_client.jar deployer:oc4j:ch2dlfi003.in.ibm.com:12401 oc4jadmin welcome1 -validateURI

Instead of 12401 I found it was 24971. After changes it worked.

Sourav said...

Hi ,

Even am facing the same problem , on which file i need to modify the RMA port , please help .

Thanks
sourav

Jacob said...

Hi,

I am using the following to validate my deployer connection.

java -jar admin_client.jar deployer:oc4j:opmn://server_name:6004/home test password -validateURI.

6004 port is not blocked and test is the username been created for developers.

I do not get any reposnse when I issue the above. What could be the reason?

Any help is highly appreciable.

Buttso said...

Hi Jacob --

It should return some form of error message if it can't connect -- either the server not being up, the port not being correct (both probably reported as some form of connection exception) or an authentication connection.

If it's really not responding, even after waiting for a period of time to account for network connection timeout, then when it's attempting to connect, you could generate a thread dump and look at the stack to see where it's stuck.

You can also enable some client side logging for admin_client.jar that may provide some more information that could be of some help in diagnosing the issue.

See the doc here:
http://download.oracle.com/docs/cd/B25221_04/web.1013/b14431/adminclient.htm#CHDCGDJH

-steve-

Jacob said...

Hi Steve,

Thanks for the reply.
Like mentioned, I created logging.properties and executed the following

-Djava.util.logging.config.file=logging.properties -jar admin_client.jar
deployer:oc4j:opmn://server_name:6004/home test password -validateURI
FINE: CoreRemoteMBeanServer.fetchMBeanServerEjbRemote Getting remote RMI context for domain: opmn-ho
me+oc4j-server_name-6004-default
FINE: CoreRemoteMBeanServer.fetchMBeanServerEjbRemote CoreRemoteMBeanServer url: ormi://server_name:124
02/default

Then no response.
From the above I couldn't understand much?

Could you kindly provide some insight?

Jacob said...

Hi Steve,
Thanks a lot for the reply.

Like mentioned in the document, I added logging.properties and issued the following for testing
java -Djava.util.logging.config.file=logging.properties -jar admin_client.jar deployer:oc4j:opmn://server_name:6004/home test password -validateURI
and the output is the following
FINE: CoreRemoteMBeanServer.fetchMBeanServerEjbRemote Getting remote RMI context for domain: opmn-ho
me+oc4j-server_name-6004-default
FINE: CoreRemoteMBeanServer.fetchMBeanServerEjbRemote CoreRemoteMBeanServer url: ormi://server_name:124
02/default

Then again no response.
I couldn't understand much from the above, could you provide some insight on how to tackle this.

Thanks again.

Buttso said...

Jacob, just want to check this with you. You seem to be specifying the target OPMN server as "server_name" in your connection URL -- is that correct and are you doing that on purpose?

-steve-