Source code checkout fails on Windows agents due to WinSock error

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

When running a build on Windows agents, the checkout fails with the following error in the atlassian-bamboo.log

2017-07-20 17:29:26,299 WARN [sshd-SshServer[1272c81]-nio2-thread-1] [Nio2Acceptor] Caught IOException while accepting incoming connection from /127.0.0.1:53265: An operation was attempted on something that is not a socket
java.io.IOException: An operation was attempted on something that is not a socket

Cause

This issue occurs because the WinSocks configuration needs to be refreshed to allow communication to and from the agent.

Resolution

  1. Open the Command Prompt with elevated permissions (Run as Admin)
  2. Run the following command at the command prompt: netsh winsock reset
  3. Press Enter, and restart the computer

Related bug tickets:

BAM-18569 - Improved reporting when git hangs on Windows agents due to socket error

BAM-18570 - Socket failure on Windows agents


Last modified on Jan 31, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.