Discussion:
[Middlegen-user] Connection problems with PostgreSQL
Bob Langford
2004-07-02 17:33:13 UTC
Permalink
Hi,
I'm new to Middlegen, just trying to get the sample app to
work with JBoss and Postgres. I think I've got everything set
up right, but the 'create-tables' task fails because it can't
connect to Postgres. I get
FATAL: Password authentication failed for user "aslak"

Yet, I can connect via the psql command just fine. Also, if
I change the Postgres config (pg_hba.conf) to use "trust" instead
of "md5", it works fine from middlegen. That's not going to
be good enough, though.
I'm using the URL
jdbc:postgresql://localhost/airline
username=aslak, password=aslak
in the Middlegen database config file.

I've turned on maximum Postres server logging, and it doesn't
show what password is actually being received, although it does
say that it received one.

Has anyone gotten this to work? Or can you suggest any more debugging
steps to try?

I'm using Fedora Core 1, Postgres 7.3.4, Middlegen 2.0-VO, JBoss 3.2.4,
and Sun JVM 1.4.2_04

Thanks!

--
Bob Langford
Silicon Masters Consulting, Inc. 8207 Stone River Court, Richmond, VA 23235
phone: 804-674-1253 fax: 804-745-7803
http://www.silicon-masters.com/
Darren Hartford
2004-07-02 17:55:01 UTC
Permalink
Heya Bob,
I have exact same setup minus Postgres (mysql here). In my configuration, I keep the databaseURL with just the host and the database, then have the username and password be seperate properties in the Ant task (assuming you are using Ant or Maven build scripts).

<middlegen
databaseurl="postgresql://localhost/airline"
username="aslak"
password="aslak"
...

I doubt it would be that simple, but you never know. If it's a new Postgres install, maybe make sure the TCPIP Socket property is set to true?

-D


-----Original Message-----
From: Bob Langford [mailto:***@silicon-masters.com]
Sent: Friday, July 02, 2004 3:32 PM
To: middlegen-***@lists.sourceforge.net
Subject: [Middlegen-user] Connection problems with PostgreSQL


Hi,
I'm new to Middlegen, just trying to get the sample app to
work with JBoss and Postgres. I think I've got everything set
up right, but the 'create-tables' task fails because it can't
connect to Postgres. I get
FATAL: Password authentication failed for user "aslak"

Yet, I can connect via the psql command just fine. Also, if
I change the Postgres config (pg_hba.conf) to use "trust" instead
of "md5", it works fine from middlegen. That's not going to
be good enough, though.
I'm using the URL
jdbc:postgresql://localhost/airline
username=aslak, password=aslak
in the Middlegen database config file.

I've turned on maximum Postres server logging, and it doesn't
show what password is actually being received, although it does
say that it received one.

Has anyone gotten this to work? Or can you suggest any more debugging
steps to try?

I'm using Fedora Core 1, Postgres 7.3.4, Middlegen 2.0-VO, JBoss 3.2.4,
and Sun JVM 1.4.2_04

Thanks!

--
Bob Langford
Silicon Masters Consulting, Inc. 8207 Stone River Court, Richmond, VA 23235
phone: 804-674-1253 fax: 804-745-7803
http://www.silicon-masters.com/




-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
Bob Langford
2004-07-03 11:53:05 UTC
Permalink
Thanks for the input.

Right now, I'm using the Ant build script that is part of the Sample
application, and it does
the connection the way you recommend. Actually, I don't know any other
way to do it.
And I am starting Postgresql with the TCP/IP option; I can connect from
my other machine using
psql without any trouble.
Post by Darren Hartford
Heya Bob,
I have exact same setup minus Postgres (mysql here). In my configuration, I keep the databaseURL with just the host and the database, then have the username and password be seperate properties in the Ant task (assuming you are using Ant or Maven build scripts).
<middlegen
databaseurl="postgresql://localhost/airline"
username="aslak"
password="aslak"
...
I doubt it would be that simple, but you never know. If it's a new Postgres install, maybe make sure the TCPIP Socket property is set to true?
-D
--
Bob Langford
Silicon Masters Consulting, Inc. 8207 Stone River Court, Richmond, VA 23235
phone: 804-674-1253 fax: 804-745-7803 http://www.silicon-masters.com/
Bob Langford
2004-07-05 06:49:19 UTC
Permalink
Hi,
I'm new to Middlegen, just trying to get the sample app to
work with JBoss and Postgres. I think I've got everything set
up right, but the 'create-tables' task fails because it can't
connect to Postgres. I get
FATAL: Password authentication failed for user "aslak"

Yet, I can connect via the psql command just fine. Also, if
I change the Postgres config (pg_hba.conf) to use "trust" instead
of "md5", it works fine from middlegen. That's not going to
be good enough, though.
I'm using the URL
jdbc:postgresql://localhost/airline
username=aslak, password=aslak
in the Middlegen database config file.

I've turned on maximum Postres server logging, and it doesn't
show what password is actually being received, although it does
say that it received one.

Has anyone gotten this to work? Or can you suggest any more debugging
steps to try?

I'm using Fedora Core 1, Postgres 7.3.4, Middlegen 2.0-VO, JBoss 3.2.4,
and Sun JVM 1.4.2_04

Thanks!
--
Bob Langford, Silicon Masters Consulting, Inc.
***@silicon-masters.com http://www.silicon-masters.com/
phone: 804-674-1253 fax: 804-745-7803
Tim Cockle
2004-07-05 09:39:10 UTC
Permalink
Not that this is very helpful but I have it working (or had done). It
was a long time back now and can't remeber any problems.

I am using postgreSQL on the main project now. I think the only time I
had a problem was when we migrated over to a diffrent server which ran a
newer version of postgre so the driver had to be upgraded.

Still if anything comes to mind I will let you know.

Tim
Post by Bob Langford
Hi,
I'm new to Middlegen, just trying to get the sample app to
work with JBoss and Postgres. I think I've got everything set
up right, but the 'create-tables' task fails because it can't
connect to Postgres. I get
FATAL: Password authentication failed for user "aslak"
Yet, I can connect via the psql command just fine. Also, if
I change the Postgres config (pg_hba.conf) to use "trust" instead
of "md5", it works fine from middlegen. That's not going to
be good enough, though.
I'm using the URL
jdbc:postgresql://localhost/airline
username=aslak, password=aslak
in the Middlegen database config file.
I've turned on maximum Postres server logging, and it doesn't
show what password is actually being received, although it does
say that it received one.
Has anyone gotten this to work? Or can you suggest any more debugging
steps to try?
I'm using Fedora Core 1, Postgres 7.3.4, Middlegen 2.0-VO, JBoss 3.2.4,
and Sun JVM 1.4.2_04
Thanks!
Russell Simpkins
2004-07-05 09:47:11 UTC
Permalink
In pg_hba.conf,
use
local all 127.0.0.1 255.255.255.255 password
instead of md5. You can only use md5 if you go and convert you password
to an md5 password. Check the docs in pg_hba.conf



-----Original Message-----
From: middlegen-user-***@lists.sourceforge.net
[mailto:middlegen-user-***@lists.sourceforge.net] On Behalf Of Bob
Langford
Sent: Wednesday, June 30, 2004 7:48 PM
To: middlegen-***@lists.sourceforge.net
Subject: [Middlegen-user] Connection problems with PostgreSQL

Hi,
I'm new to Middlegen, just trying to get the sample app to
work with JBoss and Postgres. I think I've got everything set
up right, but the 'create-tables' task fails because it can't
connect to Postgres. I get
FATAL: Password authentication failed for user "aslak"

Yet, I can connect via the psql command just fine. Also, if
I change the Postgres config (pg_hba.conf) to use "trust" instead
of "md5", it works fine from middlegen. That's not going to
be good enough, though.
I'm using the URL
jdbc:postgresql://localhost/airline
username=aslak, password=aslak
in the Middlegen database config file.

I've turned on maximum Postres server logging, and it doesn't
show what password is actually being received, although it does
say that it received one.

Has anyone gotten this to work? Or can you suggest any more debugging
steps to try?

I'm using Fedora Core 1, Postgres 7.3.4, Middlegen 2.0-VO, JBoss 3.2.4,
and Sun JVM 1.4.2_04

Thanks!
--
Bob Langford, Silicon Masters Consulting, Inc.
***@silicon-masters.com http://www.silicon-masters.com/
phone: 804-674-1253 fax: 804-745-7803



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
Russell Simpkins
2004-07-07 21:43:21 UTC
Permalink
Are you able to connect using

psql -h localhost -U alask -W alask airline

did you create the airline database?


-----Original Message-----
From: middlegen-user-***@lists.sourceforge.net
[mailto:middlegen-user-***@lists.sourceforge.net] On Behalf Of Bob
Langford
Sent: Saturday, July 03, 2004 9:52 AM
To: middlegen-***@lists.sourceforge.net
Subject: Re: [Middlegen-user] Connection problems with PostgreSQL

Thanks for the input.

Right now, I'm using the Ant build script that is part of the Sample
application, and it does
the connection the way you recommend. Actually, I don't know any other
way to do it.
And I am starting Postgresql with the TCP/IP option; I can connect from
my other machine using
psql without any trouble.
Post by Darren Hartford
Heya Bob,
I have exact same setup minus Postgres (mysql here). In my
configuration, I keep the databaseURL with just the host and the
database, then have the username and password be seperate properties in
the Ant task (assuming you are using Ant or Maven build scripts).
Post by Darren Hartford
<middlegen
databaseurl="postgresql://localhost/airline"
username="aslak"
password="aslak"
...
I doubt it would be that simple, but you never know. If it's a new
Postgres install, maybe make sure the TCPIP Socket property is set to
true?
Post by Darren Hartford
-D
--
Bob Langford
Silicon Masters Consulting, Inc. 8207 Stone River Court, Richmond, VA
23235
phone: 804-674-1253 fax: 804-745-7803
http://www.silicon-masters.com/




-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
Bob Langford
2004-07-08 01:15:09 UTC
Permalink
Yes, I can connect with that technique both from the machine that is
running Postgres and Middlegen,
and from another machine. I can also connect from my Windows machine
using DBTools Manager Pro.
All of these methods show the database, and the tables with the sample data.

I'm going to set things up on another machine, and see if it works there.
Post by Russell Simpkins
Are you able to connect using
psql -h localhost -U alask -W alask airline
did you create the airline database?
-----Original Message-----
Langford
Sent: Saturday, July 03, 2004 9:52 AM
Subject: Re: [Middlegen-user] Connection problems with PostgreSQL
Thanks for the input.
Right now, I'm using the Ant build script that is part of the Sample
application, and it does
the connection the way you recommend. Actually, I don't know any other
way to do it.
And I am starting Postgresql with the TCP/IP option; I can connect from
my other machine using
psql without any trouble.
Post by Darren Hartford
Heya Bob,
I have exact same setup minus Postgres (mysql here). In my
configuration, I keep the databaseURL with just the host and the
database, then have the username and password be seperate properties in
the Ant task (assuming you are using Ant or Maven build scripts).
Post by Darren Hartford
<middlegen
databaseurl="postgresql://localhost/airline"
username="aslak"
password="aslak"
...
I doubt it would be that simple, but you never know. If it's a new
Postgres install, maybe make sure the TCPIP Socket property is set to
true?
Post by Darren Hartford
-D
--
Bob Langford
Silicon Masters Consulting, Inc. 8207 Stone River Court, Richmond, VA 23235
phone: 804-674-1253 fax: 804-745-7803 http://www.silicon-masters.com/
Loading...