Description of problem: Attempt to disablePlugin using JBoss ON CLI fails. I tried to do the following: ************************************************* $ ./rhq-cli.sh -u rhqadmin -p rhqadmin -s test.usersys.redhat.com -t 7080 RHQ Enterprise Remote CLI 4.12.0.JON330GA Update 09 Remote server version is: 3.3.0.GA Update 09 (fcb34f1:80f74f5) Login successful rhqadmin.redhat.com:7080$ var pluginCriteria = PluginCriteria(); rhqadmin.redhat.com:7080$ pluginCriteria.addFilterDisplayName("IIS"); rhqadmin.redhat.com:7080$ var plugins = PluginManager.findPluginsByCriteria(pluginCriteria); rhqadmin.redhat.com:7080$ var myPlugin = plugins.get(0); rhqadmin.redhat.com:7080$ var pluginID = myPlugin.getId() rhqadmin.redhat.com:7080$ var allPluginIDs = [] rhqadmin.redhat.com:7080$ allPluginIDs.push(pluginID); 1.0 rhqadmin.redhat.com:7080$ pretty.print(allPluginIDs); one row 10005 rhqadmin.redhat.com:7080$ PluginManager.disablePlugins(allPluginIDs); org.jboss.remoting.CannotConnectException: Can not connect http client invoker after 1 attempt(s) PluginManager.disablePlugins(allPluginIDs); ^ ************************************************* and the following was logged in the server.log file: ************************************************* 15:49:37,153 ERROR [org.rhq.enterprise.server.remote.RemoteSafeInvocationHandler] (http-10.36.116.237:7080-1) Failed to invoke remote request: java.lang.IllegalArgumentException: InvocationRequest did not supply method. at org.rhq.enterprise.server.remote.RemoteSafeInvocationHandler.invoke(RemoteSafeInvocationHandler.java:93) [rhq-server.jar:4.12.0.JON330GA-redhat-9] ... 15:49:37,159 DEBUG [org.rhq.enterprise.server.remote.RemoteSafeInvocationHandler] (http-10.36.116.237:7080-1) Remote request [null] execution time (ms): 6 ************************************************* The same happens when trying to invoke enablePlugin or deletePlugin methods. Version-Release number of selected component (if applicable): JBoss ON 3.3.9 How reproducible: Always Steps to Reproduce: 1. 2. 3. Actual results: Plugins are not disabled and error is logged in the server.log file. Expected results: Selected plugins are disabled and no error is logged in the server.log file. Additional info:
Script syntax above is incorrect, with the following patch this should work: var b = new java.util.ArrayList() b.add(new java.lang.Integer(10042)) PluginManager.disablePlugins(b) This is because var allPluginIDs = [] casts to wrong type and the command it not detected correctly. In the master, fixed the typo in the bean name to invoke: commit 62640022d0af13f0017c2827d04ec82440485897 (HEAD -> master, upstream/master) Author: Michael Burman <miburman> Date: Mon May 28 15:49:37 2018 +0300 [BZ 1522728] Fix PluginManager invocation bean typo
Verified on Version :3.3.0.GA Update 11 Build Number : 669c61c:7f77b51 Verified that disablePlugin, enablePlugin or deletePlugin methods work as expected and no errors in server log. The log displays below: 01:25:50,992 INFO [org.rhq.enterprise.server.resource.metadata.PluginManagerBean] (http-0.0.0.0:7080-7) Disabling plugin [10042] 01:29:47,848 INFO [org.rhq.enterprise.server.resource.metadata.PluginManagerBean] (http-0.0.0.0:7080-13) Enabling plugin [10042] 01:30:23,017 INFO [org.rhq.enterprise.server.resource.metadata.PluginManagerBean] (http-0.0.0.0:7080-2) Disabling plugin [10042] 01:33:44,821 INFO [org.rhq.enterprise.server.core.plugin.AgentPluginScanner] (EJB default - 3) Plugin file [/home/hudson/jon-server-3.3.0.GA/modules/org/rhq/server-startup/main/deployments/rhq.ear/rhq-downloads/rhq-plugins/activemq-plugin-7.3.1.redhat-379.jar] has been deleted from the file system. Also verified that JON UI (Administration->Configuration->Agent Plugins) reflects the plugins status in 'Enabled?' column as expected.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:2930