Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: [JDBC] trying to connect to pg from within a local network

From: Albretch Mueller <lbrtchx(at)gmail.com>
Date: Wed Jan 16 2008 - 12:58:58 EST


> You should have the following in postgresql.conf: listen_addresses = '127.0.0.1,10.0.31.5'
~

 I did change it
~

> Allowing certain client IP addresses is done in pg_hba.conf.
~

 OK, I did too, this is how my /data/pg_hba.conf looks like:
~

# TYPE DATABASE USER CIDR-ADDRESS METHOD # IPv4 local connections:
host all all 127.0.0.1/32,10.0.31.62 md5 # IPv6 local connections:
#host all all ::1/128 md5
~

> Try the following on the client: telnet 10.0.31.5 5432
~

C:\>telnet 10.0.31.5 5432
Connecting To 10.0.31.5...Could not open connection to the host, on port 5432: Connect failed

C:\>ping 10.0.31.5

Pinging 10.0.31.5 with 32 bytes of data:

Reply from 10.0.31.5: bytes=32 time<1ms TTL=128
Reply from 10.0.31.5: bytes=32 time<1ms TTL=128
Reply from 10.0.31.5: bytes=32 time<1ms TTL=128
Reply from 10.0.31.5: bytes=32 time<1ms TTL=128

Ping statistics for 10.0.31.5:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:

    Minimum = 0ms, Maximum = 0ms, Average = 0ms

~

> Try the following on the server: netstat -a
~

 on the server:
~

C:\Documents and Settings\Administrator>netstat -a

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    BNG-04:epmap       BNG-04.exchange.goodwillny.org:0  LISTENING
  TCP    BNG-04:microsoft-ds  BNG-04.exchange.goodwillny.org:0  LISTENING
  TCP    BNG-04:1043        BNG-04.exchange.goodwillny.org:0  LISTENING
  TCP    BNG-04:3389        BNG-04.exchange.goodwillny.org:0  LISTENING
  TCP    BNG-04:4899        BNG-04.exchange.goodwillny.org:0  LISTENING
  TCP    BNG-04:netbios-ssn  BNG-04.exchange.goodwillny.org:0  LISTENING
  TCP    BNG-04:1059        10.0.31.5:microsoft-ds  ESTABLISHED
  TCP    BNG-04:1048        BNG-04.exchange.goodwillny.org:0  LISTENING
  TCP    BNG-04:1093        localhost:5432         ESTABLISHED
  TCP    BNG-04:5432        BNG-04.exchange.goodwillny.org:0  LISTENING
  TCP    BNG-04:5432        localhost:1093         ESTABLISHED
  UDP    BNG-04:microsoft-ds  *:*
  UDP    BNG-04:isakmp      *:*
  UDP    BNG-04:1025        *:*
  UDP    BNG-04:1026        *:*
  UDP    BNG-04:1058        *:*
  UDP    BNG-04:2967        *:*
  UDP    BNG-04:4500        *:*
  UDP    BNG-04:ntp         *:*
  UDP    BNG-04:netbios-ns  *:*
  UDP    BNG-04:netbios-dgm  *:*
  UDP    BNG-04:1900        *:*
  UDP    BNG-04:ntp         *:*
  UDP    BNG-04:1028        *:*
  UDP    BNG-04:1041        *:*
  UDP    BNG-04:1900        *:*

~

> Is there a firewall involved?
~

 Not from my box, which is a client to pg
~

//__ "netstat -a" on my client box
C:\>netstat -a
Do you need help?X

Active Connections

  Proto Local Address Foreign Address State

  TCP    BNG-2008:microsoft-ds  BNG-2008.exchange.goodwillny.org:0  LISTENING
  TCP    BNG-2008:netbios-ssn  BNG-2008.exchange.goodwillny.org:0  LISTENING
  TCP    BNG-2008:1144      gwdcbke1.exchange.goodwillny.org:1025  ESTABLISHED
  TCP    BNG-2008:1152      10.0.31.5:netbios-ssn  ESTABLISHED
Do you need more help?X
TCP BNG-2008:1262 mailserver.exchange.goodwillny.org:2128 ESTABLISHED TCP BNG-2008:1341 exchange-i.exchange.goodwillny.org:9090 CLOSE_WAIT TCP BNG-2008:1342 exchange-i.exchange.goodwillny.org:9090 CLOSE_WAIT TCP BNG-2008:1396 exchange-i.exchange.goodwillny.org:9090 ESTABLISHED TCP BNG-2008:1408 exchange-i.exchange.goodwillny.org:9090 ESTABLISHED TCP BNG-2008:1044 BNG-2008.exchange.goodwillny.org:0 LISTENING TCP BNG-2008:1153 localhost:1154 ESTABLISHED TCP BNG-2008:1154 localhost:1153 ESTABLISHED TCP BNG-2008:1155 localhost:1156 ESTABLISHED TCP BNG-2008:1156 localhost:1155 ESTABLISHED TCP BNG-2008:5432 BNG-2008.exchange.goodwillny.org:0 LISTENING UDP BNG-2008:microsoft-ds *:* UDP BNG-2008:isakmp *:* UDP BNG-2008:1025 *:* UDP BNG-2008:1026 *:* UDP BNG-2008:1145 *:* UDP BNG-2008:2967 *:* UDP BNG-2008:4500 *:* UDP BNG-2008:ntp *:* UDP BNG-2008:netbios-ns *:* UDP BNG-2008:netbios-dgm *:* UDP BNG-2008:1900 *:* UDP BNG-2008:ntp *:* UDP BNG-2008:1029 *:* UDP BNG-2008:1031 *:* UDP BNG-2008:1042 *:* UDP BNG-2008:1058 *:* UDP BNG-2008:1900 *:* ---------------------------(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 13:00:58 2008

This archive was generated by hypermail 2.1.8 : Wed Jun 18 2008 - 23:42:58 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library