Without changing antyhing in master, I am getting an error when attempting to build locally openmrs-standalone.
My connections is fairly stable but not sure why the error is occurring?
Without changing antyhing in master, I am getting an error when attempting to build locally openmrs-standalone.
My connections is fairly stable but not sure why the error is occurring?
The error you’re getting is a timeout connecting to this URL: https://mavenrepo.openmrs.org/public/org/openmrs/distro/platform/2.4.0/platform-2.4.0.war, which downloads for me, but seems to timeout connecting based on your error message. Maybe just retry?
The war file is able to be downloaded but the build again fails at standalone-step-01
[ERROR] Error setting up or running Liquibase:
[ERROR] liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException:
Connection could not be created to jdbc:mysql:mxj://127.0.0.1:33326/openmrs?autoReconnect=true&sessionVariables=storage_engine=InnoDB&useUnicode=true&characterEncoding=UTF-8&server.initialize-user=true&createDatabaseIfNotExist=true&server.basedir=/home/opensource/modules/openmrs-standalone/target/emptydatabase&server.datadir=/home/opensource/modules/openmrs-standalone/target/emptydatabase/data&server.collation-server=utf8_general_ci&server.character-set-server=utf8&server.max_allowed_packet=32M with driver com.mysql.jdbc.Driver.
Could not create connection to database server. Attempted reconnect 3 times. Giving up.
Here is the full log at opensource@opensource:~/modules/openmrs-standalone$ mvn clean package -Dopenmrs. - Pastebin.com
Try restart your computer and run that command again.
Try restart your computer and run that command again.
The build failure shifts to standalone-step-02
but still points to database server connectivity.
Error setting up or running Liquibase:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Could not create connection to database server. Attempted reconnect 3 times.
Giving up.: Can't create database 'openmrs' (errno: 2)
Am using Ubuntu v20.4 and am wondering whether the OS is causing the issue due to file permission when the build is creating the database.
Which exact command are you using to build it?
Which exact command are you using to build it?
I realized I was using a wrong command
mvn clean package -Dopenmrs.version=2.4.0
of which
the clean
step is executed for each module implying the folder
datadir=/<some root dir>/openmrs/standalone/target/emptydatabase/data
gets deleted at the beginning of step 2 and the database created in step 1 is no longer available hence failing the build.
As the documentation in the ReadMe file says: To avoid that, mvn clean
needs to be run separately before the rest of the build:
mvn clean
mvn package -Dopenmrs.version=2.4.0