docker-pentaho icon indicating copy to clipboard operation
docker-pentaho copied to clipboard

Quartz and Hibernate + PostgreSQL Investigation

Open azawawi opened this issue 7 years ago • 7 comments

I bet this line is part of the Hibernate/Quartz connection problem. localhost is on 127.x.x.x range on your machine but in a docker environment it is actually another IP address that can be in the 172.x.x.x range on my machine. Maybe that's part of the problem?

We may need to patch it with the PG_HOST environment variable.

azawawi avatar Apr 17 '17 13:04 azawawi

I think that's already being done here: https://github.com/ca0abinary/docker-pentaho/blob/master/scripts/setup_postgresql.sh#L64

Do the contents of $PENTAHO_SERVER/pentaho-solutions/system/simple-jndi/jdbc.properties look good when you exec into your container?

ca0abinary avatar Apr 17 '17 13:04 ca0abinary

deleted

azawawi avatar Apr 17 '17 13:04 azawawi

More on the problem. I think our sed regex is not correct. The following is the output of a running pentaho docker-composed service.

$ sudo docker exec -it pentaho /bin/bash

bash-4.3# cat $PENTAHO_SERVER/pentaho-solutions/system/simple-jndi/jdbc.properties
...
SampleData/type=javax.sql.DataSource
SampleData/driver=org.hsqldb.jdbcDriver
SampleData/url=jdbc:hsqldb:hsql://localhost/sampledata
SampleData/user=pentaho_user
SampleData/password=password
Hibernate/type=javax.sql.DataSource
Hibernate/driver=org.hsqldb.jdbcDriver
Hibernate/url=jdbc:hsqldb:hsql://localhost/hibernate
Hibernate/user=hibuser
Hibernate/password=password
Quartz/type=javax.sql.DataSource
Quartz/driver=org.hsqldb.jdbcDriver
Quartz/url=jdbc:hsqldb:hsql://localhost/quartz
Quartz/user=pentaho_user
Quartz/password=password
Shark/type=javax.sql.DataSource
Shark/driver=org.hsqldb.jdbcDriver
Shark/url=jdbc:hsqldb:hsql://localhost/shark
Shark/user=sa
Shark/password=
SampleDataAdmin/type=javax.sql.DataSource
SampleDataAdmin/driver=org.hsqldb.jdbcDriver
SampleDataAdmin/url=jdbc:hsqldb:hsql://localhost/sampledata
SampleDataAdmin/user=pentaho_admin
SampleDataAdmin/password=password

bash-4.3# cat $PENTAHO_SERVER/pentaho-solutions/system/simple-jndi/jdbc.properties | grep postgres

azawawi avatar Apr 18 '17 05:04 azawawi

Looks right to me. SampleData, Hibernate, and Quartz all use HyperSql. I never figured out how to make them work properly on Postgres. There are some details at the end of the readme.md on that limitation.

ca0abinary avatar Apr 19 '17 15:04 ca0abinary

No i meant when used in a docker compose scenarios. localhost for Pentaho container is not actually postgresql's ip address.

azawawi avatar Apr 19 '17 17:04 azawawi

This is the file that should be there, right? https://github.com/ca0abinary/docker-pentaho/blob/master/config/jdbc.properties

azawawi avatar Apr 19 '17 17:04 azawawi

This will be solved with my PR https://github.com/ca0abinary/docker-pentaho/pull/11

djravine avatar Apr 07 '20 00:04 djravine