Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-973

bind() could fail on Leader because it does not setReuseAddress on its ServerSocket

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 3.3.2
    • 3.4.3, 3.3.5, 3.5.0
    • server
    • None
    • Reviewed

    Description

      setReuseAddress(true) should be used below.

      Leader(QuorumPeer self,LeaderZooKeeperServer zk) throws IOException {
      this.self = self;
      try

      { ss = new ServerSocket(self.getQuorumAddress().getPort()); }

      catch (BindException e)

      { LOG.error("Couldn't bind to port " + self.getQuorumAddress().getPort(), e); throw e; }

      this.zk=zk;
      }

      Attachments

        1. ZOOKEEPER-973.patch
          1 kB
          Harsh J
        2. ZOOKEEPER-973.patch
          1 kB
          Harsh J

        Activity

          People

            qwertymaniac Harsh J
            vishalmlst Vishal Kher
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: