Bug 1077156 - Not possible to start XTS transaction on IPv6 with server bound to ::1
Summary: Not possible to start XTS transaction on IPv6 with server bound to ::1
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Transaction Manager
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: DR6
: EAP 6.4.0
Assignee: Amos Feng
QA Contact: Ondrej Chaloupka
Depends On:
TreeView+ depends on / blocked
Reported: 2014-03-17 11:23 UTC by Ondrej Chaloupka
Modified: 2019-08-19 12:46 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In a previous release of JBoss EAP 6, it was not possible to start an XST transaction on IPv6 with a server bound to address `::1`. This was because XTS core did not separate address from port number with square brackets; `[::1]:8080` as IPv6 defines for URLs. This issue has been resolved by splitting the URL into discrete sections and inserting square brackets as required before it is passed to the XTS core. Note that if you are using the `-b` switch when starting JBoss EAP 6 to run on IPv6 address, do not wrap the address in square brackets as this is contrary to the the specification and will prevent Webservices from starting.
Clone Of:
Last Closed:
Type: Bug

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat One Jira Issue Tracker WFLY-3690 Major Resolved Not possible to start XTS transaction on IPv6 with server bound to ::1 2015-11-03 08:37:10 UTC

Description Ondrej Chaloupka 2014-03-17 11:23:39 UTC
It's not possible to start transaction when server is bound to address ::1. When address [::1] is used then it works fine. 

Address that is returned when transaction is created here
but square brackets should be used around [::1] here.

How to reproduce:
change node0 in pom.xml (https://github.com/jbosstm/quickstart/blob/4.17/XTS/demo/test/pom.xml#L248) from [::1] to ::1 and run the test like:
mvn clean install -fae -Dipv6 -Parq-jbossas-managed-7 -Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true -Dtest=XTSDemoTest#testAtomicTransaction

Note: using -b attribute with [::1] is not correct as discussed here https://bugzilla.redhat.com/show_bug.cgi?id=1064771#c3. Correctly it should be used -b ::1. [::1] should be used in case of URLs (where port could appear) but not in case of ipv6 definition. The bug bz1064771 will be fixed but just as a backward compatibility issue and the WildFly (at least what I tested last week) does not accept the [::1] for webservices.

Comment 2 Ondrej Chaloupka 2014-03-17 11:37:42 UTC
OK, I found out that is reproducible just by running quickstarts without any change. I mean it's not necessary to change [::1] to ::1 in pom.xml.
It seems that there is some change in webservices that returns address without brackets and the XTS does not check.

Comment 3 Gytis Trikleris 2014-04-03 11:50:10 UTC
This happens because of the following configuration element: <xts-environment url="http://${jboss.bind.address:}:8080/ws-c11/ActivationService"/>

If bind address is set to ::1, then xts environment URL becomes http://::1:8080/ws-c11/ActivationService. This is incorrect, because IPv6 address with port number in it suppose to have brackets.

My suggestion is to split the configuration to multiple values: scheme, IP/domain name, and port. Additionally, we could add the activation service location, if it should be modifiable.
After this split, we could parse the IP address part and add brackets if required.

Comment 4 tom.jenkinson 2014-05-12 09:08:13 UTC
Hi Stefano,

Thanks for taking this one on. The work is as suggested in Gytis' comment. We need to split up the URL and then when converting it to the URL to pass into the XTS core we can wrap the address with "[]" as required.


Comment 5 Amos Feng 2014-10-18 01:29:17 UTC
Gytis' suggestion to split configuration to multiple values should work but it is not a easy way to do the transformer. So I had proposed to just split the address from the current xts-environment attribute and add the bruckets if required and join them again.


Comment 9 Ondrej Chaloupka 2014-11-26 14:46:55 UTC
Verified on 6.4.0.DR11

Just to note that putting jboss bind address as [::1] is not correct from spec point of view and webservices won't start if you do so. Check the bz:

Note You need to log in before you can comment on or make changes to this bug.