Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-848

Multiple listeners can be opened on a single port

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.8.0
    • 2.8.0
    • LiteCore
    • Security Level: Public
    • None

    Description

      Now, multiple listeners can be opened on a single port.

      Steps
      1. Create listener 1 with localhost:4984 and start
      2. Create listener 2 with localhost:4984 and start

      We can see, both listeners are started without throwing an error.

      Expected behaviour
      throw an error saying, port is already being used by another process

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          jimb Jim Borden added a comment -

          Reading about SO_REUSEPORT again, I don't think there is a way to prevent this at the socket level without disabling this socket option.  However if this socket option is disabled then there is an arbitrarily long period of time (60 seconds or so) after a socket is torn down on certain OSes that a new listener cannot be started.  This creates havoc for automated testing that repeatedly starts up and shuts down listeners.  Jens Alfke do you have information to the contrary?

          jimb Jim Borden added a comment - Reading about  SO_REUSEPORT again, I don't think there is a way to prevent this at the socket level without disabling this socket option.  However if this socket option is disabled then there is an arbitrarily long period of time (60 seconds or so) after a socket is torn down on certain OSes that a new listener cannot be started.  This creates havoc for automated testing that repeatedly starts up and shuts down listeners.  Jens Alfke do you have information to the contrary?
          jimb Jim Borden added a comment -

          Actually I take it back.  With CBL-831 we should be able to randomly choose a port each time so there is no more need to use the above socket option.

          jimb Jim Borden added a comment - Actually I take it back.  With CBL-831 we should be able to randomly choose a port each time so there is no more need to use the above socket option.

          Build couchbase-lite-log-2.8.0-58 contains couchbase-lite-core commit 498a509 with commit message:
          CBL-848: Don't allow two listeners on the same port (#954)

          build-team Couchbase Build Team added a comment - Build couchbase-lite-log-2.8.0-58 contains couchbase-lite-core commit 498a509 with commit message: CBL-848 : Don't allow two listeners on the same port (#954)

          Build couchbase-lite-cblite-2.8.0-25 contains couchbase-lite-core commit 498a509 with commit message:
          CBL-848: Don't allow two listeners on the same port (#954)

          build-team Couchbase Build Team added a comment - Build couchbase-lite-cblite-2.8.0-25 contains couchbase-lite-core commit 498a509 with commit message: CBL-848 : Don't allow two listeners on the same port (#954)

          Build couchbase-lite-core-2.8.0-99 contains couchbase-lite-core commit 498a509 with commit message:
          CBL-848: Don't allow two listeners on the same port (#954)

          build-team Couchbase Build Team added a comment - Build couchbase-lite-core-2.8.0-99 contains couchbase-lite-core commit 498a509 with commit message: CBL-848 : Don't allow two listeners on the same port (#954)

          Build couchbase-lite-java-2.8.0-144 contains couchbase-lite-core commit 498a509 with commit message:
          CBL-848: Don't allow two listeners on the same port (#954)

          build-team Couchbase Build Team added a comment - Build couchbase-lite-java-2.8.0-144 contains couchbase-lite-core commit 498a509 with commit message: CBL-848 : Don't allow two listeners on the same port (#954)

          Build couchbase-lite-android-2.8.0-163 contains couchbase-lite-core commit 498a509 with commit message:
          CBL-848: Don't allow two listeners on the same port (#954)

          build-team Couchbase Build Team added a comment - Build couchbase-lite-android-2.8.0-163 contains couchbase-lite-core commit 498a509 with commit message: CBL-848 : Don't allow two listeners on the same port (#954)

          Build couchbase-lite-ios-2.8.0-47 contains couchbase-lite-core commit 498a509 with commit message:
          CBL-848: Don't allow two listeners on the same port (#954)

          build-team Couchbase Build Team added a comment - Build couchbase-lite-ios-2.8.0-47 contains couchbase-lite-core commit 498a509 with commit message: CBL-848 : Don't allow two listeners on the same port (#954)

          Build couchbase-lite-net-2.8.0-36 contains couchbase-lite-core commit 498a509 with commit message:
          CBL-848: Don't allow two listeners on the same port (#954)

          build-team Couchbase Build Team added a comment - Build couchbase-lite-net-2.8.0-36 contains couchbase-lite-core commit 498a509 with commit message: CBL-848 : Don't allow two listeners on the same port (#954)

          People

            jimb Jim Borden
            Jayahari.Vavachan Jay Vavachan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty