Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Jdbc > Re: trying to c...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 9 of 11 Topic 1869 of 2028
Post > Topic >>

Re: trying to connect to pg from within a local network

by lbrtchx@[EMAIL PROTECTED] ("Albretch Mueller") Jan 18, 2008 at 12:13 PM

~
 Well, I went:
~
 Start > Control Panel > Windows Firewall
~
 and it is: "off (not recommended)"
~
 Something I still am not sure about is how to:
~
 "Check that the hostname and ****t are correct and that the postmaster
is accepting TCP/IP connnections"
~
 There is nothing I can see in pg_hba.conf or postgres.conf that
relates to TCP/IP connnections and I think it is a pg thing, because
when I run tomcat on ****t 8080 on this box, I can telnet to it without
any problems
~
 Tomcat is using a pg-based JDBCRealm, that means it is connecting to
it without any problems
~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ FROM client~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
C:\>ipconfig -all

Windows IP Configuration

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

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . :
        Description . . . . . . . . . . . : Broadcom 440x 10/100
Integrated Controller
        Physical Address. . . . . . . . . : 00-16-45-0E-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. . . . . . . . . . : Friday, January 18, 2008
9:34:04 AM
        Lease Expires . . . . . . . . . . : Saturday, January 19, 2008
9:34:04 AM

C:\>telnet bkn-04 5432
Connecting To bkn-04...Could not open connection to the host, on ****t
5432: Connect failed

C:\>telnet 10.0.31.88 5432
Connecting To 10.0.31.88...Could not open connection to the host, on
****t 5432: Connect failed
~
C:\>telnet bkn-04 8080
 (connects OK)
~
C:\>telnet 10.0.31.88 8080
 (connects OK)
~
C:\cmllpz\prjx\java\JDBC\PG>java PG00Test
// __ aDrvr: |org.postgresql.Driver|
// __ aDBURL: |jdbc:postgresql://bkn-04:5432/postgres|
// __ Class.forName(org.postgresql.Driver): |class org.postgresql.Driver|
// __ (Driver)KDrvr.newInstance() :|org.postgresql.Driver@[EMAIL PROTECTED]
|
// __ DriverManager.registerDriver(OKDrvr);
org.postgresql.util.PSQLException: Connection refused. Check that the
hostname and ****t are correct and that the postmaster is accepting
TCP/IP con
        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!

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@[EMAIL PROTECTED]
 so that your
       message can get through to the mailing list cleanly
 




 11 Posts in Topic:
trying to connect to pg from within a local network
lbrtchx@[EMAIL PROTECTED]  2008-01-16 09:22:19 
Re: trying to connect to pg from within a local network
laurenz.albe@[EMAIL PROTE  2008-01-16 17:00:38 
Re: trying to connect to pg from within a local network
lbrtchx@[EMAIL PROTECTED]  2008-01-16 12:58:58 
Re: ***SPAM*** Re: trying to connect to pg from within a local n
jdevisser@[EMAIL PROTECTE  2008-01-16 13:54:12 
Re: trying to connect to pg from within a local network
jdevisser@[EMAIL PROTECTE  2008-01-16 14:06:32 
Re: trying to connect to pg from within a local network
laurenz.albe@[EMAIL PROTE  2008-01-17 16:46:26 
Re: trying to connect to pg from within a local network
lbrtchx@[EMAIL PROTECTED]  2008-01-16 13:59:16 
Re: trying to connect to pg from within a local network
mark.lewis@[EMAIL PROTECT  2008-01-17 08:06:24 
Re: trying to connect to pg from within a local network
lbrtchx@[EMAIL PROTECTED]  2008-01-18 12:13:50 
Re: trying to connect to pg from within a local network
mcbp223@[EMAIL PROTECTED]  2008-01-18 14:58:18 
Re: trying to connect to pg from within a local network
laurenz.albe@[EMAIL PROTE  2008-01-21 09:27:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 2:15:29 CDT 2008.