Skip site navigation (1) Skip section navigation (2)

Re: Connect via odbc from Windows to Linux

From: Bruce Hyatt <brucejhyatt(at)yahoo(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org, John R Pierce <pierce(at)hogranch(dot)com>
Subject: Re: Connect via odbc from Windows to Linux
Date: 2008-12-02 01:08:13
Message-ID: 418288.77707.qm@web34401.mail.mud.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
--- On Mon, 12/1/08, John R Pierce <pierce(at)hogranch(dot)com> wrote:

> Bruce Hyatt wrote:
> > I am trying to set up an odbc connection from Windows
> 2000 to Postgresql running on Linux (CentOS 4.7).
> > 
> > I have the appropriate Postgresql jdbc driver on the
> windows box as well as the hosts file with the linux host.
> Postgresql.conf has listen_addresses = '*'. The port
> is the same on both ends.
> > 
> > Trying various configurations with the odbc datasource
> administrator, the most friendly response I can get from a
> test is that the connected party/host failed to respond
> ("properly after a period of time" in the case of
> the 'party').
> > 
> > I do have portsentry running on the linux host but the
> windows box is not blocked.
> > 
> > I'm afraid there must be a simple solution but I
> can't figure out what it is. Where should I look?
> >   
> 
<snip>
> In your Java app, you specify
> jdbc:postgresql://host/database  as the connection string

This is what I tried initially and it returns:
SQL Error: java.sql.SQLException: No suitable driver found for jdbc:postgresql://host/database 0 08001

This is what led me to try the postgresql odbc.

>      I'd probably run tcpdump on hte linux side,
> `tcpdump -n tcp port 5432`   then try and connect, this will
> show you if the windows/java app is attemping to connect and
> its packets are getting through...  ideally you should see a
> whole    >SYN <ACK >...   tcp connection handshake.

As you'd probably expect, tcpdump shows no activity.

<snip>...
> so... if you DO see this, the network is working and its
> some other problem.   if you don't see it, its a network
> problem. or the JDBC client isn't specifying the host
> correctly, or somehting like that.

I doubt it's a network problem because I have an application server running on the Windows box and httpd running on the Linux box and that works fine. I checked again and the linux box is in the Windows' hosts file and I tried using all 3 ways of addressing the host in the java application.

Also, the application is a modification of a simple test app that worked on the localhost.

Thanks for your help,
Bruce Hyatt


      

In response to

Responses

pgsql-jdbc by date

Next:From: Oliver JowettDate: 2008-12-02 01:14:30
Subject: Re: Connect via odbc from Windows to Linux
Previous:From: John R PierceDate: 2008-12-01 05:02:40
Subject: Re: Connect via odbc from Windows to Linux

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group