Installing ODK Aggregate with latest support packages

Hi,

I am trying to install ODK Aggregate 2.0.3 at AWS (Linux 2) with latest support packages: Mariadb 10.2.10, tomcat8, Java 1.8, and connector 'mysql-connector-java-8.0.12.jar'. After placing ROOT.war in webapps for tomcat, when I start tomcat, the ODK URL keeps loading and the server does not respond.

Is there some compatibility requirement listed anywhere for every version of aggregate (MySQL, Tomcat, MySQL connector)?

Can someone help if any tracing is possible?

Regards,
Saad

https://docs.opendatakit.org/aggregate-deployment-planning/#component-versions has the current component versions. https://docs.opendatakit.org/aggregate-aws also has pretty good documentation on how to get a machine working on AWS.

I checked logs in detail. Getting this error repeatedly:

May 21 17:19:19 mohs server: java.sql.SQLException: Only REPEATABLE READ isolation level is supported for START TRANSACTION WITH CONSISTENT SNAPSHOT in RocksDB Storage Engine.
May 21 17:19:19 mohs server: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)
May 21 17:19:19 mohs server: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
May 21 17:19:19 mohs server: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
May 21 17:19:19 mohs server: at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
May 21 17:19:19 mohs server: at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
May 21 17:19:19 mohs server: at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2483)
May 21 17:19:19 mohs server: at com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1552)
May 21 17:19:19 mohs server: at com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2607)
May 21 17:19:19 mohs server: at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1480)
May 21 17:19:19 mohs server: at org.apache.commons.dbcp2.DelegatingStatement.executeUpdate(DelegatingStatement.java:234)
May 21 17:19:19 mohs server: at org.apache.commons.dbcp2.DelegatingStatement.executeUpdate(DelegatingStatement.java:234)
May 21 17:19:19 mohs server: at org.opendatakit.common.persistence.engine.mysql.TaskLockImpl$1.doInConnection(TaskLockImpl.java:343)
May 21 17:19:19 mohs server: at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:353)
May 21 17:19:19 mohs server: at org.opendatakit.common.persistence.engine.mysql.TaskLockImpl.doTransaction(TaskLockImpl.java:324)
May 21 17:19:19 mohs server: at org.opendatakit.common.persistence.engine.mysql.TaskLockImpl.obtainLock(TaskLockImpl.java:387)
May 21 17:19:19 mohs server: at org.opendatakit.common.security.spring.RoleHierarchyImpl.afterPropertiesSet(RoleHierarchyImpl.java:229)
May 21 17:19:19 mohs server: at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1642)
May 21 17:19:19 mohs server: at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1579)
May 21 17:19:19 mohs server: at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
May 21 17:19:19 mohs server: at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
May 21 17:19:19 mohs server: at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
May 21 17:19:19 mohs server: at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
May 21 17:19:19 mohs server: at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
May 21 17:19:19 mohs server: at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
May 21 17:19:19 mohs server: at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:754)
May 21 17:19:19 mohs server: at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
May 21 17:19:19 mohs server: at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
May 21 17:19:19 mohs server: at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
May 21 17:19:19 mohs server: at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
May 21 17:19:19 mohs server: at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
May 21 17:19:19 mohs server: at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4817)
May 21 17:19:19 mohs server: at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5283)
May 21 17:19:19 mohs server: at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
May 21 17:19:19 mohs server: at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
May 21 17:19:19 mohs server: at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
May 21 17:19:19 mohs server: at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
May 21 17:19:19 mohs server: at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:985)
May 21 17:19:19 mohs server: at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
May 21 17:19:19 mohs server: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
May 21 17:19:19 mohs server: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
May 21 17:19:19 mohs server: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
May 21 17:19:19 mohs server: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
May 21 17:19:19 mohs server: at java.lang.Thread.run(Thread.java:748)
May 21 17:19:19 mohs server: May 21, 2019 5:19:19 PM org.opendatakit.common.persistence.engine.mysql.TaskLockImpl$1 doInConnection
May 21 17:19:19 mohs server: INFO: UNLOCK TABLES

It stops when I stop the tomcat server.

Can anyone diagnose what to do please?

@Saad The error sounds like you have a version of MariaDB that isn't compatible. We test with MySQL. Have you tried that instead of MariaDB? Did you try the install instructions that we provide to see if that works better?

Yes, it was mariadb stability issue, I searched. I switched to MySQL5.7, and it works fine. I was willing to make it work with mariadb since that is the direction where MySQL is going, but somehow it doesn't work for now.

I've added a note in the docs that we don't support MariaDB. It should be trivial to support, but we don't yet.

@Saad,

I have set up servers running MariaDB successfully many times. I am not sure what may not be working ok on your system. Is your MariaDB working ok? Does it run on system boot?

Paul

Hi @paul_macharia,

Yes, i have done so too. However, for this combination of Tomcat/Java/Aggregate, it was throwing error message (the log I shared above). By chance, I didn't check Mariadb with any other application (like PHP), so I cannot verify if Mariadb was not working fine. Maybe it was the mysql-connector issue (I tried both version 5 and 8). However, the same combination of packages is working fine with MySQL5.7.

I can try to recreate the issue if needed, in case you want to investigate it. However, please do see the logs I shared above, if there is some help there. I googled the error to find on many forums that it's a bug in Mariadb.

Regards,
Saad

1 Like

Yes,

Please recreate the server instance and we can work through the diagnosis process

Asante,
Paul Macharia

Hi @paul_macharia,

I am again coming across an instance and trying to work with mariadb, and it does not work. Do you have time to troubleshoot it?

Thanks,
Saad

@Saad,

Sure, we could. Please share latest error logs. However, One thing I have experienced is MariaDB because very slow and unusable as the DB grows in size.

Paul