Thursday, November 5, 2015

Register and De-Register OHS with Weblogic Domain

In this post we shall see how to register and de-register OHS instance with Weblogic domain.

Register Oracle HTTP Server with Weblogic domain:


Step 1) Navigate to below mentioned directory
$cd <ORACLE_WT_HOME>/instances/instance_name/bin
./opmnctl registerinstance -adminHost <hostname> -adminPort <adminport> -adminUsername Weblogic
<Enter the Weblogic password when prompted>

Example: 

$ ./opmnctl registerinstance -adminHost 127.0.0.1 -adminPort 7001 -adminUsername weblogic
Command requires login to weblogic admin server (127.0.0.1):
Username: weblogic
Password:
Registering instance
Command succeeded.

 Step 2) Confirm registering of OHS by logging into EM console.

 


De-Register Oracle HTTP Server with Weblogic domain:


Step 1) Navigate to below mentioned directory
$cd <ORACLE_WT_HOME>/instances/instance_name/bin
./opmnctl unregisterinstance -adminHost <hostname> -adminPort <adminport> -adminUsername Weblogic
<Enter the Weblogic password when prompted>


Example: 

$ ./opmnctl unregisterinstance -adminHost 127.0.0.1 -adminPort 7001 -adminUsername weblogic
Command requires login to weblogic admin server (127.0.0.1):
Username: weblogic
Password:
Command succeeded.

Note : Make sure Weblogic domain Admin Server is up and running while executing above command.

Issue:


$ ./opmnctl registerinstance -adminHost 127.0.0.1 -adminPort 7001 -adminUsername weblogic
Command requires login to weblogic admin server (127.0.0.1):
Username: weblogic
Password:
Deploying NonJ2EEManagement Application...Done
Command failed: Exception while registering the instance
Details are logged in /u04/middleware/Oracle_WT1/instances/instance1/diagnostics/logs/OPMN/opmn/provision.log
opmnctl registerinstance: failed.

$ less /u04/middleware/product_new/Oracle_WT1/instances/instance1/diagnostics/logs/OPMN/opmn/provision.log
oracle.as.config.provisioner.InstallerCmdLine logInitialCommand
INFO: Start of command: [registerinstance, -adminHost, 127.0.0.1, -adminPort, 7001, -adminUsername, weblogic]
Oct 26, 2015 9:46:02 AM oracle.as.config.provisioner.InstallerCmdLine handleRunFailure
SEVERE: Command failed:
oracle.as.config.ProvisionException: Exception while registering the instance
at oracle.as.config.impl.OracleASInstanceImpl.register(OracleASInstanceImpl.java:304)
at oracle.as.config.provisioner.commands.RegisterInstanceCommand.execute(RegisterInstanceCommand.java:11)
at oracle.as.config.provisioner.InstallerCmdLine.run(InstallerCmdLine.java:146)
at oracle.as.config.provisioner.InstallerCmdLine.main(InstallerCmdLine.java:46)
Caused by: oracle.as.config.ProvisionException: Unable to validate NonJ2EEManagement Application deployment on admin server.
at oracle.as.config.impl.AbstractRuntimeServiceConnection.validateNonj2eeApplication(AbstractRuntimeServiceConnection.java:637)
at oracle.as.config.impl.AbstractRuntimeServiceConnection.deployIfNecessary(AbstractRuntimeServiceConnection.java:120)
at oracle.as.config.impl.OracleASInstanceImpl.register(OracleASInstanceImpl.java:285)
... 3 more
Caused by: oracle.as.config.ProvisionException: The AdminServer is not enabled for NonJ2ee applications.
at oracle.as.config.impl.AbstractRuntimeServiceConnection.isValidJrfInstall(AbstractRuntimeServiceConnection.java:588)
at oracle.as.config.impl.RuntimeServiceConnectionWLS.deployNonj2eeApplication(RuntimeServiceConnectionWLS.java:294)
at oracle.as.config.impl.AbstractRuntimeServiceConnection.validateNonj2eeApplication(AbstractRuntimeServiceConnection.java:629)
... 5 more

Cause:


The problem is caused by attempting to register the OHS against a WebLogic domain which contains no EM or Oracle Java Required Files components or configuration.

No comments:

Post a Comment

Other Posts