Question

I have a client web application (A) who tries to get the information of another application (B) with a webservice.

I've been testing it in my local machine and all went like a charm. However, when I uploaded them to my server (CentOS 6, SELinux disabled, Firewall configuration checked) I get the following error:

wsdl error: Getting http://applicationB/?wsdl - HTTP ERROR: Couldn't open socket connection to server http://applicationB/?wsdl, Error (110): Connection timed out

Of course, "applicationB" is a valid URL.

They are in the same server. One is in appa.domain.com and the other one in appb.domain.com.

I've tried to call directly the IP of the server in stead of writing the domain name, but no luck with that neither.

If I check manually the WSDL URL, I get a well formatted WSDL file, so it's not the problem.

I've tried to connect external webservices and they work well, so I think it's a problem with having the server and client webservices in the same machine (or domain).

With that in mind, I've also tried to listen to port 81 and calling the webservice via this port, so the listening port and the requesting port would not be the same. No luck neither.

I'm stuck with this, and I cannot get more ideas to solve it or to find a workaround.

Anyone of you maybe have experienced this problem before and know how to solve it?

Thanks in advance for your time and answers!

EDIT

I've been trying to connect to my localhost webpage via command line, using Lynx browser from my server and I can't not access the page, even trying with its IP. It cannot be reached.

Maybe this could help to find out a solution.

Was it helpful?

Solution

Finally I got it working...

I post the answer here to be helpful for future users.

The problem was in the hosts server file. As @Amenadiel told me in a comment, it wasn't resolving the names.

I changed the hosts files and it seems it took more than I expected (I made the changes 3 days before and they weren't applied yet) so I discarded the hosts issues as an option. But it seems it was the only problem.

Why, then, didn't work neither when I tried to reach it using its IP? Well, it's because of the server nature. It's a server hosted in the Cloud, so it will be - for sure - a Virtual Machine.

It has a public IP (the one I was pointing to) and a private LAN IP. The server could not see the public IP, so if I was about to use one, it should have been the private (LAN) one.

Thanks again to all of you for your answers and your patience with this server side newbie!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top