You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Dieter Schicker <di...@ling.kfunigraz.ac.at> on 2004/05/31 08:39:56 UTC
Cocoon+Tomcat+Postgres
Hi,
I'm new to cocoon and I'm trying to setup a web application with a
postgres database backend. Problem is that I can't get my database user
authenticated correctly.
Version numbers:
Cocoon: 2.1
Tomcat: 5.0
Postgres: 7.4.2
web.xml:
<init-param>
<param-name>load-class</param-name>
<param-value>org.postgresql.Driver</param-value>
</init-param>
cocoon.xconf:
<jdbc name="books">
<pool-controller min="5" max="10"/>
<dburl>jdbc:postgresql:books</dburl>
<user>didi</user>
<password>XXXXXX</password>
</jdbc>
pg_hba.conf:
# Database administrative login by UNIX sockets
local all postgres ident sameuser
#
# All other connections by UNIX sockets
local all all ident sameuser
postgres log:
2004-05-31 08:40:53 [2785] DEBUG: forked new backend, pid=2852 socket=8
2004-05-31 08:40:53 [2852] LOG: connection received: host=127.0.0.1
port=33388
2004-05-31 08:40:53 [2852] FATAL: IDENT authentication failed for user
"didi"
2004-05-31 08:40:53 [2785] DEBUG: child process (PID 2852) exited with
exit code 0
When I try to connect to the database through a regular java application,
everything works fine.
Any ideas?
Thanks in advance
Didi
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon+Tomcat+Postgres
Posted by Yves Vindevogel <yv...@implements.be>.
DBUrl is wrong, that's for sure.
You may have other problems too.
1) correct your dburl like the one below (in your case, substitute
procat with your dbname)
2) make sure you call the correct connection pool in your xsp or sql
transformer
3) you need to run postgresql with the option to listen to a tcp/ip
port. You can do that by starting PG with the pg_ctl -D /somewhere -o
-i start option
4) you need to specify an entry in your hba_conf file in pg to allow
your IP number to connect to the database
<jdbc name="procat">
<pool-controller max="10" min="5"/>
<dburl>jdbc:postgresql://127.0.0.1:5432/procat</dburl>
<user>postgresql</user>
<password/>
</jdbc>
On 31 May 2004, at 08:39, Dieter Schicker wrote:
>
> Hi,
>
> I'm new to cocoon and I'm trying to setup a web application with a
> postgres database backend. Problem is that I can't get my database user
> authenticated correctly.
>
> Version numbers:
> Cocoon: 2.1
> Tomcat: 5.0
> Postgres: 7.4.2
>
> web.xml:
> <init-param>
> <param-name>load-class</param-name>
> <param-value>org.postgresql.Driver</param-value>
> </init-param>
>
> cocoon.xconf:
> <jdbc name="books">
> <pool-controller min="5" max="10"/>
> <dburl>jdbc:postgresql:books</dburl>
>
> <user>didi</user>
> <password>XXXXXX</password>
> </jdbc>
>
> pg_hba.conf:
> # Database administrative login by UNIX sockets
> local all postgres ident sameuser
> #
> # All other connections by UNIX sockets
> local all all ident sameuser
>
> postgres log:
> 2004-05-31 08:40:53 [2785] DEBUG: forked new backend, pid=2852
> socket=8
> 2004-05-31 08:40:53 [2852] LOG: connection received: host=127.0.0.1
> port=33388
> 2004-05-31 08:40:53 [2852] FATAL: IDENT authentication failed for user
> "didi"
> 2004-05-31 08:40:53 [2785] DEBUG: child process (PID 2852) exited with
> exit code 0
>
> When I try to connect to the database through a regular java
> application,
> everything works fine.
>
> Any ideas?
>
> Thanks in advance
> Didi
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon+Tomcat+Postgres
Posted by Miles Elam <mi...@pcextremist.com>.
Or as is commonly found on many UNIX systems, edit the postgresql.conf file:
#
# Connection Parameters
#
tcpip_socket = true
Also, if your install of postgres was installed with TLS/SSL support,
you can add the following:
ssl = true
Most distribution support for postgresql starts the server with this
file as its base configuration. It's definitely a lot easier to
remember than -o -i and keeps you from having to edit executable scripts.
- Miles
Yves Vindevogel wrote:
> Start Postgresql with -o -i
>
> On 31 May 2004, at 18:09, Dieter Schicker wrote:
>
>> Thanks for your answers.
>>
>>> Did you already try to use TCP/IP sockets instead of UNIX sockets?
>>
>>
>> How do I do that?
>>
>> Didi
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon+Tomcat+Postgres
Posted by Yves Vindevogel <yv...@implements.be>.
Start Postgresql with -o -i
On 31 May 2004, at 18:09, Dieter Schicker wrote:
>
> Thanks for your answers.
>
>> Did you already try to use TCP/IP sockets instead of UNIX sockets?
>
> How do I do that?
>
> Didi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon+Tomcat+Postgres
Posted by Dieter Schicker <di...@ling.kfunigraz.ac.at>.
Sorry, that was a stupid question. Everything is fine now.
Thanks
Didi
On Mon, 31 May 2004, Dieter Schicker wrote:
>
> Thanks for your answers.
>
> > Did you already try to use TCP/IP sockets instead of UNIX sockets?
>
> How do I do that?
>
> Didi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon+Tomcat+Postgres
Posted by Dieter Schicker <di...@ling.kfunigraz.ac.at>.
Thanks for your answers.
> Did you already try to use TCP/IP sockets instead of UNIX sockets?
How do I do that?
Didi
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon+Tomcat+Postgres
Posted by leo leonid <te...@leonid.de>.
On 31.05.2004, at 08:39, Dieter Schicker wrote:
>
> Hi,
>
> I'm new to cocoon and I'm trying to setup a web application with a
> postgres database backend. Problem is that I can't get my database user
> authenticated correctly.
>
> Version numbers:
> Cocoon: 2.1
> Tomcat: 5.0
> Postgres: 7.4.2
>
> web.xml:
> <init-param>
> <param-name>load-class</param-name>
> <param-value>org.postgresql.Driver</param-value>
> </init-param>
>
> cocoon.xconf:
> <jdbc name="books">
> <pool-controller min="5" max="10"/>
> <dburl>jdbc:postgresql:books</dburl>
>
> <user>didi</user>
> <password>XXXXXX</password>
> </jdbc>
Your setup in web.xml an cocoon.xconf is correct.
Did you already try to use TCP/IP sockets instead of UNIX sockets?
/leo
>
> pg_hba.conf:
> # Database administrative login by UNIX sockets
> local all postgres ident sameuser
> #
> # All other connections by UNIX sockets
> local all all ident sameuser
>
> postgres log:
> 2004-05-31 08:40:53 [2785] DEBUG: forked new backend, pid=2852
> socket=8
> 2004-05-31 08:40:53 [2852] LOG: connection received: host=127.0.0.1
> port=33388
> 2004-05-31 08:40:53 [2852] FATAL: IDENT authentication failed for user
> "didi"
> 2004-05-31 08:40:53 [2785] DEBUG: child process (PID 2852) exited with
> exit code 0
>
> When I try to connect to the database through a regular java
> application,
> everything works fine.
>
> Any ideas?
>
> Thanks in advance
> Didi
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org