Issue with upgrading Bonita Community Edition 6.3.2 to latest
Hello,
I am in the process of upgrading my Bonita platform to the latest version. I'm following the documentation https://documentation.bonitasoft.com/bonita/7.6/migrate-from-an-earlier-... and noticed the section that talks about the constraints. I've ran the migration script for version 7.0 and it seems to be stuck at 'Migrating Arch_data_mapping'. This script has been running for 5 days and I'm not sure if it's continuing or have silently failed. According to the documentation, if you add indexes to the arch_data_mapping table, the migration will not complete. Does this mean, I will notice it failing or it will appear as if it's continuing but really isn't? Also, I have not added any indexes to tables but have noticed that there are indexes added to the arch_data_mapping table. It appears that the indexes were created by the application. Will the indexes created by the application affect the migration from completing?
Hello,
If the table only has the indexes coming by default (none added by yourself) this should run fine.
Migration time depends on the amount of data there is in the DB. The archive tables are usually the largest part and can take a while. It is not common to see a migration spending that much time though, could you elaborate on your DB/table sizes?
Comments
This is the query that's running: DELETE FROM arch_data_mapping WHERE NOT EXISTS (SELECT NULL FROM arch_data_instance i WHERE i.sourceObjectId = arch_data_mapping.dataInstanceId)
I ran I SELECT Count on both tables and for arch_data_mapping table, there are 7,509,234 records. For arch_data_instance table, there are 1,521,491 records. DB size in MB is 1736.3.
I'm using version 7.0 of the migration tool. It's stuck when going from 6.3.2 to 6.3.3. When you say, get information from the logs, are you referring to the migration logs or the bonita home logs? If it's the migration logs, the logs do not tell me anything. It just displays what step the migration is on which is 'Migrating Arch_data_mapping'. This is what I see:
+---------------------------------------------+
| Migration of version 6.3.2 to version 6.3.3 |
| migration number 1 of a total of 16 |
+---------------------------------------------+
Continue migration? (yes/no):
Migration of database:
| [ Migrating 1/6 ]
| Description : Update default theme
| | executing SQL statement:[UPDATE theme
SET lastUpdateDate = 1527787977822
WHERE isDefault = true
AND type = 'PORTAL';
UPDATE theme
SET lastUpdateDate = 1527787977822 + 1
WHERE isDefault = false
AND type = 'PORTAL';
]
| [ Migration step success in 0.453 seconds. Migration started 4.109 seconds ago. ]
|
| [ Migrating 2/6 ]
| Description : Clean archive data mapping orphans.
| | Deleting archived data mapping orphans for all tenants
Yes I am using the migration tool version 1.24.3. I don't understand your suggestion in executing the migration into two separated steps. I am coming from version 6.3.2. The migration gets stuck at 6.3.3 with the database query taking a long time to execute.
I ran the query in MySQL workbench and it timed out. It seems the issue is not with the migration script but the database volume. The idea of purging data seems risky especially because this is an open source application. I'm not sure what to do at this point.
Thanks pierrick.voulet. I was able to get pass the issue with the query command by setting indexes on the arch_data_mapping and the arch_data_instance tables even though the documentation said by doing this, the migration would fail. The migration from 6.3.2 to version 7.0 did not fail by doing so. Now, I am attempting to migrate from version 7.0 to 7.6.3 by running the migration tool-2.29.0. When I run this tool, it fails at version 7.4.0 with the following error message: Exception in thread "main" java.lang.IllegalStateException: some processes could not be migrated. see error log for more information. What does this mean?
The error log, I assume this is speaking of is the migration log. If so, this is what is displayed.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:80)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
at org.bonitasoft.migration.version.to7_4_0.MigrateProcessDefinitionXmlWithXSD.execute(MigrateProcessDefinitionXmlWithXSD.groovy:50)
at org.bonitasoft.migration.version.to7_4_0.MigrateProcessDefinitionXmlWithXSD$execute.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.bonitasoft.migration.version.to7_3_1.AddAvatarPermission$execute.call(Unknown Source)
at org.bonitasoft.migration.core.MigrationRunner$_run_closure1$_closure5.doCall(MigrationRunner.groovy:55)
at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)
at groovy.lang.Closure.call(Closure.java:426)
at groovy.lang.Closure.call(Closure.java:442)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056)
at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at org.bonitasoft.migration.core.MigrationRunner$_run_closure1.doCall(MigrationRunner.groovy:51)
at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)
at groovy.lang.Closure.call(Closure.java:426)
at groovy.lang.Closure.call(Closure.java:442)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056)
at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at org.bonitasoft.migration.core.MigrationRunner.run(MigrationRunner.groovy:42)
at org.bonitasoft.migration.core.MigrationRunner$run.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at org.bonitasoft.migration.core.Migration.run(Migration.groovy:56)
at org.bonitasoft.migration.core.Migration$run.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at org.bonitasoft.migration.core.Migration.main(Migration.groovy:41)
Also, what do you mean by already deployed process definition?
I have 4 deployed process definitions in which all are used. Each process definition worked as expected before the migration so how would I go about identifying which generates an error? Also, are you suggesting I stop with version 7.3? If so, I assume I need to download the target version 7.3 instead of target version 7.6.3.
Thanks pierrick.voulet for all your help. I left the migration at 7.3.3 since it failed when trying to migrate to 7.4 due to the already deployed process definition. By reviewing the migration logs, I can see that it migrated the process definition to the new format when migrating to 7.3.0. Below is the verbiage from the log. I've started tomcat and logged into the portal. Now, I'm getting a "Failed to deserialize the XML string provided" error when I go to the application log. Is this the same type of error I got when attempting to migrate my platform to v7.4? If so, I do not understand the cause of the error since from the migration log, it states that the process definition migrated successfully.
[INFO] | Execute migration step: Update process definition xml to the new format
[INFO] | --> Migration step success in 0.172 seconds. Migration started 39.501 seconds ago. --
[INFO] ---------------
[INFO] ---------------
[INFO] | Execute migration step: Add auto login settings from process to tenant portal configuration file
[INFO] | --> Migration step success in 0.093 seconds. Migration started 39.594 seconds ago. --
[INFO] ---------------
[INFO] Updating platform version in the database ...
[INFO] Platform version in database is now 7.3.0
That's what I was thinking and was planning to migrate again from 6.3.2 stopping at 7.3.3. Thanks again.
Hi pierrick.voulet. The migration from 6.3.2 to 7.3.3 has completed successfully. Now, when I run the startup.bat and open http://localhost:8080/bonita, everything works as expected. When running tomcat 7 as a service, http://localhost:8080 comes up but http://localhost:8080\bonita does not. I've added the configurations in the tomcat7w file such as pointing to the jdk file, and added settings in the java options section. I noticed in the tomcat7w that it also has a java 9 options section with information in it. Is this needed? In the bonita log files, I'm getting warnings such as 'Invalid bean definition with name...'. What does this mean? Could this be a cause to the reason http://localhost:8080\bonita does not work? The java options that I've added in the tomcat7w file are the same settings in the setenv.bat file. I believe when running the startup.bat, it's referencing the setenv.bat file.
Thank you for all your help.
Comments
I would like to mention that the command 'Migrating Arch_data_mapping' is displayed in the command prompt. The command prompt has not closed which tells me the script has not failed. Also, I'm able to view the query in my database that this command is running. In addition, the database tables in the file system are displayed and the Arch_data_mapping table has a time stamp that has been updating. These all seem to be an indication that the migration is still running but is it suppose to take this long on one command?