Failed to start the agent
nsyed4 Feb 5, 2009 2:58 PMEnvironment: Linux Fedora 8 32 bit O.S Java SE 6
I built RHQ Server and Agent as described in the build instructions given at http://support.rhq-project.org/display/RHQ/Building+RHQ:
1. Used Maven: mvn install -Penterprise,dev -Dmaven.test.skip=true -Ddbsetup
2. Used Oracle 10g: Edited pom.xml to use oracle jdbc driver
3. Started the RHQ Server: <rhq-trunk>/modules/enterprise/server/container/target/rhq-server-1.2.0-SNAPSHOT/bin/rhq-server.sh start
4. Tried Starting the RHQ Agent: <rhq-trunk>/modules/enterprise/agent/target/rhq-agent/bin/rhq-agent.sh
Please Note that there is no version appened to the rhq-agent directory but there is to the server (rhq-server-1.2.0-SNAPSHOT).
Recieved the following error:
Failed to start the agent
java.lang.IllegalStateException: Neither a native not a Java platform was discovered - this should never happen. Known platform types are [ResourceTpe[id=0, category=Platform, name=platform-a,plugin=PerfTest]].
at org.rhq.core.pc.inventory.InventoryManager.discoverPlatform(InventoryManager.java:1308)
Agent will be restarted soon to see if the failure condition cleared up
I restarted the agent under debug mode and these are some interesting logs:
2009-02-05 11:41:48,545 DEBUG [main] (org.rhq.core.pc.PluginContainer)- Starting and configuring container service: PluginComponentFactory
2009-02-05 11:41:48,545 DEBUG [main] (org.rhq.core.pc.PluginContainer)- Starting and configuring container service: InventoryManager
2009-02-05 11:41:48,545 INFO [main] (rhq.core.pc.inventory.InventoryManager)- Initializing Inventory Manager...
2009-02-05 11:41:48,547 DEBUG [main] (rhq.core.pc.inventory.InventoryManager)- Executing platform scan...
2009-02-05 11:41:48,739 DEBUG [main] (rhq.core.pc.plugin.PluginComponentFactory)- Loading class: org.rhq.plugins.perftest.PerfTestDiscoveryComponent
2009-02-05 11:41:48,741 DEBUG [main] (rhq.core.pc.plugin.PluginComponentFactory)- Loaded class: class org.rhq.plugins.perftest.PerfTestDiscoveryComponent
2009-02-05 11:41:48,741 DEBUG [main] (rhq.core.pc.plugin.PluginComponentFactory)- Loading and creating the discovery component [org.rhq.plugins.perftest.PerfT
estDiscoveryComponent] for resource type [platform-a]
2009-02-05 11:41:48,741 DEBUG [main] (rhq.core.pc.plugin.PluginComponentFactory)- Created and cached the discovery component [org.rhq.plugins.perftest.PerfTes
tDiscoveryComponent] for resource type [platform-a]
2009-02-05 11:41:48,747 ERROR [main] (org.rhq.plugins.perftest.ScenarioManager)- Cannot find scenario name. Make sure the property on.perftest.scenario is set
.
2009-02-05 11:41:48,749 FATAL [main] (org.rhq.enterprise.agent.AgentMain)- {AgentMain.startup-error}The agent encountered an error during startup and must abo
rt
java.lang.IllegalStateException: Neither a native nor a Java platform was discovered - this should never happen. Known platform types are [ResourceType[id=0,
category=Platform, name=platform-a, plugin=PerfTest]].
at org.rhq.core.pc.inventory.InventoryManager.discoverPlatform(InventoryManager.java:1308)
at org.rhq.core.pc.inventory.InventoryManager.executePlatformScan(InventoryManager.java:264)
at org.rhq.core.pc.inventory.InventoryManager.initialize(InventoryManager.java:186)
at org.rhq.core.pc.PluginContainer.startContainerService(PluginContainer.java:307)
at org.rhq.core.pc.PluginContainer.initialize(PluginContainer.java:231)
at org.rhq.enterprise.agent.AgentMain.startPluginContainer(AgentMain.java:1724)
at org.rhq.enterprise.agent.AgentMain.start(AgentMain.java:622)
at org.rhq.enterprise.agent.AgentMain.main(AgentMain.java:397)
I searched for on.perftest.scenario and found out that in the file rhq-home/modules/plugins/perfterst/src/main/resources/META-INF/rhq-plugin.xml there was information asking to start the agent with -Don.perftest.scenario=scenario_name where scenario_name is one of the configurations for number of servers and services, used for performance testing.
I started with the perftest option but I recieved the same error.
Then,I put some debug statements in the source code of the file org.rhq.core.pc.inventoryInventoryManager, and found out that the java.util.Set allDiscoveredPlatforms is empty, since discoveredResources is null.