pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedjdbc interface problems with jdk1.2
3+ messages / 3 participants
[nested] [flat]
* jdbc interface problems with jdk1.2
@ 1999-07-20 06:18 Doug Thistlethwaite <doug.t@deltanet.com>
0 siblings, 1 reply; 3+ messages in thread
From: Doug Thistlethwaite @ 1999-07-20 06:18 UTC (permalink / raw)
To: pgsql-interfaces
Hello,
I have been trying to get a win95 system to connect to a postgresql
database on a linux system.
The linux system is a debian "potato" system with a 2.2.10 kernel. The
version of postgresql is 6.5
I have installed posgresql, created a database "doug", created a user
"doug" and given the user a password.
The password file was created using the command pg_passwd
/var/postgresql/passwd
In the postmaster.init file I added
PGALLOWTCPIP=yes
and in the file pb_hba.conf I added the following line to the end of the
file
host doug IP.ADDRESS.OF PC 255.255.255.0 password
/var/postgres/passwd
When I try to run the example.basic example from the PC, I get the
following error message:
jC:\jdk1.2\DSNBrowse>java example.basic
jdbc:postgresql://dragon:5432/doug d
oug db
PostgreSQL basic test v6.3 rev 1
Starting constructor for basic
continueing constructor for basic
Connecting to Database URL = jdbc:postgresql://dragon:5432/doug
Exception caught.
Something unusual has occured to cause the driver to fail. Please report
this exception: java.sql.SQLException: Password authentication failed
for user 'doug'
Something unusual has occured to cause the driver to fail. Please report
this exception: java.sql.SQLException: Password authentication failed
for user 'doug'
at postgresql.Driver.connect(Driver.java:112)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at example.basic.<init>(basic.java:34)
at example.basic.main(basic.java:168)
Does anybody have an idea of what I can try to get this working?
Thanks,
Doug
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [INTERFACES] jdbc interface problems with jdk1.2
@ 1999-07-20 14:18 Tom Lane <tgl@sss.pgh.pa.us>
parent: Doug Thistlethwaite <doug.t@deltanet.com>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 1999-07-20 14:18 UTC (permalink / raw)
To: Doug Thistlethwaite <doug.t@deltanet.com>; +Cc: pgsql-interfaces
Doug Thistlethwaite <doug.t@deltanet.com> writes:
> Password authentication failed for user 'doug'
>
> Does anybody have an idea of what I can try to get this working?
This tells you you are getting pretty far: you are making a TCP
connection, and the postmaster is recognizing that the entry for
your IP address in pg_hba demands password authentication. So,
either you are supplying the wrong password from the client end,
or something's wrong with the password file.
There might be more info in the postmaster log file than is reported
to the client --- did you look there?
One potential typo stands out in your message:
> The password file was created using the command pg_passwd
> /var/postgresql/passwd
^^^^^^^^^^
> host doug IP.ADDRESS.OF PC 255.255.255.0 password
> /var/postgres/passwd
^^^^^^^^
Prolly that's just a transcription error in your message, but if
it's real...
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [INTERFACES] jdbc interface problems with jdk1.2
@ 1999-07-20 22:24 Doug Thistlethwaite <doug@dupreeinc.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Doug Thistlethwaite @ 1999-07-20 22:24 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-interfaces
Yes, that was a typo on my part. I also found out that the MASK should
be 255.255.255.255 if I want only the single system to access my
database... But that did not fix the problem either.
Any more suggestions would be appriciated!
Doug
Tom Lane wrote:
> Doug Thistlethwaite <doug.t@deltanet.com> writes:
> > Password authentication failed for user 'doug'
> >
> > Does anybody have an idea of what I can try to get this working?
>
> This tells you you are getting pretty far: you are making a TCP
> connection, and the postmaster is recognizing that the entry for
> your IP address in pg_hba demands password authentication. So,
> either you are supplying the wrong password from the client end,
> or something's wrong with the password file.
>
> There might be more info in the postmaster log file than is reported
> to the client --- did you look there?
>
> One potential typo stands out in your message:
>
> > The password file was created using the command pg_passwd
> > /var/postgresql/passwd
> ^^^^^^^^^^
> > host doug IP.ADDRESS.OF PC 255.255.255.0 password
> > /var/postgres/passwd
> ^^^^^^^^
>
> Prolly that's just a transcription error in your message, but if
> it's real...
>
> regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~1999-07-20 22:24 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-07-20 06:18 jdbc interface problems with jdk1.2 Doug Thistlethwaite <doug.t@deltanet.com>
1999-07-20 14:18 ` Tom Lane <tgl@sss.pgh.pa.us>
1999-07-20 22:24 ` Doug Thistlethwaite <doug@dupreeinc.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox