Menu

#4515 [HHQ-4483] RabbitMQ plugin - Command line operation reports

Bug
open
None
3
2012-10-09
2010-11-30
No

http://jira.hyperic.com/browse/HHQ-4483
RabbitMQ plugin - Command line operation reports incorrect directory message for non-root or non-rabbitmq user



When running a plugin action such as discover via command line using a non-root or non-rabbitmq user, the following is reported:



$ java -jar hq-pdk-4.5.1.BUILD-SNAPSHOT.jar -Dplugins.include=rabbitmq -m discover


ERROR [Thread-0] [AutoScan] AutoScan failed for RabbitMQ


org.hyperic.hq.product.PluginException: The Hyperic Agent does not have permission to read the Erlang Cookie at /home/hyperic/4.5.1-EE-12/hyperic-hqee-agent-4.5.1.BUILD-SNAPSHOT/bundles/agent-4.5.1.BUILD-SNAPSHOT/pdk/lib/.erlang.cookie


        at org.hyperic.hq.plugin.rabbitmq.core.ErlangCookieHandler.isValidFile(ErlangCookieHandler.java:184)


        at org.hyperic.hq.plugin.rabbitmq.core.ErlangCookieHandler.getErlangCookieValue(ErlangCookieHandler.java:91)


        at org.hyperic.hq.plugin.rabbitmq.core.ErlangCookieHandler.configureCookie(ErlangCookieHandler.java:80)


        at org.hyperic.hq.plugin.rabbitmq.detect.RabbitServerDetector.doCreateServerResource(RabbitServerDetector.java:358)


        at org.hyperic.hq.plugin.rabbitmq.detect.RabbitServerDetector.getServerResources(RabbitServerDetector.java:84)


        at org.hyperic.hq.autoinventory.scanimpl.NullScan.scan(NullScan.java:83)


        at org.hyperic.hq.autoinventory.Scanner.start(Scanner.java:198)


        at org.hyperic.hq.autoinventory.ScanManager.mainRunLoop(ScanManager.java:141)


        at org.hyperic.hq.autoinventory.ScanManager.access$000(ScanManager.java:41)


        at org.hyperic.hq.autoinventory.ScanManager$1.run(ScanManager.java:107)


0 servers detected



When the user is switched to root or rabbitmq, the same command line operation completes successfully



The message is misleading because there is no .erlang.cookie file in the hyperic agent installation directory (i.e. /home/hyperic/4.5.1-EE-12/hyperic-hqee-agent-4.5.1.BUILD-SNAPSHOT/bundles/agent-4.5.1.BUILD-SNAPSHOT/pdk/lib/).



The message should simply state something such as "The Hyperic Agent does not have permission to read the Erlang Cookie" or specify the correct .erlang.cookie directory.



Expected Result:


Messages provide correct information to users



Actual Result:


Message provides incorrect location for .erlang.cookie file in hyperic agent installation directory.



Steps to Reproduce:


1. SSH into platform running RabbitMQ server


2. Switch user to non-root or non-rabbitmq user (su - hyperic)


3. Install Hyperic agent


4. Go to agent installation directory (/home/hyperic/4.5.1-EE-12/hyperic-hqee-agent-4.5.1.BUILD-SNAPSHOT/bundles/agent-4.5.1.BUILD-SNAPSHOT/pdk/lib/)


5. Note the error message shows "The Hyperic Agent does not have permission to read the Erlang Cookie at /home/hyperic/4.5.1-EE-12/hyperic-hqee-agent-4.5.1.BUILD-SNAPSHOT/bundles/agent-4.5.1.BUILD-SNAPSHOT/pdk/.erlang.cookie"



Additional Information:


Executing the plugin command operation from any directory results in the message showing the user does not have access to that directory/.erlang.cookie.

Discussion

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.