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

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.3.2
    • Fix Version/s: 3.4.3, 3.3.5, 3.5.0
    • Component/s: server
    • Labels:
      None
    • Hadoop Flags:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: