Bug 1172085 - Nullpointer Exception on RHQ Agent Setup.prompt()
Summary: Nullpointer Exception on RHQ Agent Setup.prompt()
Keywords:
Status: ON_QA
Alias: None
Product: RHQ Project
Classification: Other
Component: Agent
Version: 4.13
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: RHQ 4.13
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1173297
TreeView+ depends on / blocked
 
Reported: 2014-12-09 11:21 UTC by Stian Lund
Modified: 2022-03-31 04:28 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
: 1173297 (view as bug list)
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Stian Lund 2014-12-09 11:21:27 UTC
Description of problem:

When starting rhq-agent.sh on a 'clean' server, after doing 'java -jar rhq-agent.jar --install', the setup fails with a Nullpointer:

----- 
    Agent Name [d32apvl043.oera-t.local] : Failed to start the agent  
    java.lang.NullPointerException  
            at org.rhq.enterprise.communications.util.prefs.Setup.prompt(Setup.java:303)  
            at org.rhq.enterprise.communications.util.prefs.Setup.setup(Setup.java:193)  
            at org.rhq.enterprise.agent.promptcmd.SetupPromptCommand.performBasicSetup(SetupPromptCommand.java:108)  
            at org.rhq.enterprise.agent.AgentMain.main(AgentMain.java:455)  
    Agent will be restarted soon to see if the failure condition cleared up  
-----

Obv. this never clears up

There's nothing more in the agent.log.

Workaround is to, download older agent jar, I used 4.5.1 from another server, then install this, run setup and let it update automagically.

Edit; I have also noticed that on existing agent when running the interactive shell (just running rhq-agent.sh), you are unable to actually type anything. According to GaYak on IRC 

Version-Release number of selected component (if applicable):

RHQ 4.13

Red Hat Enterprise Linux Server release 6.5 (Santiago)
2.6.32-431.23.3.el6.x86_64 #1 SMP Wed Jul 16 06:12:23 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:

Every time running the initial setup prompt.


Steps to Reproduce:
1. Download rhq-agent.jar
2. Install RHQ-agent 'java -jar rhq-agent.jar --install'
3. run rhq-agent/bin/rhq-agent.sh

Actual results:

Nullpointer Exception on Setup.prompt()

Expected results:

Interactive setup

Additional info:

Verified with 'gaYak' on irc.

Comment 1 Stian Lund 2014-12-09 11:34:43 UTC
Java version:

java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)

Comment 2 Michael Burman 2014-12-11 20:24:30 UTC
An update to this one: The null value is coming straight from the JLine module, which has not changed between last working version and current version. Possible corruption on in the jar from repository? Have to investigate more..

Comment 3 Michael Burman 2014-12-12 11:30:17 UTC
The bug appeared on the merge of commit 2a2ffa4dc443f0064365e7ef56deee4b9e3c688d which tried to fix issue BZ 1166383. The changes to running foreground prevent console reading from working.

Comment 4 Michael Burman 2014-12-12 11:31:26 UTC
Well, pasted wrong commit. BZ 1166383 is not the one to blame, but commit 72446e2a2b396285ce10ac784523fe2f98458006

Comment 5 Michael Burman 2015-01-05 20:35:09 UTC
Fixed in master and RHQ 4.13.1


Note You need to log in before you can comment on or make changes to this bug.