6 Replies Latest reply on Feb 4, 2006 6:39 PM by 425156

    Using opmn to start/stop hub repo and adapters

    Devious Scully
      Also posted as a thread on the OracleAS General forum, I'm hoping the duplication will cover both areas of expertise. Apologies if I offend.

      "Configuring custom process with OracleAS 10g Release 2 (10.1.2) "

      A Metalink note kindly informed me that I could use OPMN to start and stop Interconnect hub and adapter processes. The hyperlink sent me to the OPMN documentation and that's where the fun started!

      So far I have only tried to add the repository as an ias-component and this is how the section of the opmn.xml file looks.

      <ias-component id="HUBDEV3" status="enabled" id-matching="true">
      <process-type id="HUBDEV3-repository" module-id="CUSTOM">
      <environment>
      <variable id="CLASSPATH" value="/du01/OAI/oracleas1/integration/interconnect/lib/oai.jar"/>
      <variable id="CLASSPATH" value="/du01/OAI/oracleas1/jdk/jre/lib/i18n.jar" append="true"/>
      <variable id="CLASSPATH" value="/du01/OAI/oracleas1/jdbc/lib/classes12.jar" append="true"/>
      <variable id="CLASSPATH" value="/du01/OAI/oracleas1/jdbc/lib/nls_charset12.jar" append="true"/>
      <variable id="CLASSPATH" value="/du01/OAI/oracleas1/jlib/oraclepki.jar" append="true"/>
      <variable id="CLASSPATH" value="/du01/OAI/oracleas1/jlib/ojpse.jar" append="true"/>
      <variable id="PATH" value="/du01/OAI/oracleas1/jdk/jre/bin" append="true"/>
      <variable id="LD_LIBRARY_PATH" value="/du01/OAI/oracleas1/lib32" append="true"/>
      </environment>
      <process-set id="repo" numprocs="1">
      <module-data>
      <category id="start-parameters">
      <data id="java-parameters" value="-server -Drepo=InterConnectRepository -DORBdisableLocator=true -mx512m -ms8m oracle.aob.repository.Repomain"/>
      <data id="jar-file" value="/du01/OAI/oracleas1/integration/interconnect/lib/oai.jar"/>
      </category>
      <category id="stop-parameters">
      <data id="java-parameters" value="-server -Drepo=InterConnectRepository -DORBdisableLocator=true -mx512m -ms8m oracle.aob.repository.Repomain -shutdown"/>
      <data id="jar-file" value="/du01/OAI/oracleas1/integration/interconnect/lib/oai.jar"/>
      </category>
      </module-data>
      <start timeout="600"/>
      <stop timeout="120"/>
      </process-set>
      </process-type>
      </ias-component>

      This parses okay and when I call opmnctl status I get the following:

      $ opmnctl status

      Processes in Instance: hubASDEV3.xxxxxxxxxx
      ------------------------------------------------+---------
      ias-component | process-type | pid | status
      ------------------------------------------------+---------
      LogLoader | logloaderd | N/A | Down
      DSA | DSA | N/A | Down
      HTTP_Server | HTTP_Server | 27533 | Alive
      dcm-daemon | dcm-daemon | 217 | Alive
      OC4J | home | 27534 | Alive
      OC4J | jacada | 27535 | Alive
      HUBDEV3 | HUBDEV3-repository | N/A | Down

      I tried opmnctl startproc ias-component=HUBDEV3 & opmnctl startproc process-type=HUBDEV3-repository but both retun the following message:

      opmn id=crm-drtest:6200
      no enabled components for this request

      Can anyone advice on where and why I'm going wrong?

      Sometimes you wish you'd never seen the hint in the first place!!
        • 1. Re: Using opmn to start/stop hub repo and adapters
          Chris Slattery
          Oh Lordy... and they'll support that ?
          • 2. Re: Using opmn to start/stop hub repo and adapters
            Devious Scully
            Who knows!? All I did was find Metalink note 329980.1, and now I wish I hadn't! I get the feeling it's a 10g R2 facility. Anyhow...

            Okay, so now I know my section of opmn.xml was incorrect. The latest reincarnation says:

            <ias-component id="HUBDEV3" status="enabled" id-matching="true">
            <process-type id="HUBDEV3-repository" module-id="CUSTOM">
            <environment>
            <variable id="THREADS_FLAG" value="native"/>
            </environment>
            <process-set id="repo" numprocs="1">
            <module-data>
            <category id="start-parameters">
            <data id="start-executable" value="/du01/OAI/oracleas1/jdk/jre/bin/java"/>
            <data id="start-args" value="-server -Drepo=InterConnectRepository -DORBdisableLocator=true -mx512m -ms8m -classpath /du01/OAI/oracleas1/integration/interconnect/lib/oai.jar:/du01/OAI/oracleas1/jdk/jre/lib/i18n.jar:/du01/OAI/oracleas1/jdbc/lib/classes12.jar:/du01/OAI/oracleas1/jdbc/lib/nls_charset12.jar:/du01/OAI/oracleas1/jlib/oraclepki.jar:/du01/OAI/oracleas1/jlib/ojpse.jar oracle.aob.repository.Repomain"/>
            </category>
            <category id="stop-parameters">
            <data id="stop-executable" value="/du01/OAI/oracleas1/jdk/jre/bin/java"/>
            <data id="stop-args" value="-classpath /du01/OAI/oracleas1/integration/interconnect/lib/oai.jar:/du01/OAI/oracleas1/jdk/jre/lib/i18n.jar:/du01/OAI/oracleas1/jdbc/lib/classes12.jar:/du01/OAI/oracleas1/jdbc/lib/nls_charset12.jar:/du01/OAI/oracleas1/jlib/oraclepki.jar:/du01/OAI/oracleas1/jlib/ojpse.jar oracle.aob.repository.Repomain -shutdown"/>
            </category>
            </module-data>
            <start timeout="600"/>
            <stop timeout="120"/>
            </process-set>
            </process-type>
            </ias-component>

            However, I still cannot start the ias-component HUBDEV3. My latest results are:

            $ opmnctl verbose startproc ias-component=HUBDEV3
            HTTP/1.1 200 OK
            Content-Length: 0
            Content-Type: text/html
            Response: Ping succeeded.

            opmnctl: starting opmn managed processes...
            HTTP/1.1 204 No Content
            Content-Length: 736
            Content-Type: text/html
            Response: 0 of 1 processes started.

            <?xml version='1.0' encoding='ISO-8859-1'?>
            <response>
            <opmn id="crm-drtest:6200" http-status="204" http-response="0 of 1 processes started.">
            <ias-instance id="hubASDEV3.xxxxxxxxxx.xxxxxxxx">
            <ias-component id="HUBDEV3">
            <process-type id="HUBDEV3-repository">
            <process-set id="repo">
            <process id="432537708" pid="3235" status="Stopped" index="1" log="/du01/OAI/oracleas1/opmn/logs/HUBDEV3~HUBDEV3-repository~repo~1" operation="request" result="failure">
            <msg code="-21" text="failed to start a managed process after the maximum retry limit">
            </msg>
            </process>
            </process-set>
            </process-type>
            </ias-component>
            </ias-instance>
            </opmn>
            </response>
            • 3. Re: Using opmn to start/stop hub repo and adapters
              Devious Scully
              I meant to add the log file info.

              --------
              06/01/17 16:22:49 Start process
              --------
              Exception in thread "main" java.lang.NullPointerException
              at oracle.aob.repository.Repomain.main(Repomain.java:164)

              --------
              06/01/17 16:22:50 Start process
              --------
              Exception in thread "main" java.lang.NullPointerException
              at oracle.aob.repository.Repomain.main(Repomain.java:164)


              Simply isn't it?
              • 4. Re: Using opmn to start/stop hub repo and adapters
                Devious Scully
                Well, I now have a working solution.

                The section from the opmn.xml file now reads (the major changes in bold):

                <ias-component id="HUBDEV3" status="enabled" id-matching="true">
                <process-type id="HUBDEV3-repo" module-id="CUSTOM" working-dir="/du01/OAI/oracleas1/integration/interconnect/repository">
                <environment>
                <variable id="JAVA_HOME" value=""/>
                <variable id="THREADS_FLAG" value="native"/>
                <variable id="PATH" value="/du01/OAI/oracleas1/jdk/jre/bin" append="true"/>
                <variable id="LD_LIBRARY_PATH" value="/du01/OAI/oracleas1/lib32" append="true"/>
                </environment>
                <process-set id="repo" numprocs="1">
                <module-data>
                <category id="start-parameters">
                <data id="start-executable" value="/du01/OAI/oracleas1/jdk/jre/bin/java"/>
                <data id="start-args" value="-server -Drepo=InterConnectRepository -DORBdisableLocator=true -mx512m -ms8m -classpath /du01/OAI/oracleas1/integration/interconnect/lib/oai.jar:/du01/OAI/oracleas1/jdk/jre/lib/i18n.jar:/du01/OAI/oracleas1/jdbc/lib/classes12.jar:/du01/OAI/oracleas1/jdbc/lib/nls_charset12.jar:/du01/OAI/oracleas1/jlib/oraclepki.jar:/du01/OAI/oracleas1/jlib/ojpse.jar oracle.aob.repository.Repomain"/>
                </category>
                <category id="stop-parameters">
                <data id="stop-executable" value="/du01/OAI/oracleas1/jdk/jre/bin/java"/>
                <data id="stop-args" value="-classpath /du01/OAI/oracleas1/integration/interconnect/lib/oai.jar:/du01/OAI/oracleas1/jdk/jre/lib/i18n.jar:/du01/OAI/oracleas1/jdbc/lib/classes12.jar:/du01/OAI/oracleas1/jdbc/lib/nls_charset12.jar:/du01/OAI/oracleas1/jlib/oraclepki.jar:/du01/OAI/oracleas1/jlib/ojpse.jar oracle.aob.repository.Repomain -shutdown"/>
                </category>
                </module-data>
                <start timeout="600"/>
                <stop timeout="120"/>
                </process-set>
                </process-type>
                <process-type id="HUBDEV3-adapters" module-id="CUSTOM" working-dir="/du01/OAI/oracleas1/integration/interconnect/adapters/CRMAPPS">
                <environment>
                <variable id="JAVA_HOME" value=""/>
                <variable id="THREADS_FLAG" value="native"/>
                <variable id="PATH" value="/du01/OAI/oracleas1/jdk/jre/bin" append="true"/>
                <variable id="LD_LIBRARY_PATH" value="/du01/OAI/oracleas1/lib32" append="true"/>
                </environment>
                <process-set id="crmapps" numprocs="1">
                <environment>
                <variable id="LANG" value="en_US"/>
                </environment>
                <module-data>
                <category id="start-parameters">
                <data id="start-executable" value="/du01/OAI/oracleas1/jdk/jre/bin/java"/>
                <data id="start-args" value="-server -Dadapter=CRMAPPS -DORBdisableLocator=true -ms8m -mx512m -classpath :/du01/OAI/oracleas1/integration/interconnect/lib/oai.jar:/du01/OAI/oracleas1/jdk/jre/lib/i18n.jar:/du01/OAI/oracleas1/jdbc/lib/classes12.jar:/du01/OAI/oracleas1/jdbc/lib/nls_charset12.jar:/du01/OAI/oracleas1/rdbms/jlib/aqapi.jar:/du01/OAI/oracleas1/rdbms/jlib/jmscommon.jar:/du01/OAI/oracleas1/lib/xmlparserv2.jar:/du01/OAI/oracleas1/jlib/oraclepki.jar:/du01/OAI/oracleas1/jlib/ojpse.jar:/du01/OAI/oracleas1/jdk/jre/lib/ext/mail.jar:/du01/OAI/oracleas1/jdk/jre/lib/ext/activation.jar:/du01/OAI/oracleas1/integration/interconnect/lib/UserDefinedTransforms.jar: oracle.oai.agent.service.AgentService"/>
                </category>
                <category id="stop-parameters">
                <data id="stop-executable" value="/du01/OAI/oracleas1/jdk/jre/bin/java"/>
                <data id="stop-args" value="-mx64m -classpath /du01/OAI/oracleas1/integration/interconnect/lib/oai.jar oracle.oai.agent.proxy.ShutdownAgent persistence/Agent.ior"/>
                </category>
                </module-data>
                <start timeout="600"/>
                <stop timeout="120"/>
                </process-set>
                </process-type>
                </ias-component>

                Once I added the working-dir attribute to the process-type tag, things began to fall into place. working-dir is set to the directory location of the repository start script and I repeated the same for the crmapps adapter. My biggest clue came when I added the crmapps adapter to the opmn.xml and when I tried to start it, the log file indicated that it couldn't find the adapter.ini file. The rest came naturally after that breakthrough.

                It needs a bit of rejigging but so far, results are good.

                Message was edited by:
                Devious Scully
                • 5. Re: Using opmn to start/stop hub repo and adapters
                  Devious Scully
                  Update

                  I have managed to getting this working adequately. Nowadays, I can use opmnctl to start/stop the repository and any of the adapters using the opmnctl CLI.

                  To clarify, I discovered that I cut & pasted too much without paying attention to the actual classpath and executable within the different adapters' start script. Therefore, to get it to work properly I modified the opmn.xml file accordingly. One example would be:

                  <process-type id="hubdev3-aniteftp" module-id="CUSTOM" working-dir="/du01/OAI/oracleas1/integration/interconnect/adapters/ANITEFTP">
                  <environment>
                  <variable id="JAVA_HOME" value=""/>
                  <variable id="THREADS_FLAG" value="native"/>
                  <variable id="PATH" value="/du01/OAI/oracleas1/jdk/jre/bin" append="true"/>
                  <variable id="LD_LIBRARY_PATH" value="/du01/OAI/oracleas1/lib32" append="true"/>
                  </environment>
                  <process-set id="aniteftp" numprocs="1">
                  <environment>
                  <variable id="LANG" value="en_US"/>
                  </environment>
                  <module-data>
                  <category id="start-parameters">
                  <data id="start-executable" value="/du01/OAI/oracleas1/jdk/jre/bin/java"/>
                  <data id="start-args" value="-server -Dadapter=ANITEFTP -DORBdisableLocator=true -ms8m -mx512m -classpath :/du01/OAI/oracleas1/integration/interconnect/lib/oai.jar:/du01/OAI/oracleas1/jdk/jre/lib/i18n.jar:/du01/OAI/oracleas1/jdbc/lib/classes12.jar:/du01/OAI/oracleas1/jdbc/lib/nls_charset12.jar:/du01/OAI/oracleas1/rdbms/jlib/aqapi.jar:/du01/OAI/oracleas1/rdbms/jlib/jmscommon.jar:/du01/OAI/oracleas1/lib/xmlparserv2.jar:/du01/OAI/oracleas1/jlib/oraclepki.jar:/du01/OAI/oracleas1/jlib/ojpse.jar:/du01/OAI/oracleas1/jdk/jre/lib/ext/mail.jar:/du01/OAI/oracleas1/jdk/jre/lib/ext/activation.jar:/du01/OAI/oracleas1/integration/interconnect/lib/UserDefinedTransforms.jar:/du01/OAI/oracleas1/jlib/javax-ssl-1_2.jar oracle.oai.agent.service.AgentService"/>
                  </category>
                  <category id="stop-parameters">
                  <data id="stop-executable" value="/du01/OAI/oracleas1/jdk/jre/bin/java"/>
                  <data id="stop-args" value="-mx64m -classpath /du01/OAI/oracleas1/integration/interconnect/lib/oai.jar oracle.oai.agent.proxy.ShutdownAgent persistence/Agent.ior"/>
                  </category>
                  </module-data>
                  <start timeout="600"/>
                  <stop timeout="120"/>
                  </process-set>
                  </process-type>


                  This is for an FTP adapter and you will find that the start script for the other adapter types is slightly different. It may not affect the starting/stopping through opmnctl but you find that the adapter doesn't work as anticipated.

                  I hope this helps.
                  • 6. Re: Using opmn to start/stop hub repo and adapters
                    425156
                    Or you can upgrade to 10.1.2.0.2 which came out last week to get the application server control integration out of the box.

                    Regards,
                    Rajesh