5 Replies Latest reply on Nov 23, 2008 5:02 AM by akpraha

    Mysql

    thardy

      I'm trying to setup the monitering of our mysql databases in jopr. All the databases were discovered but all are listed as unavailable. When I look at the agent log I found the following error for each database:

      2008-11-18 14:23:01,008 ERROR [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Failed to start component for Resource[id=507558, type=Database, key=a, name=a Database] from synchronized merge.
      org.rhq.core.clientapi.agent.PluginContainerException: Could not build component for Resource [Resource[id=507558, type=Database, key=a, name=a Database]]
       at org.rhq.core.pc.inventory.InventoryManager.activateResource(InventoryManager.java:955)
       at org.rhq.core.pc.inventory.InventoryManager.refreshResourceComponentState(InventoryManager.java:1833)
       at org.rhq.core.pc.inventory.InventoryManager.processSyncInfo(InventoryManager.java:1647)
       at org.rhq.core.pc.inventory.InventoryManager.processSyncInfo(InventoryManager.java:1653)
       at org.rhq.core.pc.inventory.InventoryManager.processSyncInfo(InventoryManager.java:1653)
       at org.rhq.core.pc.inventory.InventoryManager.synchInventory(InventoryManager.java:643)
       at org.rhq.core.pc.inventory.InventoryManager.handleReport(InventoryManager.java:629)
       at org.rhq.core.pc.inventory.AutoDiscoveryExecutor.call(AutoDiscoveryExecutor.java:117)
       at org.rhq.core.pc.inventory.AutoDiscoveryExecutor.run(AutoDiscoveryExecutor.java:92)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
       at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: org.rhq.core.clientapi.agent.PluginContainerException: Could not find plugin class org.rhq.plugins.mysql.MySqlDatabaseComponent] from plugin environment [PluginEnvironment[pluginName=MySql, pluginDesciptorLoader=PluginDescriptorLoader[pluginJarUrl=file:/usr/jopr/jopr-agent-2.1.0.GA/plugins/rhq-mysql-plugin-1.1.0.GA.jar, pluginClassLoader=org.rhq.core.pc.plugin.PluginClassLoader@f73893]]]
       at org.rhq.core.pc.plugin.PluginComponentFactory.instantiateClass(PluginComponentFactory.java:138)
       at org.rhq.core.pc.plugin.PluginComponentFactory.buildResourceComponent(PluginComponentFactory.java:104)
       at org.rhq.core.pc.inventory.InventoryManager.activateResource(InventoryManager.java:952)
       ... 17 more
      Caused by: java.lang.ClassNotFoundException: org.rhq.plugins.mysql.MySqlDatabaseComponent
       at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:242)
       at org.rhq.core.pc.plugin.PluginComponentFactory.instantiateClass(PluginComponentFactory.java:128)
       ... 19 more
      


        • 1. Re: Mysql
          mazz

          Over time, some of the plugins have entered a state of disrepair and in need of some love. :}

          The MySQL plugin looks like this is one of them.

          Feel free to fix and contribute some patches.

          • 2. Re: Mysql
            thardy

            Thanks for the reply. Not sure if I have the time right now to fix it. I just wanted to make sure I wasn't doing something obviously wrong.

            • 3. Re: Mysql
              akpraha

              I'm seeing slightly different behavior. I downloaded and installed 2.1.0, and the agent (running on a centos 5.2/jdk1.6 environment) appears to find the mysql daemon running, and sends it to the server. However, the server shows no indication whatsoever that the mysqld server exists. The agent log (below) clearly shows that it's located a mysql process, and claims to be sending it to the server. However, I don't see anything on the server that would indicate it ha received the information on the mysql server instance, nor are there any exceptions. Has anybody else managed to get mysql monitoring working?

              2008-11-21 15:50:09,668 INFO [InventoryManager.discovery-1] (rhq.core.pc.inventory.AutoDiscoveryExecutor)- Executing server discovery scan...
              2008-11-21 15:50:09,712 INFO [InventoryManager.discovery-1] (rhq.core.pc.inventory.AutoDiscoveryExecutor)- Process scan auto-detected new server resource: scan=[ProcessScan: query=[process|basename|match=sshd,process|basename|nomatch|parent=sshd], name=[SSHD]], discovered-process=[process: pid=[2618], name=[sshd], ppid=[1]]
              2008-11-21 15:50:09,797 INFO [InventoryManager.discovery-1] (org.rhq.plugins.tomcat.TomcatDiscoveryComponent)- Discovering Tomcat servers
              2008-11-21 15:50:09,797 INFO [InventoryManager.discovery-1] (org.rhq.plugins.agent.AgentDiscoveryComponent)- Discovering RHQ Agent...
              2008-11-21 15:50:09,840 INFO [InventoryManager.discovery-1] (org.rhq.plugins.jbossas.JBossASDiscoveryComponent)- Discovering JBossAS 3.2.x and 4.x servers...
              2008-11-21 15:50:09,968 INFO [InventoryManager.discovery-1] (rhq.core.pc.inventory.AutoDiscoveryExecutor)- Process scan auto-detected new server resource: scan=[ProcessScan: query=[process|basename|match=^mysqld$,process|basename|nomatch|parent=^mysqld$], name=[unix]], discovered-process=[process: pid=[29588], name=[mysqld], ppid=[29528]]
              2008-11-21 15:50:09,969 INFO [InventoryManager.discovery-1] (org.rhq.plugins.mysql.MySqlDiscoveryComponent)- Discovered a mysql process: ProcessScanResult: scan=[ProcessScan: query=[process|basename|match=^mysqld$,process|basename|nomatch|parent=^mysqld$], name=[unix]], info=[process: pid=[29588], name=[mysqld], ppid=[29528]]
              2008-11-21 15:50:10,014 INFO [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Sending server inventory report to Server...
              


              • 4. Re: Mysql
                pilhuhn

                Did you check if it is sitting in the AD portlet ready to be imported? If it is not directly visible, you might want to check the "View all..." page too.

                • 5. Re: Mysql
                  akpraha

                  It's unfortunately not visible in neither the auto discovery portlet nor under the view all page.