I've got some spooky Halloween stuff going on in my local sakai instance
that's baffling my co-workers and I, hopefully someone on this list can
be of assistance:
I noticed certain data wasn't persisting in my mysql database, yet
nothing was logged in catalina.out. So I began troubleshooting and I
checked mysql-query.log, and the appropriate 'insert' statements were
there, but each one was immediately followed by 'ROLLBACK'. I noticed
these ROLLBACK statements were occurring on the vast majority of the
queries in my DB (even after select queries).
So while troubleshooting, I took the following steps which yielded the
same result (for the purpose of this email, I replaced the database
name, user, pw, and machine name with a festive jack-o-lantern: 🎃). Steps:
-pulled down latest source code from master
-renamed ~/.m2/repository to eliminate the possibility of bad dependencies
-dropped my database, recreated it, granted privileges to user
'🎃'@'localhost' to eliminate possibility of corrupt data
-backed up and deleted tomcat, replaced it with a fresh instance from
apache-tomcat-7.0.34.tar.gz to eliminate possibility of duplicate jars, etc.
-in $CATALIA_HOME/conf/catalina.properties: set
org.apache.catalina.startup.ContextConfig.jarsToSkip=*.jar (as
recommended by Steve Swinsburg for quicker startups)
-copied default.sakai.propertiers to
$CATALINA_HOME/sakai/sakai.properties, and set the following properties:
test...@org.sakaiproject.email.api.EmailService=true
auto.ddl=true
user...@javax.sql.BaseDataSource=🎃
pass...@javax.sql.BaseDataSource=🎃
ven...@org.sakaiproject.db.api.SqlService=mysql
driverC...@javax.sql.BaseDataSource=<I've taken all these steps
using both com.mysql.jdbc.Driver and org.mariadb.jdbc.Driver with the
same result>
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
u...@javax.sql.BaseDataSource=jdbc:mysql://
127.0.0.1:3306/🎃?useUnicode=true&characterEncoding=UTF-8
validat...@javax.sql.BaseDataSource=select 1 from DUAL
defaultTransacti...@javax.sql.BaseDataSource=TRANSACTION_READ_COMMITTED
And then I built with:
>mvn8cld
(that's my alias for:
'JAVA_HOME=/usr/lib/jvm/java-8-oracle MAVEN_OPTS="-Xms512m -Xmx1024m
-XX:MaxMetaspaceSize=512m -Djava.util.Arrays.useLegacyMergeSort=true"
mvn -T 4 -Dmaven.test.skip=true clean install sakai:deploy')
>startup.sh
It started up successfully, there were no stack traces during startup,
but the rollbacks persisted in mysql-query.log without any output to
catalina.out.
An excerpt of one such rollback from mysql-query.log:
77 Execute insert into dash_config (property_name,
property_value) values ('PROP_LOOP_TIMER_ENABLED_🎃', 0)
77 Query SHOW WARNINGS
77 Query rollback
^ "SHOW WARNINGS" only occurs when using the mysql driver; doesn't occur
using mariadb driver
If I enter mysql with
>mysql --version
mysql Ver 14.14 Distrib 5.5.46, for debian-linux-gnu (i686) using
readline 6.3
>mysql -u 🎃 -p
mysql>use 🎃
mysql>insert into dash_config (property_name, property_value) values
('PROP_LOOP_TIMER_ENABLED_🎃', 0);
mysql>commit;
It makes it into the database, but it will be the only row in that table.
Now, some things are successfully getting inserted. For instance, I can
use the New Account tool and create a user, and an entry will be added
to sakai_user, sakai_user_id_map, etc. My best guess is that the
successes are raw sql, and rollbacks are occurring whenever a hibernate
session is closed (instead of a commit perhaps). But I haven't confirmed
this, it's just a guess.
My co-workers are not experiencing any of these issues, yet I can't
think of anything that I've missed in that process that would allow for
these issues to persist exclusively on my machine. The sakai src, the
maven repo, the db, tomcat, sakai.properties - it's all fresh. Anyone
have any suggestions?
It's very spooky, Happy Halloween! 🎃