Re: postgresql jdbc connect via hostname instead of just ip

Поиск
Список
Период
Сортировка
От Douglas McNaught
Тема Re: postgresql jdbc connect via hostname instead of just ip
Дата
Msg-id m2r78sa7v8.fsf@Douglas-McNaughts-Powerbook.local
обсуждение исходный текст
Ответ на postgresql jdbc connect via hostname instead of just ip  (Jonathan Schreiter <jonathanschreiter@yahoo.com>)
Ответы Re: postgresql jdbc connect via hostname instead of just ip  (Jonathan Schreiter <jonathanschreiter@yahoo.com>)
Список pgsql-general
Jonathan Schreiter <jonathanschreiter@yahoo.com> writes:

> The only way I can connect to the database via JDBC
> seems to be by IP address (both locally and on another
> system allowed by the pg_hba.conf file).
>
> jdbc:postgresql://theipaddressofdatabaseserver/mydatabase
>
> I'd like to be able to connect to the database this
> way using a DNS name / computer host name.  The
> specific error I recieve is on the lines of no route
> to host.

This implies that the IP address in DNS or /etc/hosts is different
from the IP address you're using in the URL.  It's almost certainly
not a Postgres misconfiguration.  What happens when you do

telnet server.host.name 5432

on the JDBC client machine?

-Doug

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

Предыдущее
От: Jonathan Schreiter
Дата:
Сообщение: postgresql jdbc connect via hostname instead of just ip
Следующее
От: vishal saberwal
Дата:
Сообщение: Selecting Large Object and TOAST