5

I have a TeamCity instance running with 4 build agents. 3 are dedicated to our website and service deployments, while 1 is dedicated to our silverlight application. We use a lot of powershell scripts to compile, start, stop, and move compiled files between servers.

For the most part everything works great. A few weeks ago, we started seeing all of our builds failing with errors only during Powershell steps:

[15:38:52]Step 2/8: Create Website Web (Powershell) (1s)
[15:38:52]  [Step 2/8] ##teamcity[buildStatisticValue key='buildStageDuration:buildStepRUNNER_45' value='0.0']
[15:38:52]  [Step 2/8] PowerShell Executable: [ REDACTED ]
[15:38:52]  [Step 2/8] Working directory: [ REDACTED ]
[15:38:52]  [Step 2/8] PowerShell arguments: [ REDACTED]
[15:38:54]  [Step 2/8] Error connecting to agent: Bad address
[15:38:54]  [Step 2/8] Site Already Exists
[15:38:54]  [Step 2/8] Process exited with code 0
[15:38:54]  [Step 2/8] ##teamcity[buildStatisticValue key='buildStageDuration:buildStepRUNNER_45' value='1690.0']
[15:38:54]Step 3/8:  [ REDACTED ] Publishing (Powershell) (6s)
[15:38:54]  [Step 3/8] ##teamcity[buildStatisticValue key='buildStageDuration:buildStepRUNNER_38' value='0.0']
[15:38:54]  [Step 3/8] PowerShell Executable:  [ REDACTED ]
[15:38:54]  [Step 3/8] Working directory:  [ REDACTED ]
[15:38:54]  [Step 3/8] PowerShell arguments: [ REDACTED ]
[15:38:56]  [Step 3/8] Error connecting to agent: Bad address
[15:38:56]  [Step 3/8] 
[15:38:56]  [Step 3/8] -------------------------------------------------------------------------------
[15:38:56]  [Step 3/8]    ROBOCOPY     ::     Robust File Copy for Windows                              
[15:38:56]  [Step 3/8] -------------------------------------------------------------------------------
...

While all of the steps are configured to proceed "If previous steps completed successfully", we see the above error for all of the Powershell steps in the build configuration, despite previous powershell failures.

The issue is temporarily resolved when the server running TeamCity is restarted. We have resolved the issue permanently (it seems) by setting the Build Agents to run under a System Administrators account, other than a dedicated Build Service account we were previously using. We do not like this as a permanent solution though. This implies to me that the problem lies with the account running the build agents, and not necessarily with TeamCity itself, which might make this question more topical for SuperUser StackExchange.

In case it's relevant, we use ActiveDirectory to manage user accounts.

closed as unclear what you're asking by 030, Pierre.Vriens, Jiri Klouda, Tensibai Oct 3 '17 at 8:14

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Sound like a dns problem or an IPv6 one. Didn't an update enables IPv6 and the agent doesn't understand it ? – Tensibai Mar 15 '17 at 20:10
  • Another cause I think of with a normal user is trying to use low level ports (< 32512) with a normal user on win2k8 after a specific update to conform to IERF rules, but I can't remember the KB exactly. Which flavor of windows are you running (on central an agents) – Tensibai Mar 15 '17 at 20:14
  • @Tensibai it's a windows server 2012 virtual machine. Would a DNS or IPv6 issue take few days after restart to show up? That's the really perplexing part, for me. – dckuehn Mar 15 '17 at 21:35
  • It's just a guess from the bad address message :) – Tensibai Mar 15 '17 at 21:36
  • I'll be closing this question as unclear what you're asking as we can't guess if your network is properly set up and if it not a DNS scavenging problem. Do you have new informations to add before this or is this question not relevant anymore ? – Tensibai Jun 8 '17 at 12:46

Browse other questions tagged or ask your own question.