SMB Upload on TeamCity build step failing due to connect timeout
Repost from StackOverflow as there's no joy there!
Been using TeamCity (2018.2.2 (build 61245)) to deploy a website via a Git repo. It has three build steps and it's suddenly failing on the second, the SMB Upload step:
[07:33:02]Step 1/3: Clear folder (Command Line) (3s)
[07:33:04][Step 1/3] Starting: C:\TeamCity\buildAgent\temp\agentTmp\custom_script4232052461125577569.cmd
[07:33:04][Step 1/3] in directory: C:\TeamCity\buildAgent\work\f5f9b0bd3b4556c2
[07:33:05][Step 1/3] Process exited with code 0
[07:33:06]Step 2/3: SMB Upload (6s)
[07:33:07][Step 2/3] Starting upload via SMB to \\SERVERNAME\folder_name
[07:33:12][Step 2/3] Deployment problem: connect timed out
[07:33:12][Step 2/3] Step SMB Upload failed
I can't get any more details that this and I'm tearing out my hair to try and fix it as we can't do anything until this works!
\\SERVERNAME\folder_name is a valid path and share, and SMB is enabled as a protocol on that share. We're using an Amazon AWS EC2 Windows Server 2008, and I checked SMBv1 is enabled.
The only change that was made was we enabled TLS1.2 (instead of the working 1.1 we had), and after reboot this stopped working.
Any ideas? The only similar question I found was TeamCity SMB deployer - failed to connect via SMB protocol and that has a rather unhelpful solution!
Please sign in to leave a comment.
Hi Edie,
While TeamCity would have a connection timeout, I can assure it's not 5 seconds, as your log would seem to imply. There's a couple things that we can look here to see what's going on. First of all, please check with the remote server whether it logged something. Second, please enable agent-side debug (https://confluence.jetbrains.com/display/TCD18/Viewing+Build+Agent+Logs#ViewingBuildAgentLogs-GenericDebugLogging) and see whether the agent logs contain any more relevant information.
Third, please follow the steps here: https://confluence.jetbrains.com/display/TCD18/Common+Problems#CommonProblems-BuildworkslocallybutfailsormisbehavesinTeamCity
If the issue happened just after switching from TLS 1.1 to 1.2, please also tell us which java version you are using to run the agent. As far as I am aware, the default should work with TLS 1.2, but we would need the information if we are to investigate this further.
Thanks very much for this reply Denis, it will take me a little time to follow these steps and gather this information.
Interestingly, I had a thought and changed \\SERVERNAME\folder_name to \\127.0.0.1\folder_name, and this works if we copy the files to the same server and use the localhost IP.
I shall get back to you!
Thanks again.