Menu

Fixing: Unable to Establish Connection to the server

In this example case, we ran into a situation where a load engine could not resolve the hostname of the server being tested, even though Load Tester was able to record & replay against the server without any difficulty. This problem appears immediately, but only when running a Load Test with the troubled load engine. By using the Engines View in Load Tester, we were able to select and use each Load Engine separately in a Load Test, until the faulty engine had been isolated (this sort of problem will show errors coming back from the engine within seconds, and no network traffic with the server when no engine is able to open a connection to the server).

With the faulty engine isolated, we can test the connection to the intended server with ping, or by opening a web browser. Using a simple ping in this case gives the error message: “Unknown Host”. In this case, the problem is a faulty DNS configuration for the load engine, preventing it from looking up names as expected. Without diving deep into OS configuration changes, Load Tester does also provide a quick way to resolve the problem. We’ve discussed in the past Load Tester’s custom HOSTS file, which synchronizes user defined hostnames with every engine. But in this case, having to keep the IP address of the server stored in a separate file seems error-prone, as this could get out of sync with the server’s actual IP address. To ease this problem, Load Tester’s HOSTs file allows entry of other hostnames as well as IP addresses. This allows one to alias a hostname to another hostname. Finally, this gives us a quick way to handle the problem from Load Tester. Simply add the following line to your Load Tester custom hosts file:

foohost	foohost #lookup IP locally for load engines

In this configuration, foohost is aliased to itself. This will have no effect for Load Tester itself, but when preparing for a load test, Load Tester will automatically lookup the current IP for foohost (from the workstation running Load Tester), and pass that IP address to all load engines as the address for foohost. With this change to Load Tester, all load engines will now be able to resolve the correct host during a load test.

I hope this example case has been insightful. Of course, if you have questions on using Load Tester, our friendly support staff is more than happy to answer them!

Happy Testing!
-Frank, Engineer at Web Performance

Add Your Comment

You must be logged in to post a comment.

Resources

Copyright © 2019 Web Performance, Inc.

A Durham web design company

×

(1) 919-845-7601 9AM-5PM EST

Just complete this form and we will get back to you as soon as possible with a quote. Please note: Technical support questions should be posted to our online support system.

About You
What you Need