Uploaded image for project: 'AMQ Clients'
  1. AMQ Clients
  2. ENTMQCL-874

[dotnet] Disposing TcpTransportListener then reusing it fails with 'Address already in use' on Unix

    XMLWordPrintable

Details

    • Hide
      1. Create listener on the background for one message by cli-netlite-core-receiver:
        dotnet cli-netlite-core-receiver.dll --timeout 100 --recv-listen true --count 1 &
      2. Send one message to listener by cli-netlite-core-sender:
        dotnet cli-netlite-core-sender.dll --broker 0.0.0.0:5672 --count 1
      3. Create listener again - this fails with 'Address already in use':
        dotnet cli-netlite-core-receiver.dll --timeout 100 --recv-listen true --count 1
      Show
      Create listener on the background for one message by cli-netlite-core-receiver: dotnet cli-netlite-core-receiver.dll --timeout 100 --recv-listen true --count 1 & Send one message to listener by cli-netlite-core-sender: dotnet cli-netlite-core-sender.dll --broker 0.0.0.0:5672 --count 1 Create listener again - this fails with 'Address already in use': dotnet cli-netlite-core-receiver.dll --timeout 100 --recv-listen true --count 1
    • September 2018

    Description

      Socket is in TIME_WAIT state after end of the first receiver and is blocked for reuse.

      Proposed fix:
      Add line this.listenSockets[i].SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, 1); before Bind call in ConnectionListener.cs.

      Attachments

        Activity

          People

            tbish@redhat.com Timothy Bish (Inactive)
            rkubis_kafka_devexp Radim Kubis
            Radim Kubis Radim Kubis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 3 hours
                3h
                Remaining:
                Remaining Estimate - 3 hours
                3h
                Logged:
                Time Spent - Not Specified
                Not Specified