From owner-freebsd-bugs@freebsd.org Tue Mar 8 12:00:55 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3BFDAC7C95 for ; Tue, 8 Mar 2016 12:00:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A860E7E7 for ; Tue, 8 Mar 2016 12:00:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u28C0tBH049111 for ; Tue, 8 Mar 2016 12:00:55 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 207804] nscd negtive cache do not timeout for getaddrinfo:Non -recoverable failure in name resolution Date: Tue, 08 Mar 2016 12:00:55 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 10.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: amutu@amutu.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2016 12:00:56 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207804 Bug ID: 207804 Summary: nscd negtive cache do not timeout for getaddrinfo:Non -recoverable failure in name resolution Product: Base System Version: 10.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: amutu@amutu.com I met this bug several times for the last years=EF=BC=8Ctoday I can reprodu= ce it on a machine.I can always restart nscd or use nscd -i hosts to clear the nscd cache=EF=BC=8Cbut I think it is better to fix this bug. config: cat /etc/nsswitch.conf=20 group: compat group_compat: nis hosts: cache files dns networks: files passwd: compat passwd_compat: nis shells: files services: compat services_compat: nis protocols: files rpc: files cat /etc/nscd.conf threads 1 enable-cache passwd yes enable-cache group yes enable-cache hosts yes enable-cache services yes enable-cache protocols yes enable-cache rpc yes enable-cache networks yes positive-time-to-live hosts 30 negative-time-to-live hosts 1 on the first console : >pkg install bash postgresql95-client >bash >while true; do psql -p 80 -h www.google.com; sleep 50; done you will see psql: received invalid response to SSL... on the second console: edit the /etc/resolv.conf,comment all the nameserver using "#' now on the first console,you will see: psql: could not translate host name "www.google.com" to address: hostname n= or servname provided,or not known psql: could not translate host name "www.google.com" to address: Non -recoverable failure in name resolution ...............repeate the last message......... you can ping www.google.com,but psql can not resolve the error.I read the p= sql code,and find it use getaddrinfo to resolve the addr. now even if you un-comment the servername in /etc/resolv.conf ,the "Non -recoverable failure in name resolution" still there,unless you restart nsc= d,or nscd -i hosts for that user. uname -a FreeBSD xx 10.1-RELEASE-p26 FreeBSD 10.1-RELEASE-p26 #0: Wed Jan 13 20:59:29 UTC 2016 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERI= C=20 amd64 --=20 You are receiving this mail because: You are the assignee for the bug.=