View Issue Details

IDProjectCategoryView StatusLast Update
0001784SymmetricDSBugpublic2023-09-13 17:25
Reporterkumick Assigned Tocquamme  
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=

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(
        at org.jumpmind.db.sql.AbstractSqlTemplate.translate(
        at org.jumpmind.db.sql.JdbcSqlTemplate.execute(
        at org.jumpmind.db.sql.JdbcSqlTemplate.update(
        at org.jumpmind.db.sql.SqlScript.execute(
        at org.jumpmind.symmetric.db.AbstractSymmetricDialect.createOrAlterTablesIfNecessary(
        at org.jumpmind.symmetric.db.AbstractSymmetricDialect.initTablesAndDatabaseObjects(
        at org.jumpmind.symmetric.AbstractSymmetricEngine.setupDatabase(
        at org.jumpmind.symmetric.AbstractSymmetricEngine.setup(
        at org.jumpmind.symmetric.AbstractSymmetricEngine.start(
        at org.jumpmind.symmetric.AbstractSymmetricEngine.start(
        at org.jumpmind.symmetric.web.SymmetricEngineHolder$
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(
        at org.mariadb.jdbc.internal.SQLExceptionMapper.throwException(
        at org.mariadb.jdbc.MySQLStatement.executeQueryEpilog(
        at org.mariadb.jdbc.MySQLStatement.execute(
        at org.mariadb.jdbc.MySQLStatement.execute(
        at org.apache.commons.dbcp.DelegatingStatement.execute(
        at org.apache.commons.dbcp.DelegatingStatement.execute(
        at org.jumpmind.db.sql.JdbcSqlTemplate$6.execute(
        at org.jumpmind.db.sql.JdbcSqlTemplate$6.execute(
        at org.jumpmind.db.sql.JdbcSqlTemplate.execute(
        ... 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(
        at org.mariadb.jdbc.internal.mysql.MySQLProtocol.executeQuery(
        at org.mariadb.jdbc.MySQLStatement.execute(
        ... 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 files with following:

-Modify files with following:

-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



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