Can't access data after installing OpenMRS core using docker

Hi there, I’ve installed the OpenMRS core 2.6.3 using Docker. I’m able to access it on localhost:8080/openmrs/

Now my issue is when I want to send some requests to it. I use JMeter and I’m sure about the script (it was successfully tested on OpenMRS 2.2.1 which was installed manually).

The error I’m getting from JMeter:

HTTP Status 404 – Not Found: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

The error I’m getting from openmrs container logs:

WARN - DispatcherServlet.noHandlerFound(1283) |2024-01-18T14:59:11,179| No mapping for POST /openmrs/ws/rest/v1/person

WARN - DispatcherServlet.noHandlerFound(1283) |2024-01-18T14:59:11,334| No mapping for GET /openmrs/ws/rest/v1/person/dda9c66c-1691-11df-97a5-7038c432aabf

Any idea what this “no mapping” should refer to?

I really appreciate any help! Thanks in advance!

p.s. I get the same error when want to access data (for example, GET http://localhost:8080/openmrs/ws/rest/v1/person?q=all) from browser or curl. I’m using admin and Admin123 as username and password.

Have you tried to creat your own data Plus did launch it on browser so that it can build the database and all the demo data

Coz its the same process as the ref app 2

Which mysql verson are you working with Or is it any other server

Thanks for your reply @josephbate!

I just build it using the following commands:

  1. sudo docker pull openmrs/openmrs-core:2.6.3
  2. sudo TAG=2.6.3 docker-compose -f docker-compose.yml up

It creates 2 containers: one for openmrs core codes and one for mariadb. Here’s the info of the docker containers:

Images: openmrs/openmrs-core:2.6.3; mariadb:10.3

I am able to access it on my browser:

However, I can’t access the data.

And yes, the demo data is automatically updated. I can see all the tables and data on the mariadb container.

The OpenMRS Core Docker image is just the OpenMRS WAR file without any modules whatsoever. There is no user interface (other than the wizard) nor is there any other web interface, such as REST. That is almost certainly not the container you want to be using. You probably want to be using some variation of the Reference Application, which is probably what you used in the past.

The OpenMRS Core Docker image is primarily intended for developers working on the core itself.

@ibacher Super thanks for your help!

I was checking the other distributions and I tried Reference Application as well. The way I’m trying to install it now is:

  1. GitHub - openmrs/openmrs-distro-referenceapplication: The reference distribution of the OpenMRS EMR application (v3)
  2. docker-compose build
  3. docker-compose up

However, I’m getting some errors while installing from the backend container:

And the backend container keeps restarting.

Am I getting the wrong version again?

Thanks for your time in advance!

P.S. My docker has sudo permissions.

I would run docker compose down -v in the same directory. While Docker may run under root, newer versions of OpenMRS no longer do and it seems like you may have an existing volume (openmrs-data) that requires root permissions rather than those associated with the limited user we use.

1 Like

Yes you’re right!

I was able to correctly run it after a clean start (removing all the containers, images, and volumes).

@ibacher Thanks a lot!