View Issue Details

IDProjectCategoryView StatusLast Update
0001784SymmetricDSBugpublic2023-09-13 17:25
Reporterkumick Assigned Tocquamme  
Prioritynormal 
Status closedResolutionopen 
Product Version3.6.1 
Summary0001784: Could not run sample setup with MariaDB on latest version 3.6.1, but can on 3.5.19
DescriptionSame setup works under 3.5.19.

Here are the errors I get with 3.6.1:

Setup system with sample using MariaDB (tried both 5.5.36 and 10.0.12) and the first time I run continuously get:
[store-001] - RegistrationService - This node is unregistered. It will attempt to register using the registration.url
[store-001] - DataLoaderService - Using registration URL of http://localhost:8080/sync/corp-000/registration?nodeGroupId=store&externalId=001&syncURL=http%3A%2F%2Ftestb%3A31415%2Fsync%2Fstore-001&schemaVersion=%3F&databaseType=MySQL&databaseVersion=10.0&symmetricVersion=3.6.1&hostName=testb&ipAddress=172.21.0.35

If I kill the sym task and restart it then I get this error:
[store-001] - JdbcSqlTemplate - Can't DROP 'sym_conflict_FK_null_null'; check that column/key exists. Failed to execute: ALTER TABLE `sym_conflict`
DROP FOREIGN KEY `sym_conflict_FK_null_null`
[store-001] - AbstractSymmetricEngine - An error occurred while starting SymmetricDS
org.jumpmind.db.sql.SqlException: Can't DROP 'sym_conflict_FK_null_null'; check that column/key exists
        at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:288)
        at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:279)
        at org.jumpmind.db.sql.JdbcSqlTemplate.execute(JdbcSqlTemplate.java:421)
        at org.jumpmind.db.sql.JdbcSqlTemplate.update(JdbcSqlTemplate.java:334)
        at org.jumpmind.db.sql.SqlScript.execute(SqlScript.java:107)
        at org.jumpmind.symmetric.db.AbstractSymmetricDialect.createOrAlterTablesIfNecessary(AbstractSymmetricDialect.java:423)
        at org.jumpmind.symmetric.db.AbstractSymmetricDialect.initTablesAndDatabaseObjects(AbstractSymmetricDialect.java:149)
        at org.jumpmind.symmetric.AbstractSymmetricEngine.setupDatabase(AbstractSymmetricEngine.java:371)
        at org.jumpmind.symmetric.AbstractSymmetricEngine.setup(AbstractSymmetricEngine.java:362)
        at org.jumpmind.symmetric.AbstractSymmetricEngine.start(AbstractSymmetricEngine.java:501)
        at org.jumpmind.symmetric.AbstractSymmetricEngine.start(AbstractSymmetricEngine.java:493)
        at org.jumpmind.symmetric.web.SymmetricEngineHolder$EngineStarter.run(SymmetricEngineHolder.java:435)
Caused by: java.sql.SQLSyntaxErrorException: Can't DROP 'sym_conflict_FK_null_null'; check that column/key exists
        at org.mariadb.jdbc.internal.SQLExceptionMapper.get(SQLExceptionMapper.java:138)
        at org.mariadb.jdbc.internal.SQLExceptionMapper.throwException(SQLExceptionMapper.java:106)
        at org.mariadb.jdbc.MySQLStatement.executeQueryEpilog(MySQLStatement.java:264)
        at org.mariadb.jdbc.MySQLStatement.execute(MySQLStatement.java:288)
        at org.mariadb.jdbc.MySQLStatement.execute(MySQLStatement.java:338)
        at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
        at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
        at org.jumpmind.db.sql.JdbcSqlTemplate$6.execute(JdbcSqlTemplate.java:347)
        at org.jumpmind.db.sql.JdbcSqlTemplate$6.execute(JdbcSqlTemplate.java:334)
        at org.jumpmind.db.sql.JdbcSqlTemplate.execute(JdbcSqlTemplate.java:419)
        ... 9 more
Caused by: org.mariadb.jdbc.internal.common.QueryException: Can't DROP 'sym_conflict_FK_null_null'; check that column/key exists
        at org.mariadb.jdbc.internal.mysql.MySQLProtocol.getResult(MySQLProtocol.java:942)
        at org.mariadb.jdbc.internal.mysql.MySQLProtocol.executeQuery(MySQLProtocol.java:991)
        at org.mariadb.jdbc.MySQLStatement.execute(MySQLStatement.java:281)
        ... 15 more

And it never manages to synchronize the databases.
Steps To Reproduce-Create Schemes for corp and store001 in database.
-Copy corp and store properties to engines folder.
-Modify corp-000.properties files with following:
db.driver=org.mariadb.jdbc.Driver
db.url=jdbc:mariadb://localhost/corp?tinyInt1isBit=false

-Modify store-001.properties files with following:
db.driver=org.mariadb.jdbc.Driver
db.url=jdbc:mariadb://localhost/store001?tinyInt1isBit=false

-Run: dbimport --engine corp-000 --format XML ../samples/create_sample.xml
-Run: dbimport --engine store-001 --format XML ../samples/create_sample.xml
-Run: symadmin --engine corp-000 create-sym-tables
-Run: dbimport --engine corp-000 ../samples/insert_sample_mysql.sql
-Run: sym --port 8080
-Run: symadmin --engine corp-000 open-registration store 001
-Run: symadmin --engine corp-000 reload-node 001

-Notice that the sym task says the node is unregistered

-kill the sym task
-Run: sym --port 8080

-Notice the second error when it tries to delete the foreign key on sym_conflict.
Tagsdialect: mysql/mariadb, upgrade

Activities

cquamme

2022-09-02 20:02

developer   ~0002184

Last edited: 2022-09-02 20:03

View 2 revisions

I tried on my end upgrading from 3.5.19 and 3.6.1 and was able to upgrade successfully. The alter table command was different for me, however, this is what ran on my end:

"ALTER TABLE ``sym_conflict`` DROP FOREIGN KEY ``sym_fk_cf_2_grp_lnk"

I also used a Maria 10.5 database, which may have made a difference. Would you be able to try upgrading the version of Maria you are using to 10.5 and see if that works?

Issue History

Date Modified Username Field Change
2014-06-30 21:57 kumick New Issue
2019-04-22 20:54 elong Tag Attached: mysql/mariadb
2019-04-22 20:54 elong Tag Attached: Upgrade
2019-04-23 20:49 admin Tag Renamed mysql/mariadb => dialect: mysql/mariadb
2022-09-02 20:02 cquamme Note Added: 0002184
2022-09-02 20:02 cquamme Assigned To => cquamme
2022-09-02 20:02 cquamme Status new => feedback
2022-09-02 20:03 cquamme Note Edited: 0002184 View Revisions
2023-09-13 17:25 emiller Status feedback => closed