AnsweredAssumed Answered

Installing Pentaho EE using external MySQL for repository.  Failure to start.

Question asked by Clifford Grimm Employee on Jun 22, 2018
Latest reply on Jun 25, 2018 by Chris Eicher

I am trying to install Pentaho EE 8.1 using the "Archive" method.  This means Pentaho will use the packaged tomcat, but user should provide the database engine. What I decided to do is broaden it a bit for the experience of it all by installing on CentOS without a GUI and use an MySQL Server on a remote system.  However, after trying to be very careful with the configuration as documented in the product documentation, it fails to start.  The login web page does display, but doesn't recognize any credentials.  Lots of errors in logs and such.

 

The first failure in the catalina.out file is:

 

11:11:07,866 ERROR [ServiceRecipe] Error retrieving service from ServiceRecipe[name='auto_pdi_plugin_service_TransStart']

org.osgi.service.blueprint.container.ComponentDefinitionException: Error when instantiating bean monitorEnvironment of class org.pentaho.di.monitor.MonitorEnvironment

        at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:333)

        at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806)

        at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)

        at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)

        at java.util.concurrent.FutureTask.run(FutureTask.java:266)

        at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)

        at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:62)

 

--- Lines deleted for brevity ---

 

Caused by: org.pentaho.di.core.exception.KettleException:

!Monitoring.License.Message!

        at org.pentaho.di.monitor.MonitorEnvironment.<init>(SourceFile:75)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

        at org.apache.aries.blueprint.utils.ReflectionUtils.newInstance(ReflectionUtils.java:329)

        at org.apache.aries.blueprint.container.BeanRecipe.newInstance(BeanRecipe.java:962)

        at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:331)

        ... 53 more

 

The first failure in the catalina.log file is:

 

22-Jun-2018 11:14:17.254 SEVERE [http-nio-8080-exec-2] com.sun.jersey.spi.spring.container.servlet.SpringServlet.initiate Exception occurred when intialization

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.sun.xml.ws.transport.http.servlet.SpringBinding#0' defined in file [/home/pentaho/pentaho/server/pentaho-server/pentaho-solutions/system/pentahoServices.spring.xml]: Cannot create inner bean '(inner bean)#77a1e2d5' of type [org.jvnet.jax_ws_commons.spring.SpringService] while setting bean property 'service'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#77a1e2d5': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException

        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:313)

        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:129)

 

-- MORE ---

 

And a lot more like these....

 

Then in pentaho.log, see things like this that make me thing the configuration of the database didn't go as planned:

 

2018-06-22 11:12:10,090 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] could not get database metadata

java.sql.SQLException: Connections could not be acquired from the underlying database!

        at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)

        at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529)

        at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)

        at org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:78)

        at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51)

        at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:168)

        at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:375)

        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1872)

        at org.pentaho.platform.repository.hibernate.HibernateUtil.initialize(HibernateUtil.java:171)

        at org.pentaho.platform.repository.hibernate.HibernateUtil.<clinit>(HibernateUtil.java:92)

        at org.pentaho.cdf.environment.configurations.PentahoHibernanteConfigurations.getConfiguration(PentahoHibernanteConfigurations.java:30)

        at org.pentaho.cdf.utils.PluginHibernateUtil.initialize(PluginHibernateUtil.java:58)

        at org.pentaho.cdf.storage.StorageEngine.getInstance(StorageEngine.java:61)

        at org.pentaho.cdf.storage.StorageApi.<init>(StorageApi.java:46)

   ---- MORE -----

 

 

I realize there could a ton of possibilities and debugging in the forum is not likely to be terribly productive, but maybe someone has seen this and knows what is likely the culprit, or even hints on where in the configuration I might have messed up.

 

The instructions I used to configure Pentaho can be found at: Use MySQL as Your Repository Database (Archive Installation) - Pentaho Documentation

 

But some points I believe are of relevance...

1) I installed MySQL 5.7 on a separate system.

2) I used MySQLWorkbench to configure users and validate connectivity from yet another system.

3) Uploaded the SQL scripts mentioned in the documentation into MySQLWorkbench to create the databases and users needed for the hibernate, jackrabbit, and pentaho_operations_mart databases.  Note: the scripts were modified to have a different password for the user creation and to use wildcard IP address of 10.10.20.% to allow for remote connection instead of localhost.

   a) Observation, the hibernate and jackrabbit does not have any tables.

4) The documentation says to use the hibuser to verify all the databases exist, but hibuser only has permissions to see hibernate and pentaho_operations_mart.  The expected accounts can see jackrabbit (jcr_user) and quartz (pentaho_user) databases.  So I suspect the documentation needs some adjustment.

5) Completed the installation instructions for modifying the Pentaho server to use MySQL for the repository.  It was a bit involved to accomplish, but I think I followed the instructions, but here are some notes about the experience.

     a) In general, ensured that any places where there was a URI with localhost, used the DNS name of the msql server.  Also changed all places asking for password to what is needed. Verified all port numbers were 3306.

    b) Was careful about commenting out non mysql configuration in the XML.

6) Completed the Tomcat configuration.

    a) Downloaded the mysql-connector-java version 8.0.11 onto server. put the driver jar file in .../tomcat/lib folder.

    b) In the steps there was a statement about copy the hsqldb-2.3.2.jar file into tomcat/lib to retain the sample, but it was already there.

    c) Edited the tomcat/webapps/pentaho/META-INF/context.xml file as directed with tweaks:

         i) change locahost to dns name of mysql server.  ASSUMPTION: DNS name will work as long as host can resolve it.  Example:              url="jdbc:mysql://pentaho-repo.idea.hdsflab.com:3306/hibernate"

         ii) Update the passwords.

 

 

Any possible hints is greatly appreciated!!

Outcomes