Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r6GXZ-000Gcu-BW for pgsql-general@arkaria.postgresql.org; Thu, 23 Nov 2023 20:43:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r6GXX-004SLB-Vy for pgsql-general@arkaria.postgresql.org; Thu, 23 Nov 2023 20:43:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r6GXW-004SL3-Vc for pgsql-general@lists.postgresql.org; Thu, 23 Nov 2023 20:43:11 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r6GXT-0088OE-HX for pgsql-general@lists.postgresql.org; Thu, 23 Nov 2023 20:43:10 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 83DF45C019B; Thu, 23 Nov 2023 15:43:04 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 23 Nov 2023 15:43:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1700772184; x=1700858584; bh=6RTr1FURxd7rhEx7KnFBSWfLXinndlyZUi1 wjnXjYOc=; b=dISbrfpSHiPpXz220EC7AvYNmAdTSK1RydngUHSXVDnnPYDg29a x5QH9WWoSiandtR5mY99tOEFOU+a4nSv15gjtujGG031WlAl7/o4LeznqqxmlvCp f2jvM5nHRX00y+dhN1S6aVul02f272rdjHPywTb6rLJz4E8yGaUEQ8DFH1f0zsbC CScJdlVmGP/Ol7+MfGnj5xmUviWQNy+lOLutvQdCkAY8J8Xe3W+i9i7EiSwTfYkL nljiZ95uFYtTelykJs04OiHfUYXNGZRAJSHXaQ6PIQ0nrr+6zUQifPBSBSkHWz0V MxBNuT56LWnFXNYjeHhynACvFJ8rdNJBwcA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1700772184; x= 1700858584; bh=6RTr1FURxd7rhEx7KnFBSWfLXinndlyZUi1wjnXjYOc=; b=s mbGXg3XFyjARxEjBH085cG0zRiz2arE7mfa5uoz2ub5TIxZQf5GWXqyXOCRzw2s5 p6nZwHsxiyfAUj1S7WYEm3JVSSHcarMt/3S4zUREmkfiVFlop0xiNPdy3O010oxv FKOs4MkyZie0yWf9mKTWSpfDsa7yqPCKtSo7UfFoE+lWSvNoE/tKbSgf48EZIX+G f4X/2x4hXiXUhEmlbDpgA7xv9iHHhWKl8nCD4Itjv9ivc7hBV8XvbOn8XH6rYPpw dbz/LY7gpS/IGDb3+s+LbYzvxooVzBxUYNhv4d5xo1uZyMOW5U7Z+/0lMkVD+M/V d7EQvleIKxhOIJ+1QRTFg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehfedgudefjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepiedtueetvdeftdelffevueetjeegvddvveefjeet tdetgeetffevkefhtddvjeejnecuffhomhgrihhnpeduvdejrddtrddtrddunecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Nov 2023 15:43:03 -0500 (EST) Message-ID: Date: Thu, 23 Nov 2023 12:43:02 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: IPV6 issue Content-Language: en-US To: Atul Kumar , pgsql-general References: From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/23/23 11:18, Atul Kumar wrote: > I have postgres 12 running in centos 7 on my two machines, recently I > changed the authentication of entries of pg_hba.conf to > scram-sha-256 for localhost. > > Since then in my one machine, I have started getting the below error > when I use command "psql postgres" > > no pg_hba.conf entry for host "::1", user "postgres", database "postgres > > > I found that localhost is resolve to IPV6 by using below command: > > getent hosts localhost > > ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 I don't think this is telling you the whole story. See what is in /etc/hosts and in /etc/nsswitch.conf on each machine. > host    all           postgres 127.0.0.1/32 >                scram-sha-256 > > > I am not able to understand that my both machines are resolved to IPV6 > then why is my first machine is throwing this error ? Change this 127.0.0.1/32 to localhost and then be covered for both situations. > > > Please help. > > > > > Regards. > -- Adrian Klaver adrian.klaver@aklaver.com