9.3-1101-jdbc41 potential issue resolving DNS names to host names

Поиск
Список
Период
Сортировка
От Scott Mitchell
Тема 9.3-1101-jdbc41 potential issue resolving DNS names to host names
Дата
Msg-id 534DB8DA.6060705@akamai.com
обсуждение исходный текст
Ответы Re: 9.3-1101-jdbc41 potential issue resolving DNS names to host names  (Scott Mitchell <smitchel@akamai.com>)
Список pgsql-jdbc
I have tried a few scenarios which I will list below but it seems as
though there may be an issue with how host names are resolved to IPs.
This seems like it would be a widely used feature and so I'm not ruling
out a configuration or other issue on my end.

I am attempting to establish connections from IP address X to IP address Y.
There is a HOSTNAME which has an A record pointing to IP address Y.
SSL is involved but should not be relevant because I can get a working
and non-working scenario while SSL configuration remains unchanged.

Good: The following connection string works as expected (from IP address X):
jdbc:postgresql://<IP address Y>/<Database>

Bad: The following connection string does not work (from IP address X):
jdbc:postgresql://<HOSTNAME>/<Database>

The only difference between the two scenarios is the connection string.

I have run the following commands to verify that the DNS name does
resolve to the correct IP address (and substituted the actual output for
the variables mentioned)

$ssh <IP address X>
$dig +noall +answer <HOSTNAME>
<HOSTNAME>. 120 IN A    <IP address Y>

Another scenario I tried is running the same code on IP address X and
change the connection string host to "localhost".  The local host is
able to resolve and the connection is established as expected.  This may
be a trivial lookup and may just go directly to loopback interface
without resolving DNS, but this scenario may be relevant to this issue
as it is not an IP.

Any help is appreciated.
-Scott


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: About binaryTransfer.
Следующее
От: Scott Mitchell
Дата:
Сообщение: Re: 9.3-1101-jdbc41 potential issue resolving DNS names to host names