Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
We have a webservice client built using axis2 1.5.1 that we use to call webservice deployed on one of our vendor's web server (Server A). The client used to work fine untill recently when the vendor added another web server (Server B) for load-balancing purposes.

Now, Server A and Server B both are hosting the same web-service that our ws client can issue requests to. The issue is that when the vendor's DNS entry is pointing to server B, we can issue requests to it and get successful responses back. When the DNS entry changes to point to Server A, our client can issue requests and get responses from it without problems. But again when the entry changes to point from Server A to Server B, we suddenly start receiving "Transport error: 503 Error: Service Unavailable" error messages from Server B.

Our WS client is running in a multi-threaded environment and IP address changes are transparent to it since it uses domain name resolution to get to the web service. I took this issue up with the Vendor and they claim that everything is fine with both their servers (they are exactly identical) and that they receive nothing on their end at the time when I get the 503 error on my end. They suspect that the problem is with my client.

I am unable to understand that this client code works perfectly when there is only one server (B) in question. It is also able to get responses when the webservice IP changes from B to A. But why does it start receiving 503s when the webservice IP changes back from A to B.

I would appreciate any responses that can help me troubleshoot this issue.
Posted
Updated 17-Aug-12 10:44am
v2
Comments
Peter_in_2780 17-Aug-12 18:43pm    
Is the webservice stateful or stateless? If it is stateful, then that might explain your problem - switching servers in the middle of a stateful transaction.

1 solution

The explanation is partly in the error code you are receiving from the Vendor. A 503 means that the request went all the way to the Vendor's systems, but their systems crashed (or threw an exception).

So your Vendor should be seeing errors as well in their systems (either in the loadbalancer or the actual webservices).

What you could try is closing the connection after every request and re-open a new one for each new request you are doing. This is not a recommended practice, but does guarrentee a 'fresh' and working connection.

You also might need to ask the vendor if it is an issue when multiple sequential request are sent to different servers, but affecting the same information. Think about first creating and then sequentially updating information.

Unfortunately you will need further help from the Vendor, as this issue is related to their systems in combination with the loadbalancer.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900