3 Replies Latest reply on Aug 1, 2012 10:00 AM by jay shaughnessy

    JON 3.0.1.GA JBoss5 Plugin Searching in the Wrong Directory

    James Lopez Newbie

      I am seeing a bunch of traces in the agent log where the JBoss5 plugin can't find JBoss files, but it's looking in the agent home and not in JBoss home. What could I have done to cause this? The JBoss home and server home look fine in the connection configuration of the resource.

       

      2012-07-31 11:04:33,045 WARN  [ResourceContainer.invoker.nonDaemon-1] (rhq.plugins.jbossas5.script.ScriptComponent)- Failed to compute the SHA256 digest of the script: /home/jon/rhq-agent/wsrunclient.sh

      java.io.FileNotFoundException: wsrunclient.sh (No such file or directory)

              at java.io.FileInputStream.open(Native Method)

              at java.io.FileInputStream.<init>(Unknown Source)

              at org.rhq.core.util.MessageDigestGenerator.calcDigest(MessageDigestGenerator.java:255)

              at org.rhq.core.util.MessageDigestGenerator.calcDigestString(MessageDigestGenerator.java:291)

              at org.rhq.plugins.jbossas5.script.ScriptComponent.discoverDeployedPackages(ScriptComponent.java:228)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

              at java.lang.reflect.Method.invoke(Unknown Source)

              at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:552)

              at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

              at java.util.concurrent.FutureTask.run(Unknown Source)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

              at java.lang.Thread.run(Unknown Source)

        • 1. Re: JON 3.0.1.GA JBoss5 Plugin Searching in the Wrong Directory
          jay shaughnessy Expert

          This bug was supposedly fixed in 3.0.1.  See https://bugzilla.redhat.com/show_bug.cgi?id=788736.  Perhaps it is something new.  Please verify the version and let us know.  Thanks.

          • 2. Re: JON 3.0.1.GA JBoss5 Plugin Searching in the Wrong Directory
            James Lopez Newbie

            You were right, it turns out we were running the 300 plugins on JON 3.0.1, which I'm assuming didn't have the fix for these warnings. Unfortunately, updating the plugins has turned into a multi-day affair.

             

            At first I attempted to simply upload the 3.0.1 plugin jars through the web ui, but JON said that these plugins were obsolete and deleted them immediately.

             

            Next, I tried to purge the plugins that I had updates for, and then uploaded the plugins the same way.

             

            This seemed to deploy the plugins satisfactorily in the UI, but it did create some server side traces:

             

            2012-07-31 13:57:33,364 ERROR [org.hibernate.util.JDBCExceptionReporter] Batch entry 0 insert into RHQ_RESOURCE_TYPE (NAME, DESCRIPTION, CATEGORY, CREATION_DATA_TYPE, CREATE_DE

            LETE_POLICY, SUPPORTS_MANUAL_ADD, SINGLETON, PLUGIN, CTIME, MTIME, DELETED, PLUGIN_CONFIG_DEF_ID, RES_CONFIG_DEF_ID, SUBCATEGORY_ID, BUNDLE_CONFIG_ID, ID) values ('JBossAS Server', 'JBoss Application Server (AS), Enterprise Application Platform (EAP), Enterprise SOA Platform (SOA-P), or Enterprise Web Platform (EWP) 5.x or 6.x instance', 'SERVER', 'CONFIGURATION', 'NEITHER', '1', '0', 'JBossAS5', '1343757453090', '1343757453090', '0', '10721', NULL, NULL, '12062', '10221') was aborted.  Call getNextException to see the cause.

            2012-07-31 13:57:33,364 WARN  [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 23505

            2012-07-31 13:57:33,364 ERROR [org.hibernate.util.JDBCExceptionReporter] ERROR: duplicate key value violates unique constraint "rhq_res_type_idx_plg_name"

            2012-07-31 13:57:33,365 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session

            org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

             

            2012-07-31 13:57:33,461 ERROR [org.rhq.enterprise.server.core.plugin.ProductPluginDeployer] Failed to register RHQ plugin file [file:/opt/jon-server-3.0.1.GA/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/jopr-jboss-cache-v3-plugin-4.2.0.JON.3.0.1.GA.jar]

            javax.ejb.EJBTransactionRolledbackException: Couldn't persist type [ResourceType[id=0, name=JBoss Cache, plugin=JBossCache3, category=Service]] because parent [ResourceType[id=10221, name=JBossAS Server, plugin=JBossAS5, category=Server]] wasn't already persisted.

             

             

             

            The agent is also not pleased. It believes its inventory report contains deleted resources, shuts itself down and purges its data directory, and waits to be started manually:

             

            2012-07-31 18:05:40,151 INFO  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Sending [server] inventory report to Server...

            2012-07-31 18:05:40,823 ERROR [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Failed to merge inventory report with server. The report contains one or more resource types that have been marked for deletion. Notifying the plugin container that a reboot is needed to purge stale types.

            2012-07-31 18:05:40,823 INFO  [InventoryManager.discovery-1] (org.rhq.enterprise.agent.AgentMain)- {AgentMain.shutting-down}Agent is being shut down...

             

             

            Is there any way to resolve this confusion without touching the DB directly or wiping the tables and starting over?

            • 3. Re: JON 3.0.1.GA JBoss5 Plugin Searching in the Wrong Directory
              jay shaughnessy Expert

              I'm sorry to hear about this trouble.  I belive you are hitting a known issue with 3.0.1.  There is a patch available on the customer portal.  Please open a support case and have them walk you through the steps to recovery.  They should be well aware of the problem and how to get you up and running.