Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-17236

FD_SOCK2 socket-binding always reports to be unbound

XMLWordPrintable

    • Hide

      Start WildFly using

      Show
      Start WildFly using
    • ---
    • ---

      e.g. after starting standalone-full-ha.xml, which will bind the server socket channel used by jgroups-udp-fd:

      [standalone@embedded /] /socket-binding-group=standard-sockets/socket-binding=jgroups-udp-fd:read-resource(include-runtime=true)
      {
          "outcome" => "success",
          "result" => {
              "bound" => false,
              "bound-address" => undefined,
              "bound-port" => undefined,
              "client-mappings" => undefined,
              "fixed-port" => false,
              "interface" => "private",
              "multicast-address" => undefined,
              "multicast-port" => undefined,
              "name" => "jgroups-udp-fd",
              "port" => 54200
          }
      }
      

      In general, we register JGroups sockets with the socket binding registry via a custom JGroups SocketFactory. WildFly uses custom Socket, ServerSocket, DatagramSocket, MulticastSocket implementations in order to defer socket binding registration until the socket is bound and deregistration upon close().
      Unfortunately, this mechanism does not work for NetworkChannels, since the implementations of these are specific to a SelectorProvider. However, we can register a short-lived Selector which defers registration with the socket binding registry until the first OP_CONNECT or OP_ACCEPT, at which point the channel should be bound, and thus registration can proceed. To avoid leaking socket binding registrations, we will need to track socket binding registrations for network channels separately, so that we can unregister on SocketFactory.close(SocketChannel) or close(ServerSocketChannel).

              pferraro@redhat.com Paul Ferraro
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: