From user-return-12567-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Wed Jan 22 17:53:19 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 02BC318064C for ; Wed, 22 Jan 2020 18:53:18 +0100 (CET) Received: (qmail 90230 invoked by uid 500); 22 Jan 2020 17:53:17 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 90218 invoked by uid 99); 22 Jan 2020 17:53:17 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jan 2020 17:53:17 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 703BDC065F for ; Wed, 22 Jan 2020 17:53:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-he-de.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 8Mwj02tq-3LE for ; Wed, 22 Jan 2020 17:53:14 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::730; helo=mail-qk1-x730.google.com; envelope-from=rammohanganap@gmail.com; receiver= Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTPS id 1881C7E145 for ; Wed, 22 Jan 2020 17:53:14 +0000 (UTC) Received: by mail-qk1-x730.google.com with SMTP id v195so536184qkb.11 for ; Wed, 22 Jan 2020 09:53:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=dBXbwIepnZbjFTF/WHHSJpVSMED+49DeMbn0yHiB2i8=; b=qb/2760mJc28idGO/7r4k+cG7z9U8hfydmUZId+XiUJ1efXn9+nRjNKIfqKy0CSHC0 cKvWPxqMYCLaN1pObJNzTv8yRMtj6vG6OueTP2hcGTX1vHjBiD7IC+zXjguNQRzEwRyt CxJnUufiGxD3ges3Cpi8hAGlfZhQv6xrUNbEZCVVTWLLSOd6LmGNpVxaHVjZKlLxFms1 nSBK5ApFuEnFWHUSLU+tOZanDdbMdmU3x9JH+SCzJrtWCamlI+gzDf8erBHowcqmoEwO erF716k/iqoUDIGnyZfWvRkmOD8XTV9fV0o5RiBQgkE/jVMIKWWmQRC6VW4i+HOPV/59 +kMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=dBXbwIepnZbjFTF/WHHSJpVSMED+49DeMbn0yHiB2i8=; b=csR5Gu27eeg542G7u17PICxN1PKySs5ot48eELXV07Y//nxTQVtMMr+pqNCY3LGe1k xX1FmWC5p+4q+DI+uKRaHYwmkN6Z9OnYfHlR4w/lBZr9un3lW7mDpxugTNGODP+qtNpC HfSySwFDGLxtnGlxzxwNrVZbrg3wa6TXS+7e8WJ/h3ZJ/M4VwdOC7NM1KsbVO4KnIM0v b6YUUTcsFVAwCoX1aGdqccmul17SbyUBqUNTVAKdDF/hAo1xv0t3usSL0tqV0QvOEyrp A1ni09sC3I9x8kZ2OI3WcrYaO+8nJdmyTZ9BqPWUAnSjttH55YVFMdwCVNI5mMOkOTVp ckLQ== X-Gm-Message-State: APjAAAUrN0a7gfcyn6zrrzZnIlLfYg1XODaM1Yq8g0YILUaSZH4aIoUD DY9tbY8rzfPtG1doZnjYhgKX3Ggy6dKCcy3yVqDmjQUejhk= X-Google-Smtp-Source: APXvYqxlokjasnCkSUTmhyOfx4QXTRj7OsoF6qwzapGLia/WKFjKUnrg2Lk0Vx/kaaxMrGdSXIKgI4fPSfOFusgYEs8= X-Received: by 2002:a37:6684:: with SMTP id a126mr4948972qkc.499.1579715592680; Wed, 22 Jan 2020 09:53:12 -0800 (PST) MIME-Version: 1.0 References: <0839EC0C-7087-41E6-A0EC-2A3966A65FBD@apache.org> In-Reply-To: <0839EC0C-7087-41E6-A0EC-2A3966A65FBD@apache.org> From: rammohan ganapavarapu Date: Wed, 22 Jan 2020 09:52:36 -0800 Message-ID: Subject: Re: Zookeeper resolving to old host IP addresses To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary="000000000000bf79eb059cbe325a" --000000000000bf79eb059cbe325a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Andor, Thank you, i will look into dynamic reconfig option. Ram On Wed, Jan 22, 2020 at 2:03 AM Andor Molnar wrote: > Hi Ram, > > As far as I can see from the code, ZooKeeper uses the standard Java calls > getByName() and getAllByName() every time it=E2=80=99s trying to connect = to a > server. > > =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94 > // zookeeper.ipReachableTimeout is not defined > if (ipReachableTimeout <=3D 0) { > address =3D InetAddress.getByName(this.hostname); > } else { > address =3D getReachableAddress(this.hostname, ipReachableTimeout); > } > =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94 > > ZK doesn=E2=80=99t (and definitely should not) cache IP addresses. It=E2= =80=99s either the > cache of JVM or your DNS server. > > Dynamic reconfig is available in 3.5.x versions which are already stable > now and I think with that you don=E2=80=99t need to reuse existing hostna= mes. > Instead use reconfig commands to properly remove old nodes and add new > ones. Sounds like more cumbersome, but maybe more reliable. > > Andor > > > > > > On 2020. Jan 21., at 23:14, rammohan ganapavarapu < > rammohanganap@gmail.com> wrote: > > > > But still happening for me, is there any config on zookeeper side to ma= ke > > this fix to work? > > > > Ram > > > > On Tue, Jan 21, 2020 at 2:12 PM Michael Han wrote: > > > >> Could be ZOOKEEPER-1506, though this should be fixed already in 3.4.14= . > >> > >> On Tue, Jan 21, 2020 at 2:01 PM rammohan ganapavarapu < > >> rammohanganap@gmail.com> wrote: > >> > >>> Hi Enrico, > >>> > >>> I see same with both 3.4.5 and 3.4.14 > >>> > >>> Ram > >>> > >>> On Tue, Jan 21, 2020 at 1:53 PM Enrico Olivelli > >>> wrote: > >>> > >>>> Hi, > >>>> Which version of ZK are you using? > >>>> Enrico > >>>> > >>>> > >>>> Il mar 21 gen 2020, 22:51 rammohan ganapavarapu < > >> rammohanganap@gmail.com > >>>> > >>>> ha scritto: > >>>> > >>>>> Hi, > >>>>> > >>>>> Does zookeeper cache the host IP? if so how long does it cache? I > >> have > >>> a > >>>>> zk cluster in autoscaling groups and when a new node comes up, othe= r > >>>> nodes > >>>>> still resolving to old IP. Is there any setting to invalidate dns > >> cache > >>>> for > >>>>> zookeeper? or is it jvm dns cache? until other nodes resolves to ne= w > >>> IP, > >>>>> this node not able to join the cluster. > >>>>> > >>>>> Thanks, > >>>>> Ram > >>>>> > >>>> > >>> > >> > > --000000000000bf79eb059cbe325a--