I have been running a ci plan for platform 2.4.0 and the plan failed on the build standalone stage which according to the logs is due to a liquibase migration of a change set complaining that the number of columns does match in the destination table
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.10.2:update (empty-db-add-ciel-data) on project standalone:
23-Sep-2020 20:50:35 [ERROR] Error setting up or running Liquibase:
23-Sep-2020 20:50:35 [ERROR] Migration failed for change set /home/bamboo-agent/bamboo-agent/xml-data/build-dir/OP-OPM8-BS/standalone/target/liquibase/liquibase-ciel-data.xml::20120315-1000::standalone:
23-Sep-2020 20:50:35 [ERROR] Reason: liquibase.exception.DatabaseException: Column count doesn't match value count at row 1 [Failed SQL: (1136) insert into liquibasechangelog values('200905150821', 'bwolfe',
23-Sep-2020 20:50:35 [ERROR] 'liquibase-update-to-latest.xml', '2012-03-15 11:00:00', 10242,
23-Sep-2020 20:50:35 [ERROR] 'EXECUTED', '3:c0b7abc7eb00f243325b4a3fb2afc614', 'Custom SQL',
23-Sep-2020 20:50:35 [ERROR] 'Deleting duplicate concept word keys', NULL, '2.0.1')]
23-Sep-2020 20:50:35 [ERROR] -> [Help 1]
This is the command that he is running: mvn clean package -Dopenmrs.version=2.4.0-SNAPSHOT
It spawns a couple of MySQL instances which it may not stop on failing. So to run it again, you would need to first kill them, in order to avoid the connection password errors.
The docker-compose log contains a liquibase error:
web_1 | INFO - ChangeLogDetective.getInitialLiquibaseSnapshotVersion(93) |2020-09-25T17:11:20,618| file 'org/openmrs/liquibase/snapshots/schema-only/liquibase-schema-only-1.9.x.xml' contains 2 un-run change sets
web_1 | INFO - ChangeLogDetective.logUnRunChangeSetDetails(202) |2020-09-25T17:11:20,619| file 'org/openmrs/liquibase/snapshots/schema-only/liquibase-schema-only-1.9.x.xml' contains un-run change set with id '20120529-2230' by author 'mvorobey'
web_1 | INFO - ChangeLogDetective.logUnRunChangeSetDetails(202) |2020-09-25T17:11:20,619| file 'org/openmrs/liquibase/snapshots/schema-only/liquibase-schema-only-1.9.x.xml' contains un-run change set with id '20120529-2231' by author 'mvorobey'
...
web_1 | WARN - InitializationFilter$InitializationCompletion$1.run(1724) |2020-09-25T17:11:20,703| Error while trying to update to the latest database version
web_1 | java.lang.IllegalStateException: identifying the snapshot version that had been used to initialize the OpenMRS database failed as no candidate change set resulted in zero un-run changes
web_1 | at org.openmrs.liquibase.ChangeLogDetective.getInitialLiquibaseSnapshotVersion(ChangeLogDetective.java:116) ~[openmrs-api-2.4.0-SNAPSHOT.jar:?]
web_1 | at org.openmrs.web.filter.initialization.InitializationFilter$InitializationCompletion$1.run(InitializationFilter.java:1703) [openmrs-web-2.4.0-SNAPSHOT.jar:?]
web_1 | at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
It looks like the same fix needs to be applied to the source of openmrs-distro-platform/target/distro/dbdump/dump.sql. Where does that file come from pls?
@wolf this file is not in the openmrs platform-distro, am not seeing it there, may be i need to introduce it . Will this suffice given the a PR with the commit?
He gets the problem while trying to run the command mvn clean package -Dopenmrs.version=2.4.0-SNAPSHOT on the master branch of this repository: https://github.com/openmrs/openmrs-standalone
Unfortunately not, but for a different reason. My machine cannot run the MySQL executable that comes with OpenMRS standalone:
[MysqldResource] launching mysqld (driver_launched_mysqld_1)
Exception in thread "driver_launched_mysqld_1" com.mysql.management.util.WrappedException: java.io.IOException: Cannot run program "/Users/wolf/Projects/OpenMRS/code10/openmrs-standalone/target/emptydatabase/bin/mysqld": error=86, Bad CPU type in executable
Could you please provide me with the full log of running mvn clean package -Dopenmrs.version=2.4.0-SNAPSHOT command on your side?
The first run fails because there is not enough memory:
[ERROR] Java heap space -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError
The second run then fails as the mysql folder cannot be deleted, probably because mysql is still running as the first run did not finish orderly:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project standalone: Failed to clean project: Failed to delete C:\Users\Cliff\Desktop\project\openmrs-standalone\target\emptydatabase\data\mysql -> [Help 1]
These errors are not related to processing Liquibase change logs as such, could you please re-run with more memory available to mvn?
@wolf yes i have been throwing in more memory and for each adjustment i make the build time ranges between 40-60 mins after much hanging, thats why its taking alot of time to figure out the right memory
the build logs dont show how mush memory you have used