Bug 835905

Summary: agetn rpm - agent cannot be started from first time via wrapper script if it has been inventoried before via jar run
Product: [Other] RHQ Project Reporter: Armine Hovsepyan <ahovsepy>
Component: AgentAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED NOTABUG QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: hrupp, mfoley
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-03 14:23:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 837381    
Attachments:
Description Flags
agent log none

Description Armine Hovsepyan 2012-06-27 13:49:19 UTC
Description of problem:
old infrastructure - if there is an agent and server zip/jar installed and running, where agetn is not on the same machine as server, after stopping it, installing agetn rpm and starting through rpm agent wrapper script, it cannot connect to server for the first time.

Version-Release number of selected component (if applicable):
org.jboss.on-jboss-on-parent-3.1.0.GA-8

How reproducible:
always

Steps to Reproduce:
1. install jon server via zip
2. install jon agetn via jar on some other machine
3. start server 
4. start agent via wrapper script so that it is discovered by server
5. inventory agent with all resources
6. stop agent 
7. install agent rpm
8. start rpm agent via wrapper script

  
Actual results:
it cannot be started, cannot be "discovered" by server, seems like cannot get agent plugins. log message :

012-06-27 15:37:29,830 WARN  [main] (org.rhq.enterprise.agent.AgentMain)- {AgentMain.plugin-update-failure}Failed to update the plugins.. Cause: org.rhq.enterprise.communications.command.server.AuthenticationException: Command failed to be authenticated!  This command will be ignored and not processed: Command: type=[remotepojo]; cmd-in-response=[false]; config=[{rhq.agent-name=dhcp-31-221.brq.redhat.com, rhq.security-token=72pI3XA7Lthy2j1n79iOB1N850seFhxqQPFATbNPwRzqGxGASq5G32s4aUtvvbyV9Z0=, rhq.externalizable-strategy=AGENT}]; params=[{invocation=NameBasedInvocation[connectAgent], targetInterfaceName=org.rhq.core.clientapi.server.core.CoreServerService}]


Expected results:
agetn is up and running, server gui shows it available

Additional info:

wrapper stop-start fixes the problem

Comment 1 Mike Foley 2012-07-02 15:05:29 UTC
related to 835897.

need logs on 835897 

bz triage 7/2 by loleary, asantos, armine, zjin, viet, mfoley

Comment 2 Armine Hovsepyan 2012-07-03 11:59:33 UTC
Created attachment 595945 [details]
agent log

Comment 3 Armine Hovsepyan 2012-07-03 12:18:51 UTC
Hi all,

bug is not reproducable for me anymore. neither token, nor any other problem is being visible.

please mark it as worksForMe or Invalid, since it's not visible anymore.

Comment 4 Armine Hovsepyan 2012-07-03 14:23:31 UTC
invalid.

colsing for now, will be reopened if the case is reproduced.