JBOSS 6 Azure Maps SocketException: Connection Reset

Avitansh Sharma 21 Reputation points

When making a call to the following API: https://atlas.microsoft.com/search/address/json?&subscription-key=subscription-key&language=en-US&countrySet=US&api-version=1.0&query=+81114

(am omitting the subscription-key param but the correct key is being appended).

We are seeing the following error being thrown: java.net.SocketException: Connection reset and we are not able to make any requests to the above api in the application. We are attempting to make this call in Java 7 using a JBOSS 6 server.

We do have another application that uses Java 8 and JBOSS 7 and we are not seeing this error and are able to make a connection to the above API.

We are wondering if this error is because of the use of JBOSS 6 or Java 7 and if there is potential workaround when using either.

Here is the code snippet we are using to make this call that is working in JBOSS 7/Java8 application but the same code snippet is throwing the error above in the JBOSS6/Java 7 application:


Azure Firewall
Azure Firewall
An Azure network security service that is used to protect Azure Virtual Network resources.
580 questions
Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
599 questions
{count} votes

Accepted answer
  1. rbrundritt 15,471 Reputation points Microsoft Employee

    A couple of things to verify;

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Evan Chatter 11 Reputation points

    SocketException:Connection reset simply means that a TCP RST was received. TCP RST packet is that the remote side telling you the connection on which the previous TCP packet is sent is not recognized, maybe the connection has closed, maybe the port is not open, and something like these. A reset packet is simply one with no payload and with the RST bit set in the TCP header flags.

    The following are possible causes for the error:

    • More commonly, it is caused by writing to a connection that the other end has already closed normally. In other words an application protocol error.
    • A Reset (RST) packet is received from a remote machine and interrupts the established connection. The sent RST packets may indicate that the TCP packets sent are not recognized, a connection between the local and remote machine is broken, or a particular port is closed and is not allowing for communication.
    • The TCP (Transmission Control Protocol) socket is closed because the socket received a close command from a remote machine.
    • The other end has deliberately reset the connection. It is rarely happens, and generally incorrect, for application software to do this, but it is not unknown for commercial software.
    • It can also be caused by closing a socket when there is unread data in the socket receive buffer.
    0 comments No comments