Some of the recent work I've been doing required the use of SoapUI to do some basic load testing. When I first started this, every request I tried sending to the server was taking 30+ seconds to complete. This really stumped me because another, pretty much identical environment would respond immediately. I've finally tracked down the issue to DNS.
The environment I was trying to access was rarely used via SoapUI, so naturally I did not bother configuring its IP and hostname in the /etc/hosts
file. So I simply used the IP address for the web service endpoint I was accessing and thought that should be sufficient. It turns out, however, that SoapUI tries to do a DNS lookup on the IP address and as this was an internal address, the network name server would not respond for a long time. This is where the delay was coming from.
The solution was to add the IP address to the hosts file. The hostname doesn't actually matter in this case, it can be anything. Once this is done, SoapUI started establishing connections to the server instantly.
A quick disclaimer...
Although I put in a great effort into researching all the topics I cover, mistakes can happen.
Use of any information from my blog posts should be at own risk and I do not hold any liability towards any information misuse or damages caused by following any of my posts.
All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle).
Use of any information contained in this blog post/article is subject to this disclaimer