Bug 824102
Summary: | [as5] server discovery sometimes discovers a JNP URL containing an IPv6 address surrounded by square brackets (e.g. "jnp://[0:0:0:0:0:0:0:1]:1099"), and the plugin fails to connect to the URL | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Ian Springer <ian.springer> |
Component: | Plugins | Assignee: | Nobody <nobody> |
Status: | NEW --- | QA Contact: | |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.4 | CC: | hrupp, staffan.horke |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 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: | |||
Bug Blocks: | 919199 |
Description
Ian Springer
2012-05-22 18:04:43 UTC
This was reported in this user forum thread: https://community.jboss.org/thread/196085 In my case I run JBAS 6.1.0.Final bound to 192.168.115.155 and the jnp-service.url contains a IPv4 address jnp://192.168.115.155:1199. From the agent log it looks like the file is read correctly: 2012-05-22 17:24:35,078 DEBUG [ResourceDiscoveryComponent.invoker.daemon-1] (org.rhq.plugins.jbossas5.ApplicationServerDiscoveryComponent)- Read JNP URL from jnp-service.url file: jnp://192.168.115.155:1199 However, to connect it later uses an IPv6 address, which fails: 2012-05-22 17:24:44,894 DEBUG [InventoryManager.discovery-1] (rhq.plugins.jbossas5.connection.RemoteProfileServiceConnectionProvider)- Connecting to Profile Service via remote JNDI using env [{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.provider.url=jnp://[0:0:0:0:0:0:0:1]:1199, jnp.disableDiscovery=true, jnp.timeout=60000, jnp.sotimeout=60000}]... ... 2012-05-22 17:24:44,894 DEBUG [InventoryManager.discovery-1] (org.rhq.plugins.jbossas5.ApplicationServerComponent)- Failed to connect to Profile Service. ... Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: [0:0:0:0:0:0:0:1]:1199 [Root exception is javax.naming.CommunicationException: Failed to connect to server /0:0:0:0:0:0:0:1:1199 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /0:0:0:0:0:0:0:1:1199 [Root exception is java.net.SocketException: Protocol family unavailable]]] JDK 6 WIN 7 JBAS 6.1.0.Final RHQ 4.4.0 JBAS + agent on one machine. RHQ server on another. I disabled IPv6 on Windows with the same result. Running the same setup with RHQ 4.2.0 works Thanks, this info will be very helpful in getting to the bottom of this. One question for you: does your Agent JVM command line contain either of the following options? -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=true Actually can you also check if your AS 6.1 JVM command line has either of those options? per BZ Triage 5/29/2012 (ccrouch, loleary, asantos, mfoley, myarborough) moving these to JON 3.1.1 or later Agent JVM contains (inst default) -Djava.net.preferIPv4Stack=true AS 6.1 did not contain any of the above. When 4.4.0 failed I tried RHQ 4.2.0 which worked (inst default). After your feedback added -Djava.net.preferIPv4Stack=true to AS 6.1 JAVA_OPTS and tried RHQ 4.4.0. Now my agent connects to the IPv4 url. However, after discovery success I fail to reproduce the error, even by removing -Djava.net.preferIPv4Stack=true from AS 6.1. So I cannot confirm what actually made it work. |