9 Replies Latest reply on Jul 2, 2010 5:35 AM by Geethanga Amarasinghe

    How to manage oracle using JOPR

    Geethanga Amarasinghe Newbie

      Hi,

       

      I'm new to JOPR. I want to monitor an Oracle instance using JOPR. Can anybody please tell me how to do this. I have correctly setup a JOPR server and i have deployed rhq-agent in the target machine. Server even discovers the oracle service but i'm unable to connect.

       

      When i searched about this issue. There was a post saying that i should include OJDBC driver in the JOPR plugin i did that but it doesn't work for me.

       

      Thanks,

      Geethanga.

        • 1. Re: How to manage oracle using JOPR
          mazz Master

          we can't distribute the oracle ojdbc driver in the open source builds due to licensing issues. if you are sure the ojdbc driver is in your oracle plugin jar's /lib directory, then post the errors from your agent log that illustrate the problem.

          • 2. Re: How to manage oracle using JOPR
            Ian Springer Master

            To build the oracle plugin, first add a repo that includes the Oracle JDBC driver jar Maven artifact (com.oracle:ojdbc5:11.2.0.1.0) to your ~/.m2/settings.xml, e.g.:

             

                  <repositories>
                        <repository>
                           <id>private-repo</id>
                           <name>Private Repository</name>
                           <url>http://foo.yourcompany.com/m2-repo/</url>
                        </repository>
                     </repositories>
            
            

             

             

            Then build RHQ as follows - the ojdbc-driver profile will ensure the Oracle jar gets included in the oracle plugin's lib dir:

             

            cd ~/projects
            git clone git://git.fedorahosted.org/rhq/rhq.git
            cd rhq
            mvn -Dmaven.test.skip=true -Pojdbc-driver
            
            

             

            If you are going to deploy the oracle jar to an existing RHQ installation, make sure you deploy the jar to the RHQ Server, not Agents, first. Drop the jar into the Server's jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/ dir, wait for the Server log to tell you the plugin has been redeployed and its metadata updated, then run the "plugins update" Agent prompt command from each of your Agents to pull down the updated plugin from the Server.

            • 3. Re: How to manage oracle using JOPR
              mazz Master

              Ian Springer wrote:

               

              If you are going to deploy the oracle jar to an existing RHQ installation, make sure you deploy the jar to the RHQ Server, not Agents, first. Drop the jar into the Server's jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/ dir, wait for the Server log to tell you the plugin has been redeployed and its metadata updated, then run the "plugins update" Agent prompt command from each of your Agents to pull down the updated plugin from the Server.

               

              For the record, you can use the GUI to upload the new plugin or you can use the easier-to-remember drop box location (<server-install-dir>/plugins) rather than having to go all the way down into the rhq.ear/rhq-downloads/rhq-plugins directory.

               

              See this wiki page for more info: http://rhq-project.org/display/JOPR2/Adding+and+Updating+Agent+Plugins

              • 4. Re: How to manage oracle using JOPR
                Geethanga Amarasinghe Newbie

                Hi,

                 

                I updated my plugin, agent is also updated with the new plugin and when i try to connect to Oracle it gives the following error.

                 

                org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException: Failed to start component for resource 

                 

                I have attached the plugin JAR file with this post. If you please have a look at the jar and tell me what's mistake.

                 

                Thanks,

                Geethanga.

                 

                PS Removed. jar file

                • 5. Re: How to manage oracle using JOPR
                  mazz Master

                  org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException: Failed to start component for resource

                   

                  means you haven't fully configured the resource. Did you import the Oracle server into inventory then go to that Oracle resource's Inventory>Connections tab and make sure things like username/password and JDBC URL are all valid?

                   

                  I haven't played with the oracle plugin much in the past, but I assume the plugin configuration (aka connection properties) need to be set so the plugin can log into the oracle DB and monitor it.

                   

                  P.S. I think we need to purge that plugin attachment from your previous post - if it has the ojdbc driver in it, I think that might violate Oracle's licensing against distribution of their library. IANAL, but I don't mess with Oracle's licensing.

                  • 6. Re: How to manage oracle using JOPR
                    Ian Springer Master

                    You can also look in your Agent log and see if there is a stack trace for the InvalidPluginConfigurationException that gives you more information as to exactly what was invalid or missing in the plugin config.

                    • 7. Re: How to manage oracle using JOPR
                      Geethanga Amarasinghe Newbie

                      Hi,

                       

                      Thanks for following up with me to resolve this problem.

                      I checked the connection properties and i couldn't find anything wrong there.

                      JDBC driver class is set to "oracle.jdbc.driver.OracleDriver", i think this is correct.

                       

                      Here i will attach a log file from the rhq-agent.

                       

                      There is a stack trace but i can't figure anything out.

                       

                      Geethanga.

                      • 8. Re: How to manage oracle using JOPR
                        Ian Springer Master

                        It looks like the plugin is trying to find a class that's part of Oracle DMS and failing to find it. I'm just guessing here, but I'd try including ojdbc5dms.jar, rather than ojdbc5.jar, in the plugin jar's lib dir and see if that gets you any further.

                         

                        http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_112010.html

                        1 of 1 people found this helpful
                        • 9. Re: How to manage oracle using JOPR
                          Geethanga Amarasinghe Newbie

                          Hi,

                           

                          We were using ojdbc14dms.jar, now we changed to ojdbc14.jar. And now it's working. Many thanks for the support.

                           

                          Best Regards,

                          Geethanga