Re: could not translate host name

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: could not translate host name
Date: 2017-02-24 22:40:27
Message-ID: 1007adce-1b00-096c-e6a5-39e30250e252@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2/24/2017 1:37 PM, Tom Ekberg wrote:
> I'm running postgres 9.6.2 (also happened on 9.3.14) and have a cron job that runs hourly that runs a program that does mostly postgres SELECTs on a different host. Occasionally I get email (not hourly) from the cron daemon that contains a stack trace that ends with this:
>
> sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name "db3.labmed.uw.edu" to address: Name or service not known
>
> It has happened about 9 times so far this month. I have one of our network people look into this but there is no real answer. I could use the IP address but I'd rather not. This problem only happens on one host. I moved the data from db2 to db3. I was getting similar emails regarding db2 which runs the older postgres.

what OS is this? what DNS servers are configured on that OS (in most
all unix-flavored OS's, this is in /etc/resolv.conf ... on windows its
in a network properties dialog buried 9 deep).

make sure *ALL* the listed name servers can resolve this internal
hostname, by querying them each directly. do NOT mix private and
public name servers, as the name resolver will only query one for a
given query and only try another if the first server doesn't reply at
all. if the first server replies ' host not known', that's taken as
the answer.

Unix systems generally always query the first server listed in
resolv.conf, and only queries the 2nd if the first isn't running at
all. Windows, however, once it decides the first server isn't
responding will continue to use the next one that does reply.

--
john r pierce, recycling bits in santa cruz

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2017-02-24 22:48:02 Re: could not translate host name
Previous Message Steve Atkins 2017-02-24 21:50:22 Re: could not translate host name