Upgrade 4.6 to 4.12 fails: Database Plugin versions are not updated.
pathduck Aug 5, 2014 7:00 AMHi,
after fixing the other bug I think this one is a harder nut to crack.
Upgrade using 'rhqctl upgrade' exits with no errors using the command:
./rhqctl upgrade --from-agent-dir /opt/rhq/rhq-agent --from-server-dir /opt/rhq/rhq-server --storage-data-root-dir /opt/rhq/rhq-data
The server starts OK but all the agents fail in their download of the new plugins from the server.
From agent.log:
2014-08-05 11:33:43,637 INFO [main] (org.rhq.enterprise.agent.PluginUpdate)- {PluginUpdate.downloading}Downloading the plugin [rhq-script-plugin-4.6.0.jar]... 2014-08-05 11:33:43,702 ERROR [main] (org.rhq.enterprise.agent.PluginUpdate)- {PluginUpdate.download-failure}Failed to download the plugin [Script]. Cause: java.lang.ClassNotFoundException: [Warning] org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.PerspectivePluginDescriptorType from [Module "deployment.rhq.ear.rhq-server.jar:main" from Service Module Loader] 2014-08-05 11:33:43,702 WARN [main] (org.rhq.enterprise.agent.PluginUpdate)- {PluginUpdate.download-failure-will-retry}Failed to download the plugin [rhq-script-plugin-4.6.0.jar]. This was attempt #[1]. Will retry again in [56,746]ms. Cause: [org.rhq.core.util.exception.WrappedRemotingException:org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.PerspectivePluginDescriptorType from [Module "deployment.rhq.ear.rhq-server.jar:main" from Service Module Loader]] 2014-08-05 11:34:40,515 ERROR [main] (org.rhq.enterprise.agent.PluginUpdate)- {PluginUpdate.download-failure}Failed to download the plugin [Script]. Cause: java.lang.ClassNotFoundException: [Warning] org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.PerspectivePluginDescriptorType from [Module "deployment.rhq.ear.rhq-server.jar:main" from Service Module Loader] 2014-08-05 11:34:40,516 WARN [main] (org.rhq.enterprise.agent.PluginUpdate)- {PluginUpdate.download-failure-will-retry}Failed to download the plugin [rhq-script-plugin-4.6.0.jar]. This was attempt #[2]. Will retry again in [52,890]ms. Cause: [org.rhq.core.util.exception.WrappedRemotingException:org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.PerspectivePluginDescriptorType from [Module "deployment.rhq.ear.rhq-server.jar:main" from Service Module Loader]] 2014-08-05 11:35:33,455 ERROR [main] (org.rhq.enterprise.agent.PluginUpdate)- {PluginUpdate.download-failure}Failed to download the plugin [Script]. Cause: java.lang.ClassNotFoundException: [Warning] org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.PerspectivePluginDescriptorType from [Module "deployment.rhq.ear.rhq-server.jar:main" from Service Module Loader] 2014-08-05 11:35:33,456 WARN [main] (org.rhq.enterprise.agent.PluginUpdate)- {PluginUpdate.download-failure-will-not-retry}Failed to download the plugin [rhq-script-plugin-4.6.0.jar]. This was attempt #[3] - will no longer retry. This plugin will not be deployed in the agent. Cause: org.rhq.core.util.exception.WrappedRemotingException:org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.PerspectivePluginDescriptorType from [Module "deployment.rhq.ear.rhq-server.jar:main" from Service Module Loader] 2014-08-05 11:35:33,456 INFO [main] (org.rhq.enterprise.agent.PluginUpdate)- {PluginUpdate.downloading}Downloading the plugin [rhq-platform-plugin-4.6.0.jar]... 2014-08-05 11:35:33,505 ERROR [main] (org.rhq.enterprise.agent.PluginUpdate)- {PluginUpdate.download-failure}Failed to download the plugin [Platforms]. Cause: java.lang.ClassNotFoundException: [Warning] org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.PerspectivePluginDescriptorType from [Module "deployment.rhq.ear.rhq-server.jar:main" from Service Module Loader] 2014-08-05 11:35:33,506 WARN [main] (org.rhq.enterprise.agent.PluginUpdate)- {PluginUpdate.download-failure-will-retry}Failed to download the plugin [rhq-platform-plugin-4.6.0.jar]. This was attempt #[1]. Will retry again in [59,442]ms. Cause: [org.rhq.core.util.exception.WrappedRemotingException:org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.PerspectivePluginDescriptorType from [Module "deployment.rhq.ear.rhq-server.jar:main" from Service Module Loader]]
From server.log:
12:53:28,434 INFO [org.rhq.enterprise.server.core.plugin.ServerPluginScanner] (http-/0.0.0.0:7080-34) Filesystem has a server plugin [alert-email] at the file [/opt/rhq/rhq-server-4.12.0/modules/org/rhq/server-startup/main/deployments/rhq.ear/rhq-serverplugins/alert-email-4.12.0.jar] which is different than where the DB thinks it should be [/opt/rhq/rhq-server-4.12.0/modules/org/rhq/server-startup/main/deployments/rhq.ear/rhq-serverplugins/alert-email-4.6.0.jar] 12:53:28,434 INFO [org.rhq.enterprise.server.core.plugin.ServerPluginScanner] (http-/0.0.0.0:7080-34) It appears that the server plugin [ServerPlugin [id=0, name=alert-email, md5=53f2f5f6ee0e283627471cad049e6fef]] in the database may be obsolete. If so, it will be updated later. 12:53:28,434 INFO [org.rhq.enterprise.server.core.plugin.ServerPluginScanner] (http-/0.0.0.0:7080-34) Filesystem has a server plugin [DiskContentSourcePlugin] at the file [/opt/rhq/rhq-server-4.12.0/modules/org/rhq/server-startup/main/deployments/rhq.ear/rhq-serverplugins/rhq-serverplugin-disk-4.12.0.jar] which is different than where the DB thinks it should be [/opt/rhq/rhq-server-4.12.0/modules/org/rhq/server-startup/main/deployments/rhq.ear/rhq-serverplugins/rhq-serverplugin-disk-4.6.0.jar] 12:53:28,434 INFO [org.rhq.enterprise.server.core.plugin.ServerPluginScanner] (http-/0.0.0.0:7080-34) It appears that the server plugin [ServerPlugin [id=0, name=DiskContentSourcePlugin, md5=7c60222ffb7397b431e1c50cdab214fb]] in the database may be obsolete. If so, it will be updated later.
The database (Oracle 11) contains just the old versions:
snmptrapd Receiver for SNMP Traps 4.6.0 jboss-as-7 JBoss Application Server 7.x 4.4.0-SNAPSHOT hudson Hudson 4.6.0 Twitter Twitter Plugin 4.6.0 Script Script 4.6.0 Platforms Operating System Platforms 4.6.0 PerfTest Performance Test Plugin 4.6.0 NetworkServices Network Services 4.6.0 JMX Generic JMX 4.6.0 Tomcat Tomcat Server 4.6.0 RHQAgent RHQ Agent 4.6.0 JBossAS5 JBoss Application Server 5.x/6.x 4.6.0 JBossCache3 JBossCache 3.x Services 4.6.0 JBossAS JBoss Application Server 3.x/4.x 4.6.0
And so on... not sure what the 4.4 snapshot is doing there though, it's been deleted.
Any ideas how to fix without manually having to change every row in the RHQ_PLUGINS table, which I don't think is even possible... it contains md5 sums for one.
Stian