Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1_dev
    • Fix Version/s: 3.1.1_dev, 4.0_dev
    • Labels:
      None
    • Environment:

      Description

      To recreate the problem, create a cluster on an IPv6-only system with a single instance on another node. The cluster has to be created with the multicast address set as follows:

      asadmin create-cluster --multicastaddress ff02::1 c1

      Then restart the domain. The log will contain the following exception message:

      [#|2011-02-24T22:43:19.510+0100|SEVERE|glassfish3.2|javax.org.glassfish.gms.org.glassfish.gms|_ThreadID=1;_ThreadName=Thread-1;|GMSAD1017: GMS failed to start. See stack trace for additional information.
      com.sun.enterprise.ee.cms.core.GMSException: failed to join group c1
      at com.sun.enterprise.ee.cms.impl.base.GMSContextImpl.join(GMSContextImpl.java:182)
      at com.sun.enterprise.ee.cms.impl.common.GroupManagementServiceImpl.join(GroupManagementServiceImpl.java:381)
      at org.glassfish.gms.GMSAdapterImpl.initializeGMS(GMSAdapterImpl.java:573)
      at org.glassfish.gms.GMSAdapterImpl.initialize(GMSAdapterImpl.java:199)
      at org.glassfish.gms.bootstrap.GMSAdapterService.loadModule(GMSAdapterService.java:218)
      at org.glassfish.gms.bootstrap.GMSAdapterService.checkCluster(GMSAdapterService.java:192)
      at org.glassfish.gms.bootstrap.GMSAdapterService.checkAllClusters(GMSAdapterService.java:180)
      at org.glassfish.gms.bootstrap.GMSAdapterService.postConstruct(GMSAdapterService.java:132)
      at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
      at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
      at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
      at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
      at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
      at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:76)
      at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:243)
      at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:135)
      at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
      at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
      at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
      Caused by: com.sun.enterprise.ee.cms.core.GMSException: initialization failure
      at com.sun.enterprise.mgmt.ClusterManager.<init>(ClusterManager.java:142)
      at com.sun.enterprise.ee.cms.impl.base.GroupCommunicationProviderImpl.initializeGroupCommunicationProvider(GroupCommunicationProviderImpl.java:164)
      at com.sun.enterprise.ee.cms.impl.base.GMSContextImpl.join(GMSContextImpl.java:176)
      ... 23 more
      Caused by: java.net.SocketException: Cannot assign requested address
      at java.net.PlainDatagramSocketImpl.socketSetOption(Native Method)
      at java.net.PlainDatagramSocketImpl.setOption(PlainDatagramSocketImpl.java:299)
      at java.net.MulticastSocket.setNetworkInterface(MulticastSocket.java:506)
      at com.sun.enterprise.mgmt.transport.BlockingIOMulticastSender.start(BlockingIOMulticastSender.java:165)
      at com.sun.enterprise.mgmt.transport.grizzly.GrizzlyNetworkManager.start(GrizzlyNetworkManager.java:434)
      at com.sun.enterprise.mgmt.ClusterManager.<init>(ClusterManager.java:140)
      ... 25 more

      #]

      The exception message persists even if the bind address is set to variables different values: the IPv6 site scope address, the IPv6 link scope address.

      A shoal-gms-impl.jar file that fixes the problem, with the diffs is attached. Just put this JAR file into the glassfish/modules directory and GMS works fine on an IPv6-only system.

      It is still unknown as to whether the existence of the eth0 that is disabled or the sit0 interfaces have anything to do with this problem, or whether there is some other IPv6 configuration change that could be made to workaround this problem. The problem does not show up on a dual stack system that uses both IPv4 and IPv6.

      There are several Java problems related to multicast sockets and IPv6 reported in the past. The one that seems most relevant to this issue is:

      http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6262075

      The enclosed patch works around the issue by calling MulticastSocket.setInterface() instead of
      setNetworkInteface and we are explicitly checking if network interface is considered UP before using it.

      1. shoal.dif
        4 kB
        Tom Mueller

        Activity

        Hide
        Joe Fialli added a comment -

        Checked fix into shoal trunk.

        Still needs to be integrated into glassfish 3.1.

        Show
        Joe Fialli added a comment - Checked fix into shoal trunk. Still needs to be integrated into glassfish 3.1.
        Hide
        Bobby Bissett added a comment -

        This was integrated into GF in revision 45770 (before 3.1.1 branch created).

        Show
        Bobby Bissett added a comment - This was integrated into GF in revision 45770 (before 3.1.1 branch created).

          People

          • Assignee:
            Joe Fialli
            Reporter:
            Tom Mueller
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: