[jboss-jira] [JBoss JIRA] Updated: (JBAS-8637) twiddle does not correctly handle IPv6 addresses

Richard Achmatowicz (JIRA) jira-events at lists.jboss.org
Thu Nov 11 15:22:01 EST 2010


     [ https://jira.jboss.org/browse/JBAS-8637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Achmatowicz updated JBAS-8637:
--------------------------------------

    Description: 
The test cases org.jboss.test.util.test.TwiddleUnitTestCase.{testGet, testInvoke} are failing.

One problem is that the twiddle option -o is not correctly handling IPv6 addresses; for example:

[rachmatowicz at soa3 bin]$ ./twiddle.sh -o fec0:0:a16:ffff::13 get "jboss.system:type=Server" Started
15:17:53,066 ERROR [Twiddle] Exec failed
org.jboss.util.NestedRuntimeException: For input string: "0:a16:ffff::13:1090"; - nested throwable: (java.lang.NumberFormatException: For input string: "0:a16:ffff::13:1090")
	at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:208)
	at org.jboss.console.twiddle.command.MBeanServerCommand.getMBeanServer(MBeanServerCommand.java:64)
	at org.jboss.console.twiddle.command.GetCommand.execute(GetCommand.java:149)
	at org.jboss.console.twiddle.Twiddle.main(Twiddle.java:357)
Caused by: java.lang.NumberFormatException: For input string: "0:a16:ffff::13:1090"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
	at java.lang.Integer.parseInt(Integer.java:458)
	at java.lang.Integer.parseInt(Integer.java:499)
	at com.sun.jndi.url.rmi.rmiURLContext.getRootURLContext(rmiURLContext.java:86)
	at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:182)
	at javax.naming.InitialContext.lookup(InitialContext.java:392)
	at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1886)
	at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1856)
	at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257)
	at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
	at org.jboss.console.twiddle.Twiddle.createMBeanServerConnection(Twiddle.java:309)
	at org.jboss.console.twiddle.Twiddle.connect(Twiddle.java:318)
	at org.jboss.console.twiddle.Twiddle.access$400(Twiddle.java:60)
	at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:204)
	... 3 more

This is a typical IPv6 URL creation issue, as the issue can be fixed by surrouning the IPv6 address literal in square brackets:

[rachmatowicz at soa3 bin]$ ./twiddle.sh -o [fec0:0:a16:ffff::13] get "jboss.system:type=Server" Started
Started=true
 

  was:
When starting the AS with an IPv6 bind address, the following WARN log entry is seen on the console:

17:04:10,765 INFO  [SnmpAgentService] SNMP agent going active
17:04:10,783 ERROR [TrapEmitter] SNMP send error for localhost/127.0.0.1:1162: <java.security.InvalidParameterException: Buffer overflow error converting IP address>
17:04:11,030 WARN  [InvokerLocator] Host resolves to null in socket://3ffe:ffff:100:f101::1:3873?timeout=300000. Perhaps the host contains an invalid character.  See http://www.ietf.org/rfc/rfc2396.txt.
17:04:11,465 WARNING [FileConfigurationParser] AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal

THis is due to the InvokerLocator for the MBean 
jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3
being incorrectlly formed by substitution of the bind address into the URL template in the file deploy/ejb3-connection-jboss-beans.xml

socket://${jboss.bind.address}:${port}?timeout=300000

In order to create a well-formed URL, this needs to check for the case when the bind address is an IPv6 literal, and add brackets accordingly.



     Complexity: Low


> twiddle does not correctly handle IPv6 addresses
> ------------------------------------------------
>
>                 Key: JBAS-8637
>                 URL: https://jira.jboss.org/browse/JBAS-8637
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Integration
>    Affects Versions: 6.0.0.M4
>            Reporter: Richard Achmatowicz
>            Assignee: Scott Marlow
>             Fix For: TBD-6.x
>
>
> The test cases org.jboss.test.util.test.TwiddleUnitTestCase.{testGet, testInvoke} are failing.
> One problem is that the twiddle option -o is not correctly handling IPv6 addresses; for example:
> [rachmatowicz at soa3 bin]$ ./twiddle.sh -o fec0:0:a16:ffff::13 get "jboss.system:type=Server" Started
> 15:17:53,066 ERROR [Twiddle] Exec failed
> org.jboss.util.NestedRuntimeException: For input string: "0:a16:ffff::13:1090"; - nested throwable: (java.lang.NumberFormatException: For input string: "0:a16:ffff::13:1090")
> 	at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:208)
> 	at org.jboss.console.twiddle.command.MBeanServerCommand.getMBeanServer(MBeanServerCommand.java:64)
> 	at org.jboss.console.twiddle.command.GetCommand.execute(GetCommand.java:149)
> 	at org.jboss.console.twiddle.Twiddle.main(Twiddle.java:357)
> Caused by: java.lang.NumberFormatException: For input string: "0:a16:ffff::13:1090"
> 	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
> 	at java.lang.Integer.parseInt(Integer.java:458)
> 	at java.lang.Integer.parseInt(Integer.java:499)
> 	at com.sun.jndi.url.rmi.rmiURLContext.getRootURLContext(rmiURLContext.java:86)
> 	at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:182)
> 	at javax.naming.InitialContext.lookup(InitialContext.java:392)
> 	at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1886)
> 	at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1856)
> 	at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257)
> 	at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
> 	at org.jboss.console.twiddle.Twiddle.createMBeanServerConnection(Twiddle.java:309)
> 	at org.jboss.console.twiddle.Twiddle.connect(Twiddle.java:318)
> 	at org.jboss.console.twiddle.Twiddle.access$400(Twiddle.java:60)
> 	at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:204)
> 	... 3 more
> This is a typical IPv6 URL creation issue, as the issue can be fixed by surrouning the IPv6 address literal in square brackets:
> [rachmatowicz at soa3 bin]$ ./twiddle.sh -o [fec0:0:a16:ffff::13] get "jboss.system:type=Server" Started
> Started=true
>  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list