SSL Error on Mysql While setting up openmrs sdk

I am setting up OpenMRS SDK on Linux but I am getting this error. how can this be fixed for a successful setup @kdaud @mozzy

Tue Jun 15 20:08:19 EAT 2021 WARN: Establishing SSL connection without server’s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn’t set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to ‘false’. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 30.820 s [INFO] Finished at: 2021-06-15T20:08:20+03:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:4.0.1:setup (default-cli) on project standalone-pom: Failed to setup server: Failed to connect to the specified database jdbc:mysql://localhost:3306/server?autoReconnect=true&sessionVariables=default_storage_engine%3DInnoDB&useUnicode=true&characterEncoding=UTF-8 → [Help 1]

Share the full logs at https://pastebin.com

SDK LOGS - Pastebin.com logs here

Ensure to have MySQL 5.6 and above installed and running and specify the right db name when the installation wizard prompt you at
The distribution requires MySQL database. Please specify database uri (-DdbUri) (default:jdbc:mysql://localhost:3306/@DBNAME@’): `.
This may require you to first create a database instance from the db server before running the set up wizard

Thanks @kdaud Ive treid that out but still getting the same error. Logs here

Kindly which Mysql version are you running?

@insookwa I want to believe the error is caused by the changed connection defaults on the mysql jdbc connector library. To solve this add this string verifyServerCertificate\=false&useSSL\=true&requireSSL\=true in openmrs-runtime.properties file on your local machine

Then run these SQL statement to confirm the connection is secure

SELECT processlist_id, processlist_user, processlist_host, connection_type, v

feel free to look at this guide too.

1 Like

@insookwa To access the openmrs -runtime.properties file on your local machine, kindly follow this path On Mac OS X or Linux systems:

~/YOURUSERNAME/.OpenMRS/usr/share/tomcatX/.OpenMRS
1 Like

Thanks alot @jwnasambu however i am failing to locate the file

i have sdk-stats.properties

1 Like

Are you able to locate the openmrs folder on your machine?

1 Like

yes @jwnasambu ive got it

connection.url=jdbc:mysql://openmrs:3306/openmrs?autoReconnect=true&sessionVariables=default_storage_engine=InnoDB&useUnicode=true&characterEncoding=UTF-8 connection.username=root connection.password=Admin123

1 Like

from where do i run this . in mysql i get this

mysql> SELECT processlist_id, processlist_user, processlist_host, connection_type, v → ; ERROR 1054 (42S22): Unknown column ‘processlist_id’ in ‘field list’

I am running Server version: 8.0.25-0ubuntu0.20.04.1 (Ubuntu)

Am sorry the command was incomplete

SELECT processlist_id, processlist_user, processlist_host, connection_type, variable_value AS cipher FROM performance_schema.threads t JOIN performance_schema.status_by_thread sbt ON (t.thread_id = sbt.thread_id AND sbt.variable_name = 'Ssl_cipher_list' ) WHERE connection_type IS NOT NULL\G run in your mysql database.

1 Like

Any progress @insookwa ?

not yet @kdaud

still here

Wed Jun 16 13:17:27 EAT 2021 WARN: Establishing SSL connection without server’s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn’t set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to ‘false’. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE

Share full logs at https://pastebin.com

What output do you see when you run the commands:

java -version

mvn -v

ams@ams:~$ java -version openjdk version “11.0.11” 2021-04-20 OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04) OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

ams@ams:~$ mvn -v Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: /opt/maven Java version: 11.0.11, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64 Default locale: en_US, platform encoding: UTF-8 OS name: “linux”, version: “5.4.0-74-generic”, arch: “amd64”, family: “unix” ams@ams:~$

Downgrade your java version to 1.8

1 Like