Troubleshoot "[Errno 111] Connection refused" error when installing Tomcat plugins
When installing
Tomcat plugins, you may encounter the following error:
We failed to reach a server. Reason: [Errno 111] Connection refused: This error indicates that your client is unable to establish a connection to the Tomcat Manager URL, but the connection is not being accepted by the Tomcat server. The Tomcat Manager application is typically used to manage and deploy web applications on a Tomcat server. Here are some ways you can troubleshoot and resolve this issue:
- Check the status of Tomcat: Verify if Tomcat is up and running by accessing its default page using a web browser: http://localhost:8080. If you cannot reach the default Tomcat page, this suggests potential issues with Tomcat itself.
- Validate the Tomcat Manager configuration: Ensure that the Tomcat Manager application is configured correctly. Check the <Context> element for the Tomcat Manager in the server.xml configuration file. The configuration should look like this:
<Context path="/manager" docBase="manager" privileged="true"/>
Also, in the server.xml file, look for the Connector configuration for the HTTP connector. Ensure that the address attribute is set to 0.0.0.0 to allow connections from any IP address. For example:
<Connector port="8080" protocol="HTTP/1.1" address="0.0.0.0" ... />
- Confirm the Tomcat Manager application path: If you're trying to access the Tomcat Manager application at a specific context path (e.g., /manager), ensure that the path is correct and aligns with the configuration in the server.xml file.
- Verify the port setting of Tomcat Manager: Check the configuration of Tomcat Manager to confirm that it is listening on the designated port (typically port 8080). If you have customized Tomcat to use a different port, ensure you use the appropriate URL.
- Restart Tomcat: Sometimes, a straightforward restart of Tomcat can effectively resolve temporary issues contributing to the connection problem.
- Check for context path conflicts: If you have additional applications deployed on Tomcat that might clash with the Tomcat Manager's context path, it could result in issues. Ensure that there are no conflicting configurations.
- Test connectivity: You can try to test connectivity to confirm there are no issues using curl.
For example:
curl http://localhost:8080/manager
Once you've made changes based on the checks above, restart the Site24x7 server monitoring agent or re-register the plugin. Within five minutes, you should be able to view performance metrics in Site24x7.
Related Articles
Troubleshoot "[Errno 111] Connection refused" error for RabbitMQ plugins
When installing the RabbitMQ plugin, you may encounter the following error: urlopen error [Errno 111] Connection refused: This error usually occurs when the plugin tries to connect with the RabbitMQ server but is unable to establish a connection. ...
Troubleshoot the Unauthorized user (Error 401) when installing Tomcat plugins
When installing Tomcat plugins, you may encounter the following error: 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 ...
Troubleshoot the "ORA-12514" error when installing Oracle plugins
When installing the Oracle database monitoring plugins, you may encounter the following error: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor: This error typically occurs during attempts to establish a ...
Troubleshoot connection errors in the MySQL plugin
When configuring the MySQL plugin, you may encounter the following errors: Error : Connection Error - This error typically indicates that there is a problem establishing a connection to the database. Sometimes, this message is supplemented with an ...
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 ...