Error: Unable to process request. java.net.SocketException: Connection reset by peer: socket write error
When encountering a network issue, the following error is generally returned in ArcGIS Server logs.
"Unable to process request. java.net.SocketException: Connection reset by peer: socket write error"
The following are possible causes for the error:
- The error occurs when a connection is closed abruptly (when a TCP connection is reset while there is still data in the send buffer). The condition is very similar to a much more common 'Connection reset by peer'. It can happen sporadically when connecting over the Internet, but also systematically if the timing is right (for example, with keep-alive connections on localhost).
- The Transmission Control Protocol (TCP) socket is closed because the socket received a close command from a remote database machine.
- 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 database machine is broken, or a particular port is closed and is not allowing communication.
- There is a timeout or a restart of the remote database. If there is an idle timeout or if the machine with the database is restarted, the database becomes unreachable.
Solution or Workaround
Run the ping command to determine if the remote machine is reachable.
- Navigate to Windows Start.
- Type cmd in the Search programs and files search bar.
- Click cmd from the search results.
- In the command line, type ping followed by the remote server address, and press Enter. The following is an example of a successful ping request.
Note: Even if the results are successful, there are instances where the target machine does not respond and can still return a successful ping result. The data returned can help determine if there are any communication issues between the remote machine and the local machine.
- Run the tracert command to diagnose if and where the lapse in communications is happening:
- Follow Steps 1 through 3 from above.
- For Step 4, in the command line, type tracert followed by the destination address, and press Enter. The following is an example of a successful tracert request.
Note: The tracert command is similar to the ping command; however, the tracert command displays in detail all the routes taken to establish a connection with the target machine.
- Run the telnet command to check if the ports are open on the local machine.
- Follow Steps 1 through 3 from above.
- For Step 4, in the command line, type telnet, followed by the destination address. This can be the local computer name or IP address, followed by the port number. Press Enter.
Note: If successful, the screen turns blank, indicating the port is open; however, if the port is closed, the following message is returned.
Note: The telnet feature can be enabled on a Windows machine by navigating to Windows Start > Control Panel > Programs (and Features). On the left sidebar, click Turn Windows features on or off, and ensure the Telnet Client check box is checked. Click OK.
- Run SDEINTERCEPT to diagnose ArcSDE performance and connection issues. The following technical document describes this process in detail:
HowTo: Diagnose ArcSDE connection and performance issues using SDEINTERCEPT.
Note: If the cause of the issue is identified to be the database server, contact a database administrator (DBA) for further troubleshooting.
- ArcGIS for Server: Ports used by ArcGIS Server
- ArcGIS for Server: Configuring a secure environment for ArcGIS Server
- Esri: Tracing ArcSDE Queries with SQL Profiler
- Official reasons for “Software caused connection abort: socket write error”
- StackOverflow Thread: java.net.SocketException: Software caused connection abort: recv failed
- HowTo: Diagnose ArcSDE connection and performance issues using SDEINTERCEPT
Last Published: 5/9/2019
Article ID: 000012876
Software: ArcGIS GeoEvent Server 10.3.1, 10.3 ArcGIS Image Server 10.3.1, 10.3 ArcGIS Server 10.3.1, 10.3