0

Web Server: Apache Tomcat 8.5
Operating System: Windows Server 2012 R2
Port: 9721

We are running a Web server on our internal network and have about 8500 kiosks connecting through our VPN to a Java servlet that is running on this port: :9721

This Web server was set up by a former employee and we are not sure how it was originally configured.

We noticed recently that about 25% of the connection attempts are being refused (Connection Refused error). We found this information by monitoring Port 9721 using PRTG and this monitoring tool is reporting that this port is refusing connections on multiple occasions within each hour throughout the day. I have not been able to find a pattern to the refused connections...it appears to be intermittent.

Our network administrator says it is not a firewall issue, but I have not ruled out this possibility. We have tried to review the "maxconnections" setting in the Tomcat server.xml configuration file, but cannot find the "maxconnections" attribute included in that configuration file. We do not have the Tomcat Manager Application installed on this server that I can find.

How do I troubleshoot and resolve this port connection issue?

1 Answers1

1

To identify what is the issue here I would go for mix of monitoring and testing the situation using following steps:

  1. create PRTG sensor which will tell you how many TCP connections you have currently connected to port 9721. To achieve that we will create powershell file in PRTG installation (EXE/show-connections.ps1) containging following:

    Invoke-Command -ComputerName ToBeReplacedWithWebServerHostname -ScriptBlock { $CountConnections = $(Get-NetTCPConnection -LocalPort 9721).Count echo "0:$CountConnections Info sensor only - we have currently $CountConnections clients connected to port 9721" }

Schedule this sensor to run each 30 seconds to give you information twice a minute

  1. Run Jmeter remotely on that server against port 9721 and make sure that you don't get any connection refuse using 100, 1000 and 10000 simultanious connections. I bet if you run 10k test you will reach maximum and you will see that PRTG sensor shows you how many max connections you can use at once

I believe that PRTG sensor will never fail to connect to server - meaning that there is no issue on that Windows firewall, but i believe you will hit the application server (Tomcat) limit and following article could help you to try to tune few parameters:

Apache Tomcat Connection Refused error while load testing with 1000 users using JMeter

Let me know if you have more questions regarding PRTG/PowerShell or JMeter. And let me know if you found the issue

jana
  • 11
  • 2
  • Thanks for your detailed advice. I will work with our network administrator to implement the PRTG monitor and to run Jmeter as you suggested. – Scott Knaub Aug 13 '20 at 11:46