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

Cannot connect to remote database.

From: Kristina Magwood <kristina(at)nanometrics(dot)ca>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Cannot connect to remote database.
Date: 2005-04-13 20:13:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc

I am trying to connect to two psql databases at once using jdbc.
The first database is v7.3 running on Windows under Cygwin, the second is 
v8.01 on Windows both on the local LAN.
The pg_hba.conf files on both machines allow any machine on the LAN to 
access the database. 
People regularly access the v7.3 database from Crystal Reports, so I know 
it's available.

When I try to run the jar from the first machine, I am able to connect to 
the local database, but not the remote database.
The same thing happens when I try from the second machine.

The error is:
Backend start-up failed: FATAL: database "xxx" does not exist.
Where xxx is the name of the database on the remote server.
In other words, my program is only looking for databases on the local 

The code I use to connect is:

DriverManager.registerDriver(new org.postgresql.Driver());
String serviceArg = jdbc:postgresql:xxx//<ipAddress>/<port>;
m_conn = DriverManager.getConnection(serviceArg, m_userName, 

Any help will be greatly appreciated.

Kristina Magwood


pgsql-jdbc by date

Next:From: Dave CramerDate: 2005-04-13 20:47:33
Subject: Re: Cannot connect to remote database.
Previous:From: Glenn HolmerDate: 2005-04-13 16:02:56
Subject: Re: smallint vs. boolean (was invalid string enlargement

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