Troubleshoot the Unauthorized user (Error 401) when installing Tomcat plugins
 Unauthorized user. Does not have permissions. HTTP Error 401: This error usually occurs when the user accessing the Tomcat Manager application does not have the necessary permissions.
Unauthorized user. Does not have permissions. HTTP Error 401: This error usually occurs when the user accessing the Tomcat Manager application does not have the necessary permissions.
Follow the below steps to troubleshoot the error and resolve the issue.
- Verify the tomcat-users.xml configuration: Open the tomcat-users.xml file located in your Tomcat installation's conf directory. This file governs user authentication and roles. Ensure you assign the appropriate roles to the intended user accessing the Tomcat Manager application, as shown below:
 
 <user username="user" password="password" roles="manager-gui,admin-gui"/>
 <user username="user" password="password" roles="manager-script"/>
 
 Replace user and password within quotes with the actual username and password you want to use.
 
 
- Restart Tomcat: After modifying the tomcat-users.xml file, restart Tomcat for the changes to take effect.
 
 
- Validate the URL: Ensure that you are accessing the Tomcat Manager application using the correct URL. Typically, the URL should look something like http://localhost:8080/manager if you are accessing it locally.
 
 
- Check the credentials configured in the Tomcat plugins: Ensure you have entered the correct username and password as defined in the tomcat-users.xml file.
 
 
- Verify the role names: Ensure that the role names in the tomcat-users.xml file match the roles expected by the Tomcat Manager application. These role names are case-sensitive.
 
 
- Validate the configuration files: Review the server.xml file and ensure that the <Context> element for the Tomcat Manager application is properly configured and points to the correct directory. It should look something like this:
 
 <Context path="/manager" docBase="manager" privileged="true"/>
 
 
- Check for typos: Ensure there are no typos in the URLs, usernames, passwords, or role names.
 
 
- Check for security constraints: If you have any security constraints in the web.xml files of your web applications, ensure that they are not unintentionally restricting access to the Tomcat Manager.
 
- Related Articles
- Troubleshoot the Error 404 and Error 99 for RabbitMQ- When installing the RabbitMQ plugin, you may encounter the following errors: HTTP Error 404: Not Found: This error usually occurs when Site24x7's RabbitMQ monitoring plugin attempts to access the /api/overview page of RabbitMQ, but the resource ... 
- Troubleshoot the "pymysql module not found" error when installing the MySQL plugin- If you're encountering the pymysql module not found error, it likely means that the pymysql Python library is not installed on the server. pymysql is a Python package that provides a way to interact with MySQL databases using Python code and is used ... 
- API exceeded error- Why do I get an API exceeded error after a few attempts? Every API has a certain limit to the number of requests a user can hit within a period of time, called the rate limit. An error message is triggered when a user does one of the following ... 
- How to configure the NGINX status page for monitoring NGINX performance- The NGINX plugin uses the NGINX status page to pull the performance metrics of the NGINX server. You may encounter the following errors while installing the NGINX plugin integration: Error_code : HTTP Error 404: This error usually indicates that the ... 
- FAQ on Custom Roles- What is the Created permission and what does it allow users to do? The Created permission is a specific type of access control that permits users to perform actions such as View, Write, or Delete solely on the modules, like dashboard, that they have ...