Re: trying to connect to pg from within a local network
От | Albe Laurenz |
---|---|
Тема | Re: trying to connect to pg from within a local network |
Дата | |
Msg-id | D960CB61B694CF459DCFB4B0128514C2CC22D3@exadv11.host.magwien.gv.at обсуждение исходный текст |
Ответ на | trying to connect to pg from within a local network ("Albretch Mueller" <lbrtchx@gmail.com>) |
Ответы |
Re: trying to connect to pg from within a local network
|
Список | pgsql-jdbc |
Albretch Mueller wrote: > I need to connect to a pg Windows installation that I have within the > same network > ~ > as listen_address I have listed: localhost, 127.0.0.1, > 10.0.31.5, 10.0.31.62 > ~ > 10.0.31.5 is this "localhost" in the 10.0.31.* local network and > 10.0.31.62 is me > ~ > I have check all I can think of and it still does not work. Why can't > I connect to pg from within the local network? > ~ > Thanks > lbrtchx > ~ > C:\cmllpz\prjx\java\JDBC\PG>java PG00Test > // __ aDrvr: |org.postgresql.Driver| > // __ aDBURL: |jdbc:postgresql://10.0.31.5:5432/postgres| > // __ Class.forName(org.postgresql.Driver): |class org.postgresql.Driver| > // __ (Driver)KDrvr.newInstance() :|org.postgresql.Driver@1893efe| > // __ DriverManager.registerDriver(OKDrvr); > org.postgresql.util.PSQLException: Connection refused. Check that the > hostname and port are correct and that the postmaster is accepting > TCP/IP connections. > at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:122) You should have the following in postgresql.conf: listen_addresses = '127.0.0.1,10.0.31.5' Maybe the last entry you added is the problem. Allowing certain client IP addresses is done in pg_hba.conf. If that is NOT the problem: Try the following on the client: telnet 10.0.31.5 5432 and tell us the response. Try the following on the server: netstat -a and tell us what you get. Is there a firewall involved? Yours, Laurenz Albe
В списке pgsql-jdbc по дате отправления: