username and password does not work

Application Name: Platform

Version Number: 2.1.4

I have installed OpenMRS Platform WAR version 2.1.4. I have received the message “OpenMRS Platform Running!”.

Now I’m trying to get a simple information (to check everything is working fine) using the following command: http://localhost:2222/openmrs_22/ws/rest/v1/person?q=john

(The tomcat is on port 2222, and I’ve used path openmrs_22 for deploying)

When I search for this, the site asks for username and password. I’ve checked ‘admin’ and ‘admin’, ‘admin’ and ‘Admin123’, ‘root’ and ‘openmrs’ but none of them worked. What is the username and password here? How should I find them?

P.S. In the tomcat-users.xml file, I have the following commands:

<role rolename="tomcat"/>                                                    
<role rolename="admin"/>                                                     
<role rolename="manager"/>                                                   
<role rolename="manager-gui"/>
<user name="admin" password="admin" roles="tomcat,admin,manager,manager-gui"/>

I also have JDK 8 and tomcat7.

Dear @roozbeh,

Run http://localhost:2222 to access tomcat then that’s when u could login into its dashboard using the roles stated above

As for Openmrs run http://localhost:2222/openmrs_22 provide username: admin password: Admin123 then if you’re looking at testing Rest-end point, Use postman

Dear @abertnamanya, thanks for your reply. I can access both http://localhost:2222 and http://localhost:2222/openmrs_22 and there is no problem.

The problem is when I want to go on http://localhost:2222/openmrs_22/ws/rest/v1/person?q=john, because it asks for user and password. I checked with all possible users and passwords (including the ones you mention) but it is not the case! I want to run a performance test. I’m using JMeter to access to the same page and search for persons, but my test also fails (probably duo to the same reason).

I’m wondering what is this user and password at the Rest-end point?!

When I click at “Cancel”, I’ll get this error: authorization_error -

So I think it is about OpenMRS authenticating.

But I already checked the usual user and passwords (such as “admin” and “Admin123”).

Could you change the authentication type to basic and provide the username and password as shown in the above screenshot

I haven’t used JMeter before but try to check where to put the basic auth in that software