Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-1864

UDP unable to bind to ephemeral port: port out of range:65536

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Done
    • 3.4.4
    • 3.4.5, 3.5
    • None

    Description

      It looks like UDP.createEphemeralDatagramSocket() swallows any errors it gets while creating the socket, and throws this exception after trying to bind to all ports in the 0 - 65535 range:

      java.lang.IllegalArgumentException: port out of range:65536
          at java.net.InetSocketAddress.checkPort(InetSocketAddress.java:143)
          at java.net.InetSocketAddress.<init>(InetSocketAddress.java:185)
          at java.net.DatagramSocket.<init>(DatagramSocket.java:284)
          at org.jgroups.util.DefaultSocketFactory.createDatagramSocket(DefaultSocketFactory.java:62)
          at org.jgroups.protocols.UDP.createEphemeralDatagramSocket(UDP.java:429)
          at org.jgroups.protocols.UDP.createSockets(UDP.java:311)
          at org.jgroups.protocols.UDP.start(UDP.java:216)
          at org.jgroups.stack.ProtocolStack.startStack(ProtocolStack.java:966)
          at org.jgroups.JChannel.startStack(JChannel.java:889)
          at org.jgroups.JChannel._preConnect(JChannel.java:547)
          at org.jgroups.JChannel.connect(JChannel.java:282)
          at org.jgroups.JChannel.connect(JChannel.java:273)
          at org.infinispan.remoting.transport.jgroups.JGroupsTransport.startJGroupsChannelIfNeeded(JGroupsTransport.java:200)
      

      Attachments

        Activity

          People

            rhn-engineering-bban Bela Ban
            dberinde@redhat.com Dan Berindei
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: