Openmrs not connecting with DB.

https://hastebin.com/ayopacowep.csharp

@shayyan this link is empty. please can you use https://pastebin.com ?

@shayyan i think Mysql 8x is not yet supported ,

like @herbert24 showed

5.6 or 5.7 should work fine .

If you want MySQL 8, you can use the openmrs platform 2.4 branch

2 Likes

I am having difficulty completing this step: https://wiki.openmrs.org/display/docs/Step+6+-+Configure+OpenMRS. I’m not sure what the cause of my error is, but every time I try to complete the steps from that link I get the following error:

Unable to create the database. The password might be incorrect or the database is not started. ???Error executing sql: create database if not exists ? default character set utf8 - Could not create connection to database server. Attempted reconnect 3 times. Giving up.???

I have tried all three installation options (simple, advanced, and testing) but have not been successful on any. Based on what I read from this issue above, I have also downgraded my mySQL version. Now I have the following specifications:

  • mysql Ver 14.14 Distrib 5.6.49
  • OpenMRS Core 2.5.0
  • tomcat 8.5.58
  • mvn 3.6.3

I am working on a windows device, but through Ubuntu 20.04. I’ve double checked and my mySQL is active. I appreciate any help or suggestions!

i dont think we have openmrs 2.5.0 yet,we are on OpenMRS_Platform_2.4.0-alpha.2 which runs with mysql 8 ie the latest version of mysql.get the alpha here OpenMRS - Browse /prereleases/OpenMRS_Platform_2.4.0-alpha.2 at SourceForge.net or switch to mysql 5.7 version

@dedrickt Can you post the OpenMRS log file to pastebin.com or a similar site. Usually there’s a buried exception with more detail on what, exactly, failed.

Thank you both for your responses!

@ibacher I’m not sure what log file you are referring to. I have located an openmrs.log file in the directory /git/openmrs-core/webapp, but when I opened the file, there was no content. I will keep looking to see if I can identify a reason for that.

@herbert24 Originally I had mySQL version 8, but downgraded to 5.6 because that was recommended in the developer installation guide. I’m also not sure how I ended up with the wrong OpenMRS version. I can try to download the one from the link you sent and will let you know if it works!

1 Like

ping me incase you still have challenges and i help you via call @dedrickt

Thank you @herbert24! I spoke with Jessie (whom you met with for a similar error) and tried to walk through the process you two did. I installed the openmrs-sdk, but when I run:

mvn openmrs-sdk:run

I get a build failure and it says: [ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.13.6:run (default-cli) on project openmrs: Execution default-cli of goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.13.6:run failed: Failed running Tomcat -> [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/PluginExecutionException

If this isn’t something that is easy to fix via messages, I would be happy to call, I appreciate your offer!

paste the full logs here,https://pastebin.com/ i cant get any thing from the link you shared here

Yes, sorry. Here is the link https://pastebin.com/SniqTpWR

in your logs are you able to see this line The JDK 14.0.2 is not compatible with OpenMRS Platform 2.3.2. -> [Help 1]?

1 Like

down grade to java 8 and run again!

tarad@tarad-VirtualBox:~/git/openmrs-core$ java -version openjdk version “1.8.0_272” OpenJDK Runtime Environment (build 1.8.0_272-8u272-b10-0ubuntu1~20.04-b10) OpenJDK 64-Bit Server VM (build 25.272-b10, mixed mode)

I’m not sure why it isn’t at Java 8 already. I thought I had downgraded it a while ago and when I check the version it says its 1.8.

set up the environment variables to pint at java 8

I was able to get it to deploy after running

JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

But, when I went to the browser, I got an error that the handshake failed.

re start your computer and run mvn openmrs-sdk:run again

I had the same error as before. The build failed until I typed the path command again. Then the handshake failed when I tried to open it up in the browser

1 Like

what happens when you restart your pc

@dedrickt I looks like you’re trying to configure both the OpenMRS web server and the debugger to work on port 8081. The two of these need to be run on separate ports. The easiest way to change this would be to run:

mvn openmrs-sdk:reset -DserverId=openmrsserver

and setup the webserver to run on 8081 and then the debugger to listen on a different port (e.g., 1481). You then point your debugger to that port rather than 8081.

2 Likes