OpenMRS SDK installation_BUILD FAILURE_Failed to setup server

Hello everyone, wondering if any one has ever bumped into this problem while installing the openMRS SDK.

Preparing ‘openmrs-sdk-mysql-v3-2’ DB docker container… [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 03:15 min [INFO] Finished at: 2023-10-04T18:12:18+03:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:5.2.0:setup (default-cli) on project standalone-pom: Failed to setup server: Unable to execute mojo: Execution null of goal org.openmrs.maven.plugins:openmrs-sdk-docker-maven-plugin:5.2.0:create-mysql failed: Unsupported protocol scheme found: 'http://127.0.0.1:2375/ → [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] MojoExecutionException - Apache Maven - Apache Software Foundation

I have tried reading different resources but i haven’t been successful at solving the problem.

Will be glad if someone has some way round thank you very much

1 Like

Do you have MySQL 5.6 & above installed?(would be good to) If yes, then you could choose “option 1” for the database option? And see if it works…

Is this of any help? FIX: SDK Update tcp protocol on docker host

3 Likes

Actually mysql is very fine its actually above 5.6

1 Like

This partly worked but i ran into another error. If there is any solution it would be of help otherwise i have deleted and reinstalled the sdk several times, but it keeps telling when i go to create the openmrs server - docker mysql it keeps on telling me the pom is missing and truly when i check it aint there.

[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 14.492 s [INFO] Finished at: 2023-10-05T17:19:05+03:00 [INFO] ------------------------------------------------------------------------ [ERROR] No plugin found for prefix ‘openmrs=sdk’ in the current project and in the plugin groups [org.openmrs.maven.plugins, org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\Kingdom.m2\repository), openmrs-repo (JFrog), central (Central Repository:)] → [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] NoPluginFoundForPrefixException - Apache Maven - Apache Software Foundation

i checked the given link, but it was not of great help

1 Like

You ran mvn openmrs=sdk instead of mvn openmrs-sdk, hence the error.

2 Likes

Thank you very much, really hadn’t noted that very true thanks very much. However i ran in a problem which i had thought was solved when i changed to tcp instead of https

Preparing ‘openmrs-sdk-mysql-v3-2’ DB docker container… [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 55.914 s [INFO] Finished at: 2023-10-05T20:35:05+03:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:5.2.0:setup (default-cli) on project standalone-pom: Failed to setup server: [ERROR] [ERROR] [ERROR] Could not connect to Docker at tcp://localhost:2375 [ERROR] [ERROR] Please make sure Docker is running. [ERROR] [ERROR] If you are using ‘Docker Toolbox’, please make sure you run the SDK command [ERROR] from the ‘Docker Toolbox’ terminal. [ERROR] [ERROR] If your Docker is running, try resetting the Docker host by running setup with -DdockerHost parameter. [ERROR] [ERROR] You can also set it manually by adding -DdockerHost=“tcp://correct/url”: org.apache.hc.client5.http.HttpHostConnectException: Connect to http://localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: no further information [ERROR] → [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] MojoExecutionException - Apache Maven - Apache Software Foundation PS C:\Users\Kingdom\openmrs>

1 Like

Make sure you have the “Expose daemon on tcp://localhost:2375 without TLS” option enabled in Docker Desktop.

2 Likes

Yes i did enable the expose daemon option in docker however it didn’t change anything am still stack on that set. If you can further help i will be glad

1 Like

Assuming all the prerequisites are met, can you restart your Docker Desktop( assuming Docker is fully initialized and the Docker daemon is up and running) and then re run the sdk setup cmd.

otherwise, share the error log here

1 Like

Hi,i have tried out alot regarding this issue for the past days atleast today i was abit successful but middle way i get another error, your help is highly appreciated apologies for asking alot but i working towards having this rectified thank you very much.

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

Preparing ‘openmrs-sdk-mysql-v3-2’ DB docker container… [INFO] Started downloading mysql:5.6 image … [INFO] Finished!

Starting ‘openmrs-sdk-mysql-v3-2’ DB docker container… [INFO] Trying to connect to the DB… [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 11:13 min [INFO] Finished at: 2023-10-12T17:25:47+03:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:5.3.0:setup (default-cli) on project standalone-pom: Failed to setup server: Failed to connect to the DB in the ‘openmrs-sdk-mysql-v3-2’ container at ‘jdbc:mysql://localhost:3308’ → [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] MojoExecutionException - Apache Maven - Apache Software Foundation

1 Like

Thanks all finally i have finally figured it out. In the last step after getting the mysql container in docker i had to run it as well then rerun the mvn openmrs-sdk:setup then the rest of process just goes on smoothly thank you very much

2 Likes

cool

how did you go about the un connection to docker tcp://localhost:2375 ??

about the current error, re run the sdk setup cmd

Happy coding to save lives! :grinning:

2 Likes

I have been facing similar issue this weeek

bro help me out. I

have the docker installed, MySQL bench and i have linked the data base but I’m still getting this error

Firstly in your docker, make sure you run the mysql image, then rerun the setup. It will work like a charm. Come back if it doesn’t work.

Man, I think we need to use TeamViewer and u try for me cause I have tried the whole night. with the images well set and the docker running. I think it’s only failing

on the last step. I have tried other manual ways of entering the URI to link the database but it’s giving me a related error. I’m using core i3. I guess that has nothing to do with compatibility. since other installations have run just fine.

Oh sure Steven team viewer has no problem we can do that. Otherwise you must ran the image of the database within docker then u install the sdk again

Hi @dkayiwa, @ibacher @anderson12 I am trying to have openmrs run on docker on Ubuntu 22.04 LTS. Surprisingly, it throws a strange error Execution null of goal org.openmrs.maven.plugins:openmrs-sdk-docker-maven-plugin:5.9.0:create-mysql failed: Status 404: {"message":"No such image: mysql:5.6"} -> [Help 1]. I have docker-desktop running properly.