trying to connect to pg from within a local network

From: "Albretch Mueller" <lbrtchx(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: trying to connect to pg from within a local network
Date: 2008-01-16 14:22:19
Message-ID: 9ef66fac0801160622k4e325c4cl7f5357a4df67ee2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

// __ trying to connect from 10.0.31.62
~
Hi,
~
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(dot)postgresql(dot)Driver(at)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)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:18)
at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:382)
at org.postgresql.Driver.connect(Driver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at PG00.<init>(PG00Test.java:26)
at PG00Test.main(PG00Test.java:213)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:518)
at java.net.Socket.connect(Socket.java:468)
at java.net.Socket.<init>(Socket.java:365)
at java.net.Socket.<init>(Socket.java:179)
at org.postgresql.core.PGStream.<init>(PGStream.java:59)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:77)
... 11 more
// __ database connection could not be set up!

C:\cmllpz\prjx\java\JDBC\PG>ipconfig -all

Windows IP Configuration

Host Name . . . . . . . . . . . . : BGN-2008
Primary Dns Suffix . . . . . . . : exchange.thetrade.org
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : exchange.thetrade.org
thetrade.org

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Broadcom 440x 10/100
Integrated Controller
Physical Address. . . . . . . . . : 00-16-E6-45E-F5-27
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 10.0.31.62
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.0.31.1
DHCP Server . . . . . . . . . . . : 10.0.31.1
DNS Servers . . . . . . . . . . . : 10.0.1.23
10.0.1.74
Lease Obtained. . . . . . . . . . : Tuesday, January 15, 2008 9:18:55 PM
Lease Expires . . . . . . . . . . : Wednesday, January 16,
2008 9:18:55 PM

C:\cmllpz\prjx\java\JDBC\PG>

~
C:\cmllpz\prjx\java\JDBC\PG>tracert 10.0.31.5

Tracing route to 10.0.31.5 over a maximum of 30 hops

1 <1 ms <1 ms <1 ms 10.0.31.5

Trace complete.
~

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2008-01-16 15:01:58 Re: Patch for Statement.getGeneratedKeys()
Previous Message tivvpgsqljdbc 2008-01-16 09:30:22 Re: Patch for Statement.getGeneratedKeys()