In ODI 11g there are number of different methods to manage agents, one of these is through the use of Oracle Process Manager and Notification server (OPMN). Unfortunately with the current release of ODI 11g the components that make up OPMN have not been included in the installation, I am sure this will be rectified in future releases of ODI.
Fortunately with EPM 11.1.2 and a selection of other middleware products OPMN comes packaged with the installation and if you have or plan to have a ODI standalone agent on the same machine then you can take advantage of using OPMN to manage the agent, if on the same machine as essbase and a windows OS you will have the added benefit of using the same windows service that OPMN is managing essbase with.
With Essbase 11.1.2 installed on windows there should be a service named something like “Oracle Process Manager (EPM_epmsystem1), which by default will start and stop the essbase server.
If you want to install OPMN in a non EPM environment then OPMN is included with most installations that use OAS but you can also install it by downloading Oracle Web Tier Utilities 11g, this can be downloaded from Oracle e-delivery under :-
Oracle Fusion Middleware > Oracle Fusion Middleware 11g Media Pack
Oracle Fusion Middleware Web Tier Utilities 11g (11.1.1.2.0) for Microsoft Windows (32-bit) - V18630-01 - 1.2G
Oracle Fusion Middleware Web Tier Utilities 11g Patch Set 2 (11.1.1.3.0) for Microsoft Windows (32-bit) - V20974-01 - 1.2G
As usual a pretty chunky install, you will need to install 11.1.1.2 first and then patch to 11.1.1.3.
When installing just tick options for Oracle HTTP server and Oracle Webcache as this will install the OPMN components.
Update 03/01/2011 - If you are intending to use OPMN on an environment which does not have OPMN preinstalled then there is an useful article available on "My Oracle Support" - "Configuring OPMN To Start, Stop And Monitor ODI 11g Standalone Agent [ID 1274484.1]"
Today I am going to stick with configuring an agent to use OPMN on an EPM environment as I don’t believe the current documentation is the best, I am going to install it on a Windows OS but the same principals should apply to Unix. The process and logic is pretty much the same if the agent was being configured on a non EPM environment.
The first step would be to create an agent using the studio; it may be that you have already created an agent and that could be used.
If you go to the ODI_HOME/oracledi/agent/bin/directory where the standalone agent has been installed you will see a number of files, in my case it is E:/Oracle/Middleware/ORAODI/oracledi/agent/bin
The files that I will be using in some form today will be agentcreate.properties, odi_opmn_addagent.bat, odi_opmn_deleteagent.bat and odiparams.bat
If you are using Unix then you would just use the .sh files instead of the .bat
The file agentcreate.properties contains all the information that is required to be able to add the agent to OPMN
By default the file is already populated but pretty much every property needs updating, the only one to keep is COMPONENT_TYPE=odiagent
It is worth pointing out to always use / as the path separator and not \
When the standalone agent installed if the configuration stage is not skipped then the file odiparams.bat/sh is populated with many of the properties required for agentcreate.properties
odiparams
I am not going to explain what the above properties mean as I believe they are self-explanatory, after updating agentcreate.properties with the above properties the file looks like
PORTNO = The port number that the agent is configured to listen on.
JMXPORTNO = The JMX port number by default is the agent port + 1000, so if the agent is listening on port 20910 the
JMX port number would be 21910
ORACLE_ODI_HOME = Installation path of ODI, in my case this is E:/
/Oracle/Middleware/ORAODI
COMPONENT_NAME = This is the name you want the agent to be added and used as identification in OPMN
INSTANCE_HOME = This is the location of the OPMN instance into which the agent should be added. In an EPM installation this refers to <EPM_HOME>/user_projects/epmsystem1, which in my case is E:/Oracle/Middleware/user_projects/epmsystem1
ORACLE_OPMN_HOME = OPMN installation directory, in an EPM installation this means the directory where Oracle HTTP server is installed e.g. <EPM_HOME>/ohs , in my case is E:/Oracle/Middleware/ohs
In <EPM_HOME>/user_projects/epmsystem1/bin there is a file named opmnctl.bat, in this file you will also find reference to INSTANCE_HOME and ORACLE_OPMN_HOME
opmnctl.bat is also used for managing OPMN components which I will go through shortly.
With agentcreate.properties complete the agent can be added to the OPMN instance
Next the script odi_opmn_addagent.bat/sh needs to be edited.
By default the variables OPMN_HOME and INSTANCE_HOME and set to the parent directory where the file is executed from, if these are not updated then adding the agent to OPMN will fail.
The values for the variables are the same as the ones used in agentcreate.properties
An alternative would be to add the variables as environment variables, which would save having to update the scripts.
To add the agent to OPMN the syntax is :-
odi_opmn_addagent.bat/sh <agent create property filename>
and not addagent as the script specifies.
Just before the adding the agent I am going to check the status of OPMN, this can be achieved by from command line by executing :-
<EPM_HOME>/user_projects/epmsystem1/bin/opmnctl.bat status
As you can see an essbase agent is currently running on the instance of OPMN.
From command line the ODI agent is registered with OPMN, if no errors are received then the agent should have been added.
The agent has been added to the OPMN instance but is not started.
To start the agent you can either start by component or process_type, it does make a difference when you only have one agent but if you had multiple agents you could manage them all at once using the process-type.
The syntax is :-
opmnctl startproc ias-component=<COMPONENT_NAME>
opmnctl startproc process-type=<PROCESS_TYPE_NAME>
Once the agent process has started it can be tested to check if it is working in the ODI Studio.
To stop the agent the syntax is :-
opmnctl stopproc ias-component=<COMPONENT_NAME>
opmnctl stopproc process-type=<PROCESS_TYPE_NAME>
For a list of other available commands type :- opmnctl
Using the windows service will also start/stop any components added to the OPMN instance, so at present it will control the essbase agent and the ODI agent.
To edit the configuration of the OPMN instance use the following file
<EPM_HOME>/user_projects/epmsystem1/config/OPMN/opmn/opmn.xml
If you want the agent to automatically restart if the agent process crashes then you can use the “restart-on-death” parameter.
Update the following line from –
to
Once you have made the changes restart the ODI agent using restartproc command in OPMN or restart the windows service, if the agent crashes for any reason it will automatically start up a new agent process. This principal applies to any processes being managed by OPMN so you could apply the same command to the essbase agent.
If you want to remove the ODI agent from the OPMN instance then one method is to use the script odi_opmn_deleteagent.bat/sh located in the agent/bin directory.
The variable OPMN_HOME should be set to <EPM_HOME>/ohs, once again the value used in agentcreate.properties can be used.
The syntax to delete the agent from the OPMN instance is :-
odi_opmn_deleteagent <INSTANCE_HOME> <OPMN_ORACLE_HOME> <AGENT_NAME>
You will get a warning if the agent is not running like above but as long as you don’t get any errors messages the agent should be removed from the OPMN instance.
Check whether the agent has been removed by executing: - opmnctl status
John..
ReplyDeleteI came across the same issue of not finding the OPMN jar file is not added to the default install of ODI.I worked with the development team and they have provided a article on this.
Please look into the ID 1274484.1
It has full details of installing OPMN and configuring the ODI agent.
Thanks
Yugi
Thanks for the information Yugi, I have updated the post to include details of the article on "My Oracle Support"
ReplyDeleteHi John.
ReplyDeleteThe article is very instructive. The combination of your article and the Oracle Document helped to successfully configure that pesky ODI agent as a service.
I might add that some of the paths that you described changed on EPM Version 11.1.2.1.
The opmn.xml and opmnctl.bat are in a different place on V 11.1.2.1
Cheers.
I followed the exact steps as described above and registered the agent with OPMN. Using opmnctl.bat status command, I can see that agent is up and running. But when I go inside ODI and create and test the physical agent, I get the error 'Agent Test failed' . Is there anyway to find out what went wrong?
ReplyDeleteThanks for this explanation.
ReplyDeleteAny idea how do we define a different supervisor account to the generic SUPERVISOR account in agent_properties, I see there is the ability in odiparm.sh which worked fine till I came to use OPMN to manage the service.
Thanks Mel