Bug 1098705 - NPE in CassandraNodeDiscoveryComponent when cassandra has root as working directory
Summary: NPE in CassandraNodeDiscoveryComponent when cassandra has root as working dir...
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 4.11,4.12
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-17 13:47 UTC by Markus Grieder
Modified: 2022-03-31 04:27 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)
Stacktrace NullPointerException (1.46 KB, text/plain)
2014-05-17 13:47 UTC, Markus Grieder
no flags Details

Description Markus Grieder 2014-05-17 13:47:15 UTC
Created attachment 896600 [details]
Stacktrace NullPointerException

Description of problem:
NullPointerException in CassandraNodeDiscoveryComponent when Cassandra (separate installation, not the rhq storage node) was started with working directory '/' -> See attached Stacktrace

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

How reproducible:
To force the problem change the working directory to '/' in 'cassandra.in.sh': add 'cd /' at the end.


Steps to Reproduce:
1. Start Cassandra with working directory '/' (for example do "service cassandra start" after installing with http://www.datastax.com/documentation/cassandra/2.0/cassandra/install/installRHEL_t.html ) or manually set the working directory to '/' in 'cassandra.in.sh'
2. Wait for next discovery of the rhq agent on the same plattform.
3. -> NPE is visible in RHQ-Agent log and Cassandra is not available in inventory for import.

Actual results:
Cassandra is only available in the inventory when the working directory is not the root directory.

Expected results:
When Cassandra is started as service it could be normal that '/' is the working directory. 'CassandraNodeDiscoveryComponent' is assuming that the working directory is the bin-directory of cassandra -> Possible solution: If the current directory has no parent directory use the current directory as basedir.


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