Thread: Problem connecting to postmaster

Problem connecting to postmaster

From
Glenn Sullivan
Date:
Hi,

I have installed native postgresql8.0.1 on a PC running Windows XP
professional.
I am having trouble connecting to it from my application.  The application
is a combination of java and C++ which was developed on Sun Solaris (Unix).
Thus on the PC, I have installed Microsoft Interix (Service For Unix) on
the PC to run the application.  I don't know if this is the problem or not,
but I am thus trying to connect to the DB running native from an application
running from Interix.  Does anyone know if this is inherently a problem?

My java code connects to the DB using
 DriverManager.getConnection("jdbc:postgresql://gandalf:5432/mydb",
user, passwd);

I get a PSQLException with a null message when this is executed.

I start up the postmaster with -i to allow TCP/IP connections.
I set Windows Firewall to "off"

Does anyone have any experience using Interix (SFU) connecting to the DB?

Any suggestions?

Thanks,
Glenn


Re: Problem connecting to postmaster

From
"Dann Corbit"
Date:
What happens when you connect using the same user/password using PSQL?

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Glenn Sullivan
Sent: Monday, March 21, 2005 4:41 PM
To: pgsql-general
Subject: [GENERAL] Problem connecting to postmaster

Hi,

I have installed native postgresql8.0.1 on a PC running Windows XP
professional.
I am having trouble connecting to it from my application.  The
application
is a combination of java and C++ which was developed on Sun Solaris
(Unix).
Thus on the PC, I have installed Microsoft Interix (Service For Unix) on
the PC to run the application.  I don't know if this is the problem or
not,
but I am thus trying to connect to the DB running native from an
application
running from Interix.  Does anyone know if this is inherently a problem?

My java code connects to the DB using
 DriverManager.getConnection("jdbc:postgresql://gandalf:5432/mydb",
user, passwd);

I get a PSQLException with a null message when this is executed.

I start up the postmaster with -i to allow TCP/IP connections.
I set Windows Firewall to "off"

Does anyone have any experience using Interix (SFU) connecting to the
DB?

Any suggestions?

Thanks,
Glenn


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Re: Problem connecting to postmaster

From
Doug McNaught
Date:
Glenn Sullivan <glenn.sullivan@varianinc.com> writes:

> Hi,
>
> I have installed native postgresql8.0.1 on a PC running Windows XP
> professional.
> I am having trouble connecting to it from my application.  The application
> is a combination of java and C++ which was developed on Sun Solaris (Unix).
> Thus on the PC, I have installed Microsoft Interix (Service For Unix) on
> the PC to run the application.  I don't know if this is the problem or not,
> but I am thus trying to connect to the DB running native from an application
> running from Interix.  Does anyone know if this is inherently a problem?

Have you tried writing a small standalone Java application to test
connecting to the database?  That would take Interix out of the
equation.

> My java code connects to the DB using
>  DriverManager.getConnection("jdbc:postgresql://gandalf:5432/mydb",
>  user, passwd);
>
> I get a PSQLException with a null message when this is executed.
>
> I start up the postmaster with -i to allow TCP/IP connections.
> I set Windows Firewall to "off"

Does "netstat" show the Postgres server listening on 5432?  Have you
tried using "localhost" instead of "gandalf" in the JDBC URL?

-Doug