Created attachment 889327 [details] Unable to delete remote agent Description of problem: Unable to delete the remote agent in RHQ server, if we remove (rm -rf rhq-agent/) agent files manually on remote machine. Throws, ---------------snap--------------------- Message : Failed to uninstall agent. Severity : Error Time : Thursday, April 24, 2014 8:27:33 PM UTC+5:30 Root Cause : java.lang.IllegalArgumentException:There does not appear to be an agent installed here: /tmp/tmp/tmp/rhq-agent Detail : java.lang.RuntimeException:[1398329734471] javax.ejb.EJBException:java.lang.IllegalArgumentException: There does not appear to be an agent installed here: /tmp/tmp/tmp/rhq-agent -> java.lang.IllegalArgumentException:There does not appear to be an agent installed here: /tmp/tmp/tmp/rhq-agent --- STACK TRACE FOLLOWS --- [1398329734471] javax.ejb.EJBException:java.lang.IllegalArgumentException: There does not appear to be an agent installed here: /tmp/tmp/tmp/rhq-agent -> java.lang.IllegalArgumentException:There does not appear to be an agent installed here: /tmp/tmp/tmp/rhq-agent at Unknown.RuntimeException_0(Unknown Source) at Unknown.instantiate_32(Unknown Source) at Unknown.$instantiate_0(Unknown Source) at Unknown.$instantiate(Unknown Source) at Unknown.$readObject(Unknown Source) at Unknown.$onResponseReceived(Unknown Source) at Unknown.onResponseReceived_4(Unknown Source) at Unknown.$fireOnResponseReceived(Unknown Source) at Unknown.onReadyStateChange_0(Unknown Source) at Unknown.$setOnReadyStateChange/this$static.onreadystatechange<(Unknown Source) at Unknown.apply(Unknown Source) at Unknown.entry0(Unknown Source) at Unknown.entry_0/<(Unknown Source) at Unknown.anonymous(Unknown Source) ---------------snap--------------------- Version-Release number of selected component (if applicable): Version : 4.11.0-SNAPSHOT Build Number : 1bc9904 GWT Version : 2.5.0 SmartGWT Version : 3.0 Browser: Firefox 28 How reproducible: always Steps to Reproduce: 1. Navigate to "Administration-->Agents-->New" 2. Enter remote box details (Agent should not be installed), give some location, example: /tmp/ 3. Click on "install Agent", will be installed successfully 4. Do ssh to remote box and stop and delete the agent files manually(rm -rf rha-agent/) 5. Navigate to "Administration-->Agents" 6. Select the agent(which is installed in Step #2) and click "Delete" 7. Unable to delete, throws exception Actual results: Unable to delete, throws exception Expected results: Might indicate agent not available on the specified location, however should remove entry from RHQ server Additional info: Screen shot is attached
Did this ask you to delete the agent on the remote machine? I thought there should have been a dialog that pops up and asks "Do you want to remove the agent from the remote machine?" If you already removed it, and you say "Yes" and I would suspect this would happen. Does this happen if you select "No" to the question? I suppose it should pass even if you say "Yes" - if its already deleted, it should just go. But can you confirm this is when you selected "Yes" from the dialog box, or did it not ask you at all?
I just tried this. Yes, it fails if you ask it to remove the agent and it is already deleted. Workaround: Just don't tell it to delete the agent from the remote box - when it asks "Do you want to delete it from the remote machine", say "No"
git commit to master: 1b240136f97cfa677e080c6007a868209543646a
Bulk closing of RHQ 4.11 issues, now that RHQ 4.12 is out. If you find an issue with those, please open a new BZ, linking to the old one.