5 Replies Latest reply on Oct 6, 2017 1:57 AM by nguyennhatkhanh206

    How to start JBoss EAP 6 in Dual Stack with Clustering ?


      I have Jboss EAP 6 and i want to start it in dual stack with Clustering.


      So i have modified the standalone.conf with the following :

      JAVA_OPTS="-Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=false -Djgroups.bind_addr=::1"


      And I start the server with the following :

      standalone.sh -b=:: -bmanagement=:: --server-config=standalone-ha.xml -u ff0e::1


      This seems to work fine with JBoss running in Normal mode. But when I run in HA mode, this does not work and produces the following error :


      Error starting advertise listener: java.net.SocketException: bad argument for IP_MULTICAST_IF: address not bound to any interface

        at java.net.PlainDatagramSocketImpl.socketSetOption(Native Method) [rt.jar:1.6.0_16]

        at java.net.PlainDatagramSocketImpl.setOption(PlainDatagramSocketImpl.java:299) [rt.jar:1.6.0_16]

        at java.net.MulticastSocket.setInterface(MulticastSocket.java:420) [rt.jar:1.6.0_16]

        at org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl.init(AdvertiseListenerImpl.java:151)

        at org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl.start(AdvertiseListenerImpl.java:165)

        at org.jboss.modcluster.ModClusterService.init(ModClusterService.java:183)

        at org.jboss.modcluster.container.catalina.CatalinaEventHandlerAdapter.init(CatalinaEventHandlerAdapter.java:263)

        at org.jboss.modcluster.container.catalina.CatalinaEventHandlerAdapter.start(CatalinaEventHandlerAdapter.java:104)

        at org.jboss.as.modcluster.ModClusterService.start(ModClusterService.java:112)

        at org.jboss.as.clustering.msc.AsynchronousService$1.run(AsynchronousService.java:82) [jboss-as-clustering-common-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_16]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_16]

        at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_16]

        at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final.jar:2.1.0.

        • 1. Re: How to start JBoss EAP 6 in Dual Stack with Clustering ?

          When you say dual stack it means there is both IPv4 and IPv6 connectivity. So which services do you want to run on which IP version?


          The exception is coming from mod_cluster adverize mechanism that is sending multicast to group

          • 2. Re: How to start JBoss EAP 6 in Dual Stack with Clustering ?

            Even I'm facing the same problem.. I dont want to run any specific Jboss service on IPv6. But my application will use IPv6 sockets. When I looked for a workaround for this problem,  -Djava.net.preferIPv4Stack=true was recommended with which I couldn't open a v6 sockets.


            By the way i use cent-os 5.9 and open jdk

            [root@000c29789366 ~]# java -version

            java version "1.7.0_45"

            OpenJDK Runtime Environment (rhel- u45-b15)

            OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

            [root@000c29789366 ~]#

            • 3. Re: How to start JBoss EAP 6 in Dual Stack with Clustering ?

              Looks like a bit confused question. Unless you are writing a resouce adapter and opening your own sockets or doing something against EE specification, all the sockets are managed by the application server! So indeed you are looking at how to configure JBoss AS to work with IPv6 ports, e.g. for the webserver.


              So, what do you really mean by your application will use IPv6 sockets?

              • 4. Re: How to start JBoss EAP 6 in Dual Stack with Clustering ?

                I goes like this.

                Ealier our applicaiton used to work only with IPv4 as we had the preferIPvStack option true. When we remove it, we get the mentioned error.  The same error disappears when we bind the server to a spefic IP (with the perferv4stack option disabled).


                i.e, with -b= it fails

                with -b=192.X.X.X it works.


                Why does it matter? How do we bind to and make this work?


                //Like I said, my jboss will be binfing to a v4 ip and will have a v4 multicast, v6 sockets should be used however.

                • 5. Re: How to start JBoss EAP 6 in Dual Stack with Clustering ?

                  I've seen the same problem for Widfly as above. How does it work with


                  Any suggestions?