Problem when deploying distribution during SDK setup

I am setting up openMRS-sdk using cmd on windows 10, following the method described in the site, but when i arrive at mvn openmrs-sdk:setup ,I get the error below:

C:\Users\User\workspaceOM>mvn openmrs-sdk:setup Java HotSpot™ 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0 [INFO] Scanning for projects… [INFO] [INFO] ------------------< org.apache.maven:standalone-pom >------------------- [INFO] Building Maven Stub Project (No POM) 1 [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] — openmrs-sdk-maven-plugin:3.13.0:setup (default-cli) @ standalone-pom —

Setting up a new server…

Specify server id (-DserverId) (default: ‘server2’):

You can setup the following servers:

  1. Distribution
  2. Platform

Which one do you choose? [1/2]: 1

You can deploy the following versions of distribution:

  1. Reference Application 2.8.0-SNAPSHOT
  2. Reference Application 2.7.0
  3. Reference Application 2.6.1
  4. Reference Application 2.5
  5. Reference Application 2.4
  6. Other…

Which one do you choose? [1/2/3/4/5/6]: 1 [INFO] Configured Artifact: org.openmrs.distro:referenceapplication-package:2.8.0-SNAPSHOT:jar [INFO] Copying referenceapplication-package-2.8.0-SNAPSHOT.jar to C:\Users\User\openmrs\server2\openmrs-distro.jar [INFO] Configured Artifact: org.openmrs.web:openmrs-webapp:2.0.6:war [INFO] Copying openmrs-webapp-2.0.6.war to C:\Users\User\openmrs\server2\openmrs-2.0.6.war [INFO] Configured Artifact: org.openmrs.module:addresshierarchy-omod:2.11.0:jar [INFO] Configured Artifact: org.openmrs.module:legacyui-omod:1.5.0-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:metadatadeploy-omod:1.11.0-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:reportingrest-omod:1.9.0:jar [INFO] Configured Artifact: org.openmrs.module:owa-omod:1.8.1:jar [INFO] Configured Artifact: org.openmrs.module:serialization.xstream-omod:0.2.15-SNAPSHOT:omod [INFO] Configured Artifact: org.openmrs.module:registrationapp-omod:1.13.0-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs:event-omod:2.6.0:jar [INFO] Configured Artifact: org.openmrs.module:uilibrary-omod:2.0.6:jar [INFO] Configured Artifact: org.openmrs.module:htmlwidgets-omod:1.9.0:jar [INFO] Configured Artifact: org.openmrs.module:dataexchange-omod:1.3.2:jar [INFO] Configured Artifact: org.openmrs.module:appui-omod:1.8.0:jar [INFO] Configured Artifact: org.openmrs.module:allergyui-omod:1.8.1-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:providermanagement-omod:2.11.0-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:appointmentschedulingui-omod:1.8.0-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:formentryapp-omod:1.4.2:jar [INFO] Configured Artifact: org.openmrs.module:idgen-omod:4.4.1:jar [INFO] Configured Artifact: org.openmrs.module:metadatamapping-omod:1.3.5-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:chartsearch-omod:2.1.0:jar [INFO] Configured Artifact: org.openmrs.module:htmlformentryui-omod:1.8.0-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:referencedemodata-omod:1.4.5-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:emrapi-omod:1.25.0-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:referenceapplication-omod:2.7.0:jar [INFO] Configured Artifact: org.openmrs.module:htmlformentry-omod:3.4.0:jar [INFO] Configured Artifact: org.openmrs.module:appframework-omod:2.12.0-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:referencemetadata-omod:2.7.2-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:reportingui-omod:1.5.0:jar [INFO] Configured Artifact: org.openmrs.module:coreapps-omod:1.20.0-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:reportingcompatibility-omod:2.0.4:jar [INFO] Configured Artifact: org.openmrs.module:reporting-omod:1.15.0:jar [INFO] Configured Artifact: org.openmrs.module:adminui-omod:1.2.2:jar [INFO] Configured Artifact: org.openmrs.module:registrationcore-omod:1.8.0:jar [INFO] Configured Artifact: org.openmrs.module:appointmentscheduling-omod:1.10.0-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:calculation-omod:1.2:jar [INFO] Configured Artifact: org.openmrs.module:webservices.rest-omod:2.23.0-SNAPSHOT:jar [INFO] Configured Artifact: org.openmrs.module:atlas-omod:2.2:omod [INFO] Configured Artifact: org.openmrs.module:uicommons-omod:2.5.1:jar [INFO] Configured Artifact: org.openmrs.module:uiframework-omod:3.13.0:jar [INFO] Configured Artifact: org.openmrs.module:metadatasharing-omod:1.6.0-SNAPSHOT:jar [INFO] Copying addresshierarchy-omod-2.11.0.jar to C:\Users\User\openmrs\server2\modules\addresshierarchy-2.11.0.omod [INFO] Copying legacyui-omod-1.5.0-SNAPSHOT.jar to C:\Users\User\openmrs\server2\modules\legacyui-1.5.0-SNAPSHOT.omod [INFO] Copying metadatadeploy-omod-1.11.0-SNAPSHOT.jar to C:\Users\User\openmrs\server2\modules\metadatadeploy-1.11.0-SNAPSHOT.omod [INFO] Copying reportingrest-omod-1.9.0.jar to C:\Users\User\openmrs\server2\modules\reportingrest-1.9.0.omod [INFO] Copying owa-omod-1.8.1.jar to C:\Users\User\openmrs\server2\modules\owa-1.8.1.omod [INFO] Copying serialization.xstream-omod-0.2.15-SNAPSHOT.omod to C:\Users\User\openmrs\server2\modules\serialization.xstream-0.2.15-SNAPSHOT.omod [INFO] Copying registrationapp-omod-1.13.0-SNAPSHOT.jar to C:\Users\User\openmrs\server2\modules\registrationapp-1.13.0-SNAPSHOT.omod [INFO] Copying event-omod-2.6.0.jar to C:\Users\User\openmrs\server2\modules\event-2.6.0.omod [INFO] Copying uilibrary-omod-2.0.6.jar to C:\Users\User\openmrs\server2\modules\uilibrary-2.0.6.omod [INFO] Copying htmlwidgets-omod-1.9.0.jar to C:\Users\User\openmrs\server2\modules\htmlwidgets-1.9.0.omod [INFO] Copying dataexchange-omod-1.3.2.jar to C:\Users\User\openmrs\server2\modules\dataexchange-1.3.2.omod [INFO] Copying appui-omod-1.8.0.jar to C:\Users\User\openmrs\server2\modules\appui-1.8.0.omod [INFO] Copying allergyui-omod-1.8.1-SNAPSHOT.jar to C:\Users\User\openmrs\server2\modules\allergyui-1.8.1-SNAPSHOT.omod [INFO] Copying providermanagement-omod-2.11.0-SNAPSHOT.jar to C:\Users\User\openmrs\server2\modules\providermanagement-2.11.0-SNAPSHOT.omod [INFO] Copying appointmentschedulingui-omod-1.8.0-SNAPSHOT.jar to C:\Users\User\openmrs\server2\modules\appointmentschedulingui-1.8.0-SNAPSHOT.omod [INFO] Copying formentryapp-omod-1.4.2.jar to C:\Users\User\openmrs\server2\modules\formentryapp-1.4.2.omod [INFO] Copying idgen-omod-4.4.1.jar to C:\Users\User\openmrs\server2\modules\idgen-4.4.1.omod [INFO] Copying metadatamapping-omod-1.3.5-SNAPSHOT.jar to C:\Users\User\openmrs\server2\modules\metadatamapping-1.3.5-SNAPSHOT.omod [INFO] Copying chartsearch-omod-2.1.0.jar to C:\Users\User\openmrs\server2\modules\chartsearch-2.1.0.omod [INFO] Copying htmlformentryui-omod-1.8.0-SNAPSHOT.jar to C:\Users\User\openmrs\server2\modules\htmlformentryui-1.8.0-SNAPSHOT.omod [INFO] Copying referencedemodata-omod-1.4.5-SNAPSHOT.jar to C:\Users\User\openmrs\server2\modules\referencedemodata-1.4.5-SNAPSHOT.omod [INFO] Copying emrapi-omod-1.25.0-SNAPSHOT.jar to C:\Users\User\openmrs\server2\modules\emrapi-1.25.0-SNAPSHOT.omod [INFO] Copying referenceapplication-omod-2.7.0.jar to C:\Users\User\openmrs\server2\modules\referenceapplication-2.7.0.omod [INFO] Copying htmlformentry-omod-3.4.0.jar to C:\Users\User\openmrs\server2\modules\htmlformentry-3.4.0.omod [INFO] Copying appframework-omod-2.12.0-SNAPSHOT.jar to C:\Users\User\openmrs\server2\modules\appframework-2.12.0-SNAPSHOT.omod [INFO] Copying referencemetadata-omod-2.7.2-SNAPSHOT.jar to C:\Users\User\openmrs\server2\modules\referencemetadata-2.7.2-SNAPSHOT.omod [INFO] Copying reportingui-omod-1.5.0.jar to C:\Users\User\openmrs\server2\modules\reportingui-1.5.0.omod [INFO] Copying coreapps-omod-1.20.0-SNAPSHOT.jar to C:\Users\User\openmrs\server2\modules\coreapps-1.20.0-SNAPSHOT.omod [INFO] Copying reportingcompatibility-omod-2.0.4.jar to C:\Users\User\openmrs\server2\modules\reportingcompatibility-2.0.4.omod [INFO] Copying reporting-omod-1.15.0.jar to C:\Users\User\openmrs\server2\modules\reporting-1.15.0.omod [INFO] Copying adminui-omod-1.2.2.jar to C:\Users\User\openmrs\server2\modules\adminui-1.2.2.omod [INFO] Copying registrationcore-omod-1.8.0.jar to C:\Users\User\openmrs\server2\modules\registrationcore-1.8.0.omod [INFO] Copying appointmentscheduling-omod-1.10.0-SNAPSHOT.jar to C:\Users\User\openmrs\server2\modules\appointmentscheduling-1.10.0-SNAPSHOT.omod [INFO] Copying calculation-omod-1.2.jar to C:\Users\User\openmrs\server2\modules\calculation-1.2.omod [INFO] Copying webservices.rest-omod-2.23.0-SNAPSHOT.jar to C:\Users\User\openmrs\server2\modules\webservices.rest-2.23.0-SNAPSHOT.omod [INFO] Copying atlas-omod-2.2.omod to C:\Users\User\openmrs\server2\modules\atlas-2.2.omod [INFO] Copying uicommons-omod-2.5.1.jar to C:\Users\User\openmrs\server2\modules\uicommons-2.5.1.omod [INFO] Copying uiframework-omod-3.13.0.jar to C:\Users\User\openmrs\server2\modules\uiframework-3.13.0.omod [INFO] Copying metadatasharing-omod-1.6.0-SNAPSHOT.jar to C:\Users\User\openmrs\server2\modules\metadatasharing-1.6.0-SNAPSHOT.omod

What port would you like your server to use? (default: ‘8080’):

If you want to enable remote debugging by default when running the server, specify the port number here (e.g. 1044). Leave blank to disable debugging. (Do not do this on a production server) (default: ‘no debugging’):

Which database would you like to use?:

  1. MySQL 5.6 (requires pre-installed MySQL 5.6)
  2. MySQL 5.6 in SDK docker container (requires pre-installed Docker)
  3. Existing docker container (requires pre-installed Docker)

Which one do you choose? [1/2/3]: 1

The distribution requires MySQL database. Please specify database uri (-DdbUri) (default: ‘jdbc:mysql://localhost:3306/@DBNAME@’):

Please specify database username (-DdbUser) (default: ‘root’): Please specify database password (-DdbPassword) (default: ’ '): [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 12:15 min [INFO] Finished at: 2018-04-21T23:26:33+01:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.13.0:setup (default-cli) on project standalone-pom: Failed to setup server: Failed to connect to the specified database jdbc:mysql://localhost:3306/server2?autoReconnect=true&sessionVariables=default_storage_engine%3DInnoDB&useUnicode=true&characterEncoding=UTF-8 -> [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/MojoExecutionException

my mysql server have a password, but i can’t tap it . i think this is the problem can you help me

Hi @moro

Please verify that your MySQL database is running in your system. Then check your MySQL user password for your default username(hope it should be “root”). You can check it using your CMD by typing “mysql”. It will ask your user credentials to enter.

Then retry to install the distribution server using mvn openmrs-sdk:setup. Or you can change your MySQL Server user password for this last OpenMRS server installation by changing the properties file inside the OpenMRS server location And type mvn openmrs-sdk:run to continue.

Please use Pastebin.com for the logs in the future :slight_smile:

Hope it will help you!

1 Like

i check that mysql work : https://pastebin.com/mSPPGj09

i retry to install the distribution server using mvn openmrs-sdk:setup, and i found the same error.

i don’t found where i have to change the proprties of server. in the folder of openmrs server i found three files: modules, openmrs-2.0.6, openmrs-distro.properties

Can you paste the error log at pastebin.com and then here you just provide the paste link?

1 Like

this is the error : https://pastebin.com/nintHjKN

i can’t type mysql password, i think this is the problem. any solution?

What do you mean by you cannot type the mysql password?

What command line client are you using?

i use mvn openmrs-sdk:setup comand to create a new server, I chose to run my database in mysql server. in a step, i’m asked to enter the database password : Please specify database password (-DdbPassword) (default: ’ '):

but when I type the password nothing is displayed in cmd

What command line client are you using?

command prompt

As a workaround, try to provide the password parameter.

mvn openmrs-sdk:setup -DdbPassword=“REPLACE_WITH_YOUR_PASSWORD”

it does not work, it returns the same error. I think he can not connect to the database. how can I check it

Is your server running?

Hello @moro please if you are using command prompt, the password doesn’t show when you are typing it, you just have to be sure of your MySQL password and key it in. Though it doesn’t display the password as you type it, if you type the right password it connects to the MySQL database, so don’t worry about the password not showing. If you google about it, you will come to learn that that’s how Command prompt does it, and it’s for security purposes. Hope you type the right password :slight_smile:

i type the right password, how can i check if the server is runing ?

how can i check if the server is runing ?

Please try connecting to mysql with the following:

mysql -h localhost -u root -P 3306 -p

It’s to make sure your mysql server can be accessed on localhost:3306.

(if you can’t make it work and you do not have time to investigate further, you can always install Docker and select the docker option for DB)

in the end, I formatted my pc, and I reinstalled all one zero, and it works. Thanks for your help