docker-pentaho
docker-pentaho copied to clipboard
Quartz and Hibernate + PostgreSQL Investigation
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.
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?
deleted
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
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.
No i meant when used in a docker compose scenarios. localhost for Pentaho container is not actually postgresql's ip address.
This is the file that should be there, right? https://github.com/ca0abinary/docker-pentaho/blob/master/config/jdbc.properties
This will be solved with my PR https://github.com/ca0abinary/docker-pentaho/pull/11