Bug 820570
| Summary: | [as7] code in discovery that figures out System property (sysprop) values by parsing the server command line does not process -P/--properties option | ||
|---|---|---|---|
| Product: | [Other] RHQ Project | Reporter: | Ian Springer <ian.springer> |
| Component: | Plugins | Assignee: | Charles Crouch <ccrouch> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> |
| Severity: | high | Docs Contact: | |
| Priority: | urgent | ||
| Version: | 4.4 | CC: | ccrouch, hbrock, hrupp, lzoubek, vnguyen |
| Target Milestone: | --- | ||
| Target Release: | JON 3.1.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 819145 | Environment: | |
| Last Closed: | 2013-09-03 15:12:58 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: | 819145, 820584, 820622 | ||
| Bug Blocks: | 707223, 782579 | ||
|
Description
Ian Springer
2012-05-10 12:04:23 UTC
*** Bug 820584 has been marked as a duplicate of this bug. *** Cherry-picked to the release/jon3.1.x branch: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=0a6dab6 Does properties file path have to be absolute? AS7 can process the following without any problem (values showed up in admin console)
./standalone.sh -P p1.properties -P= p2.properties --properties=p3.properties
JON Agent throws IllegalArgumentException: URI is not absolute
agent log
--
2012-05-23 16:25:57,601 ERROR [ResourceDiscoveryComponent.invoker.daemon-6] (rhq.modules.plugins.jbossas7.StandaloneASDiscovery)-
Discovery of a JBossAS7 Standalone Server Resource failed for process: pid=[330], name=[java], ppid=[32746].
java.lang.IllegalArgumentException: URI is not absolute
at java.net.URI.toURL(URI.java:1097)
at org.rhq.modules.plugins.jbossas7.AS7CommandLine.toURL(AS7CommandLine.java:149)
at org.rhq.modules.plugins.jbossas7.AS7CommandLine.processClassArgument(AS7CommandLine.java:133)
at org.rhq.core.pluginapi.util.JavaCommandLine.parseClassArguments(JavaCommandLine.java:194)
at org.rhq.core.pluginapi.util.JavaCommandLine.parseCommandLine(JavaCommandLine.java:159)
at org.rhq.core.pluginapi.util.JavaCommandLine.<init>(JavaCommandLine.java:136)
at org.rhq.modules.plugins.jbossas7.AS7CommandLine.<init>(AS7CommandLine.java:70)
at org.rhq.modules.plugins.jbossas7.AS7CommandLine.<init>(AS7CommandLine.java:75)
at org.rhq.modules.plugins.jbossas7.BaseProcessDiscovery.discoverResources(BaseProcessDiscovery.java:135)
Moving ON_DEV, I get same exception as Viet - when passing relative path to properties file and server does not appear in discovery queue. I've checked that relative path of properties file is based on process working directory (current directory when server is started) On linux it should be easy to detect work dir for process (pwdx <pid>) but I am not sure about windows. If we cannot fully support this, please change the error message to something more user-friendly - for example : relative URL command line option to properties file is not supported Cherry-picked to release/jon3.1.x branch: http://git.fedorahosted.org/git?p=rhq/rhq.git;a=commitdiff;h=ff771bf verified in JON 3.1.CR1, also added CLI automation Bulk closing of old issues in VERIFIED state. |