11 Replies Latest reply on May 11, 2005 4:39 AM by n2

    error on jboss start: b ad argument for IP_MULTICAST_IF: add

    pedrosalazar

      Greetings,

      I recently installed jboss (3.2.5) on my laptop and I got this error on start (cluster mode). I'm running jboss on linux box and I have the ip multicast active:

      Kernel IP routing table
      Destination Gateway Genmask Flags MSS Window irtt Iface
      172.16.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
      224.0.0.0 0.0.0.0 240.0.0.0 U 0 0 0 eth0
      0.0.0.0 172.16.1.1 0.0.0.0 UG 0 0 0 eth0


      Is there any jboss/os configuration mistake or missing on my laptop? If needed I can post here also aditional configuration files like cluster-service.xml and/or others.

      The error is on the trace below:
      2004-08-22 16:37:24,535 INFO [org.jboss.ha.framework.interfaces.HAPartition.lif
      ecycle.DefaultPartition] New cluster view (id: 0, delta: 0) : [172.16.1.10:1099]
      2004-08-22 16:37:24,542 INFO [DefaultPartition:ReplicantManager] Dead members:
      0
      2004-08-22 16:37:27,839 INFO [org.jboss.ha.jndi.HANamingService] Listening on /
      0.0.0.0:1100
      2004-08-22 16:37:27,849 WARN [org.jboss.ha.jndi.HANamingService] Failed to star
      t AutomaticDiscovery
      java.net.SocketException: bad argument for IP_MULTICAST_IF: address not bound to
       any interface
       at java.net.PlainDatagramSocketImpl.socketSetOption(Native Method)
       at java.net.PlainDatagramSocketImpl.setOption(PlainDatagramSocketImpl.ja
      va:295)
       at java.net.MulticastSocket.setInterface(MulticastSocket.java:440)
       at org.jboss.ha.jndi.DetachedHANamingService$AutomaticDiscovery.start(De
      tachedHANamingService.java:437)
       at org.jboss.ha.jndi.DetachedHANamingService.startService(DetachedHANami
      ngService.java:243)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:271)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:221)
       at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java(Compiled Code))
       at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java(Inlined Compi
      led Code))
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java(Inlined Compi
      led Code))
       at org.jboss.mx.server.Invocation.invoke(Invocation.java(Compiled Code))
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:837)
       at $Proxy17.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:367)
       at org.jboss.system.ServiceController.start(ServiceController.java:389)
       at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java(Compiled Code))
       at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy4.start(Unknown Source)
       at org.jboss.deployment.SARDeployer.start(SARDeployer.java:251)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:836)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:645)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
       at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java(Compiled Code))
       at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy7.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:304)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:478)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:201)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
      bstractDeploymentScanner.java:274)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:271)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:221)
       at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:62)
       at java.lang.reflect.Method.invoke(Method.java:391)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:837)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:367)
       at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:62)
       at java.lang.reflect.Method.invoke(Method.java:391)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy4.start(Unknown Source)
       at org.jboss.deployment.SARDeployer.start(SARDeployer.java:251)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:836)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:645)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:592)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:85)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:58)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:60)
       at java.lang.reflect.Method.invoke(Method.java:391)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy5.deploy(Unknown Source)
       at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:407)
       at org.jboss.system.server.ServerImpl.start(ServerImpl.java:311)
       at org.jboss.Main.boot(Main.java:145)
       at org.jboss.Main$1.run(Main.java:399)
       at java.lang.Thread.run(Thread.java:567)
      


      Regards,
      Pedro Salazar.

        • 1. Re: error on jboss start: b ad argument for IP_MULTICAST_IF:
          awclemen

          I also get this error on a Suse 9.1 enterprise linux box running jboss 4.0 with tomcat 5.0.... my routing table is the same as above (well, at least the multicast address).

          Do I need to recompile the kernel to add multicast? Which address needs to be bound the interface?... I noticed that the default was 230.0.0.4 in the code. Anybody have any ideas? I would LOVE to get clustering working.

          Thanks in advance!
          --Andy

          • 2. Re: error on jboss start: b ad argument for IP_MULTICAST_IF:
            belaban

            Odd, seems that JGroups is working, but the HA-JNDI service doesn't work (uses its own mcast socket).
            Can you try to run 2 instances of JGroups first to see whether this is a JGroups problem ?
            You'll need jgroups.jar, commons-logging.jar and concurrent.jar in your CLASSPATH.
            java org.jgroups.demos.Draw

            • 3. Re: error on jboss start: b ad argument for IP_MULTICAST_IF:

              FWIW, I get the same error when starting the all configuration on Mac OS X 10.3.8, JBoss 3.2.7. I even tried changing the HAJNDI autodiscovery mcast address to the same address used in the JGroup config (different port of course), and still get the same error. I've pretty much ignored it, since I don't necessarily need HAJNDI autodiscovery.

              • 4. Re: error on jboss start: b ad argument for IP_MULTICAST_IF:
                belaban

                Can you debug this ? Should be simple to find out.
                BTW: the JGroups code should do almost the same, so maybe you compare the 2 beasts.
                Note that you can turn multicast HA-JNDI discovery off by setting a system prop, afair jnp.multicastDiscovery=false. But hit the manual for the exact name.

                • 5. Re: error on jboss start: b ad argument for IP_MULTICAST_IF:

                  Thanks for the tip on disabling HAJNDI autodiscovery.

                  Ok, I ran my server through the debugger watching both the JGroups multicast socket creation and the DetatchedHANamingService.AutoDiscovery multicast socket creation.

                  The main difference is that in org.jgroups.protocols.UDP.createSockets(), mcast_recv_sock.setInterface(bind_addr) is passing in an real address on my machine. In DetatchedHANamingService.AutoDiscovery.start(), socket.setInterface(bindAddress) is passing 0.0.0.0. That call is throwing an exception thus logging the warning as seen above.

                  I noticed these comments in org.jgroups.protocols.UDP:

                   // changed by bela Feb 12 2003: by default multicast sockets will be bound to all network interfaces
                  
                   // CHANGED *BACK* by bela March 13 2003: binding to all interfaces did not result in a correct
                   // local_addr. As a matter of fact, comparison between e.g. 0.0.0.0:1234 (on hostA) and
                   // 0.0.0.0:1.2.3.4 (on hostB) would fail !
                  


                  If I set a valid bind address for HAJNDI in cluster-service.xml, the warning disappears!

                  • 6. Re: error on jboss start: b ad argument for IP_MULTICAST_IF:
                    belaban

                    Okay, you can either
                    - not set BindAddress in the XML file for HANamingService or
                    - use jnp.disableMulticastDiscovery.

                    BTW: using a 0.0.0.0 bind address seems to be fixed in CVS head:
                    socket = new MulticastSocket (adGroupPort);
                    if (bindAddress != null && bindAddress.isAnyLocalAddress() == false)
                    socket.setInterface(bindAddress);
                    socket.setTimeToLive(autoDiscoveryTTL);
                    group = InetAddress.getByName (adGroupAddress);
                    socket.joinGroup (group);

                    • 7. Re: error on jboss start: b ad argument for IP_MULTICAST_IF:
                      thebadpete

                      Hi folks,

                      There was an earlier post mentioning the same symtoms. Assuming that you are running JBoss on Linux, if your Linux kernel has IPv6 support, you will have this problem. If you don't need IPv6 support, you can disable it from the kernel and the problem will go away.

                      For me, I disable it by adding the following in /etc/modprobe.conf:

                      alias net-pf-10 off

                      and reboot the Linux box. Don't ask me why, I just follow some websites. Works for me. Hope this helps!

                      Pete

                      • 8. Re: error on jboss start: b ad argument for IP_MULTICAST_IF:
                        awclemen

                        Thanks thebadpete, it worked! the error disappeared...... yea!

                        • 9. Re: error on jboss start: b ad argument for IP_MULTICAST_IF:
                          belaban

                          I have updated the wiki, thanks: http://www.jboss.org/wiki/Wiki.jsp?page=IPv6

                          • 10. Re: error on jboss start: b ad argument for IP_MULTICAST_IF:
                            n2

                            This is from the wiki (http://www.jboss.org/wiki/Wiki.jsp?page=IPv6):

                            Another source of problems might be the use of IPv6, and/or misconfiguration of /etc/hosts. If you communicate between an IPv4 and an IPv6 host, and they are not able to find each other, try the java.net.preferIP4Stack=true property.

                            Change your <jboss_home>/bin/run.sh from

                            # Setup JBoss sepecific properties
                            JAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME"
                            to

                            # Setup JBoss sepecific properties
                            JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Dprogram.name=$PROGNAME"


                            JDK 1.4.1 uses IPv6 by default, although is has a dual stack, that is, it also supports IPv4.

                            I tried this with JBoss 4.0.1sp1 on SuSE 9.1 prof. and the cluster configuration is starting without errors.

                            • 11. Re: error on jboss start: b ad argument for IP_MULTICAST_IF:
                              n2

                              This is from the wiki (http://www.jboss.org/wiki/Wiki.jsp?page=IPv6):

                              Another source of problems might be the use of IPv6, and/or misconfiguration of /etc/hosts. If you communicate between an IPv4 and an IPv6 host, and they are not able to find each other, try the java.net.preferIP4Stack=true property.

                              Change your <jboss_home>/bin/run.sh from

                              # Setup JBoss sepecific properties
                              JAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME"
                              to

                              # Setup JBoss sepecific properties
                              JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Dprogram.name=$PROGNAME"


                              JDK 1.4.1 uses IPv6 by default, although is has a dual stack, that is, it also supports IPv4.

                              I tried this with JBoss 4.0.1sp1 on SuSE 9.1 prof. and the cluster configuration is starting without errors.