Re: [JDBC] trying to connect to pg from within a local network
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
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
Received on Wed Jan 16 11:03:28 2008
This archive was generated by hypermail 2.1.8
: Wed Jun 18 2008 - 23:42:58 EDT
|