microsoft / azure-pipelines-agent

Azure Pipelines Agent 🚀
MIT License
1.72k stars 867 forks source link

Build not starting #995

Closed DerKnerd closed 7 years ago

DerKnerd commented 7 years ago

Our VSTS agent fails on every build try, the log is at the bottom. Can you help me? The TFS has three URLs that map all to the same server, might that be a problem?

Agent version and platform

Version of your agent? 2.116.1
OS of the machine running the agent? Windows

VSTS type and version

On-Prem TFS?
If On-Prem TFS, which release, 15.105.25910.0

What's not working?

Please include error messages and screenshots

Agent and Worker's diag log

Here is the log

[2017-05-26 11:17:33Z INFO Program] Version: 2.116.1
[2017-05-26 11:17:33Z INFO Program] Commit: 97d24c06f50530502e58d2fdb6e52815bc8da213
[2017-05-26 11:17:33Z INFO Program] Culture: de-DE
[2017-05-26 11:17:33Z INFO Program] UI Culture: de-DE
[2017-05-26 11:17:33Z INFO ProxyConfiguration] No proxy setting found.
[2017-05-26 11:17:33Z INFO Worker] Waiting to receive the job message from the channel.
[2017-05-26 11:17:33Z INFO Worker] Message received.
[2017-05-26 11:17:34Z INFO Worker] Job message:
 {
  "tasks": [
    {
      "inputs": {
        "scriptType": "inlineScript",
        "scriptName": "",
        "arguments": "",
        "inlineScript": "Write-Host $env:UserName",
        "workingFolder": "",
        "failOnStandardError": "true"
      },
      "instanceId": "c820481d-f217-4b4f-b328-d8fa5205c96a",
      "displayName": "PowerShell-Skript",
      "enabled": true,
      "condition": null,
      "continueOnError": false,
      "alwaysRun": false,
      "timeoutInMinutes": 0,
      "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
      "name": "PowerShell",
      "version": "1.1.5"
    },
    {
      "inputs": {
        "scriptType": "filePath",
        "scriptName": "delete_shopware.ps1",
        "arguments": "",
        "inlineScript": "Remove-Item -Recurse -Force custom\\plugins\nNew-Item -ItemType directory -Path custom\\plugins\n& \"C:\\Program Files\\Git\\cmd\\git.exe\" submodule sync\n& \"C:\\Program Files\\Git\\cmd\\git.exe\" submodule update --init",
        "workingFolder": "",
        "failOnStandardError": "true"
      },
      "instanceId": "c89ebaa7-f974-4986-b8e4-c403c220fd76",
      "displayName": "PowerShell-Skript",
      "enabled": true,
      "condition": null,
      "continueOnError": false,
      "alwaysRun": false,
      "timeoutInMinutes": 0,
      "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
      "name": "PowerShell",
      "version": "1.1.5"
    },
    {
      "inputs": {
        "rootFolder": ".",
        "includeRootFolder": "true",
        "archiveType": "tar",
        "tarCompression": "bz2",
        "archiveFile": "$(Build.BinariesDirectory)/$(customername).tar.bz2",
        "replaceExistingArchive": "true"
      },
      "instanceId": "2894000b-ab30-43d0-a11d-409892ba1f7d",
      "displayName": "Archive files ",
      "enabled": true,
      "condition": null,
      "continueOnError": false,
      "alwaysRun": false,
      "timeoutInMinutes": 0,
      "id": "d8b84976-e99a-4b86-b885-4849694435b0",
      "name": "ArchiveFiles",
      "version": "1.0.5"
    },
    {
      "inputs": {
        "CopyRoot": "$(Build.BinariesDirectory)",
        "Contents": "$(customername).tar.bz2",
        "ArtifactName": "$(customername).tar.bz2",
        "ArtifactType": "Container",
        "TargetPath": "\\\\my\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)"
      },
      "instanceId": "00d79f1f-1d90-41ce-9fe6-723e8bab1da0",
      "displayName": "Veröffentlichungsartefakt kopieren: $(customername).tar.bz2",
      "enabled": true,
      "condition": null,
      "continueOnError": false,
      "alwaysRun": false,
      "timeoutInMinutes": 0,
      "id": "1d341bb0-2106-458c-8422-d00bcea6512a",
      "name": "CopyPublishBuildArtifacts",
      "version": "1.0.28"
    }
  ],
  "requestId": 199,
  "lockToken": "00000000-0000-0000-0000-000000000000",
  "lockedUntil": "0001-01-01T00:00:00",
  "messageType": "JobRequest",
  "plan": {
    "scopeIdentifier": "7edd2dc0-5d24-4848-a3df-706b9fe46594",
    "planType": "Build",
    "version": 6,
    "planId": "6f956a5b-865e-4ba4-bd27-361809dc07e8",
    "artifactUri": "vstfs:///Build/Build/63613",
    "artifactLocation": null,
    "definition": null,
    "owner": null
  },
  "timeline": {
    "id": "0ce12a8d-d616-445e-ac59-958e0e8b5046",
    "changeId": 1,
    "location": null
  },
  "jobId": "dd4afd61-2ab4-4e56-b380-6958b60549bf",
  "jobName": "Build",
  "environment": {
    "endpoints": [
      {
        "data": {
          "repositoryId": "82822ea2-7f54-4bd1-b632-878d86331835",
          "rootFolder": null,
          "clean": "true",
          "checkoutSubmodules": "True",
          "onpremtfsgit": "True"
        },
        "name": "shopware",
        "type": "TfsGit",
        "url": "https://server/Root/TeamProject/_git/shopware",
        "authorization": {
          "parameters": {
            "AccessToken": ********
          },
          "scheme": "OAuth"
        },
        "isReady": false
      }
    ],
    "mask": [
      {
        "type": "regex",
        "value": ********
      },
      {
        "type": "regex",
        "value": ********
      },
      {
        "type": "regex",
        "value": ********
      },
      {
        "type": "regex",
        "value": ********
      }
    ],
    "variables": {
      "system": "build",
      "system.collectionId": "03d7e28b-ff1e-4043-86b9-f11689deaedc",
      "system.teamProject": "TeamProject",
      "system.teamProjectId": "7edd2dc0-5d24-4848-a3df-706b9fe46594",
      "system.definitionId": "158",
      "build.definitionName": "definition name",
      "build.definitionVersion": "21",
      "build.queuedBy": "Imanuel Ulbricht",
      "build.queuedById": "cb011fa7-889b-4f21-b1bf-e446e2d2fa61",
      "build.requestedFor": "Imanuel Ulbricht",
      "build.requestedForId": "cb011fa7-889b-4f21-b1bf-e446e2d2fa61",
      "build.requestedForEmail": "mailaddress",
      "build.sourceVersion": "45b82c967264b8e44b488e83e6498cc5911e7388",
      "build.sourceBranch": "refs/heads/develop",
      "build.sourceBranchName": "develop",
      "system.debug": "false",
      "customername": "variable",
      "build.buildId": "63613",
      "build.buildUri": "vstfs:///Build/Build/63613",
      "build.buildNumber": "63613",
      "build.containerId": "28238",
      "system.isScheduled": "False",
      "system.hosttype": "build",
      "system.culture": "de-DE",
      "system.teamFoundationCollectionUri": "https://server/Root/",
      "system.taskDefinitionsUri": "https://server/Root/",
      "AZURE_HTTP_USER_AGENT": "TFS_03d7e28b-ff1e-4043-86b9-f11689deaedc_build_158_63613",
      "system.planId": "6f956a5b-865e-4ba4-bd27-361809dc07e8",
      "system.jobId": "dd4afd61-2ab4-4e56-b380-6958b60549bf",
      "system.timelineId": "0ce12a8d-d616-445e-ac59-958e0e8b5046",
      "build.repository.uri": "https://server/Root/TeamProject/_git/shopware",
      "build.sourceVersionAuthor": "Imanuel Ulbricht",
      "build.sourceVersionMessage": "Added mapping for eol"
    },
    "systemConnection": {
      "data": {
        "ServerId": "03d7e28b-ff1e-4043-86b9-f11689deaedc",
        "ServerName": "Root"
      },
      "name": "SystemVssConnection",
      "url": "https://server/Root/",
      "authorization": {
        "parameters": {
          "AccessToken": ********
        },
        "scheme": "OAuth"
      },
      "isReady": false
    }
  }
}
[2017-05-26 11:17:34Z INFO JobRunner] Job ID dd4afd61-2ab4-4e56-b380-6958b60549bf
[2017-05-26 11:17:34Z INFO ConfigurationStore] currentAssemblyLocation: C:\VSTSAgent\bin\Agent.Worker.dll
[2017-05-26 11:17:34Z INFO ConfigurationStore] binPath: C:\VSTSAgent\bin
[2017-05-26 11:17:34Z INFO ConfigurationStore] RootFolder: C:\VSTSAgent
[2017-05-26 11:17:34Z INFO ConfigurationStore] ConfigFilePath: C:\VSTSAgent\.agent
[2017-05-26 11:17:34Z INFO ConfigurationStore] CredFilePath: C:\VSTSAgent\.credentials
[2017-05-26 11:17:34Z INFO ConfigurationStore] ServiceConfigFilePath: C:\VSTSAgent\.service
[2017-05-26 11:17:34Z INFO JobRunner] Ensure endpoint url match config url base. https://alternateservername/Root/TeamProject/_git/shopware
[2017-05-26 11:17:34Z INFO JobRunner] Ensure System.TaskDefinitionsUrl match config url base. https://alternateservername/Root/
[2017-05-26 11:17:34Z INFO JobRunner] Ensure System.TFCollectionUrl match config url base. https://alternateservername/Root/
[2017-05-26 11:17:34Z INFO JobRunner] Ensure SystemConnection url match config url base. https://alternateservername/Root/
[2017-05-26 11:17:34Z INFO JobRunner] Ensure System.TFServerUrl match config url base. https://alternateservername/Root/
[2017-05-26 11:17:34Z INFO JobRunner] Creating job server with URL: https://alternateservername/Root/
[2017-05-26 11:17:34Z INFO Worker] Listening for cancel message from the channel.
[2017-05-26 11:17:34Z INFO Worker] Waiting for the job to complete or for a cancel message from the channel.
[2017-05-26 11:17:35Z INFO JobServer] Catch exception during connect. 4 attemp left.
[2017-05-26 11:17:35Z ERR  JobServer] Microsoft.VisualStudio.Services.WebApi.VssServiceResponseException: Moved Permanently
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.HandleResponse(HttpResponseMessage response)
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__48.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__45`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.<GetConnectionDataAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.<ConnectAsync>d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.JobServer.<ConnectAsync>d__3.MoveNext()
[2017-05-26 11:17:35Z INFO JobServer] Catch exception during connect. 3 attemp left.
[2017-05-26 11:17:35Z ERR  JobServer] Microsoft.VisualStudio.Services.WebApi.VssServiceResponseException: Moved Permanently
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.HandleResponse(HttpResponseMessage response)
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__48.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__45`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.<GetConnectionDataAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.<ConnectAsync>d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.JobServer.<ConnectAsync>d__3.MoveNext()
[2017-05-26 11:17:35Z INFO JobServer] Catch exception during connect. 2 attemp left.
[2017-05-26 11:17:35Z ERR  JobServer] Microsoft.VisualStudio.Services.WebApi.VssServiceResponseException: Moved Permanently
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.HandleResponse(HttpResponseMessage response)
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__48.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__45`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.<GetConnectionDataAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.<ConnectAsync>d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.JobServer.<ConnectAsync>d__3.MoveNext()
[2017-05-26 11:17:35Z INFO JobServer] Catch exception during connect. 1 attemp left.
[2017-05-26 11:17:35Z ERR  JobServer] Microsoft.VisualStudio.Services.WebApi.VssServiceResponseException: Moved Permanently
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.HandleResponse(HttpResponseMessage response)
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__48.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__45`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.<GetConnectionDataAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.<ConnectAsync>d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.JobServer.<ConnectAsync>d__3.MoveNext()
[2017-05-26 11:17:35Z INFO Worker] Job completed.
[2017-05-26 11:17:35Z ERR  Program] Microsoft.VisualStudio.Services.WebApi.VssServiceResponseException: Moved Permanently
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.HandleResponse(HttpResponseMessage response)
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__48.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__45`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.<GetConnectionDataAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.<ConnectAsync>d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.JobServer.<ConnectAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Worker.JobRunner.<RunAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Worker.Worker.<RunAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Worker.Program.<MainAsync>d__1.MoveNext()
TingluoHuang commented 7 years ago

@DerKnerd i think so, since you are getting 301 redirect. can you configure the agent against the 'real' TFS url?

DerKnerd commented 7 years ago

@TingluoHuang that helped thank you. Now I am getting a different error, should I make a new issue or add it here?

TingluoHuang commented 7 years ago

@DerKnerd add here.

DerKnerd commented 7 years ago

This is the new error I am getting:

[2017-05-26 15:36:04Z INFO JobServerQueue] Try to append 1 batches web console lines, success rate: 1/1.
[2017-05-26 15:36:04Z ERR  StepsRunner] Caught exception from step: System.InvalidOperationException: Git submodule update failed with exit code: 1
   at Microsoft.VisualStudio.Services.Agent.Worker.Build.GitSourceProvider.<GetSourceAsync>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Worker.Build.BuildJobExtension.<GetSourceAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Worker.JobExtensionRunner.<RunAsync>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Worker.StepsRunner.<RunStepAsync>d__1.MoveNext()
[2017-05-26 15:36:04Z INFO StepsRunner] Step result: Failed

The user that performs the build has the needed rights in the repositories.

TingluoHuang commented 7 years ago

@DerKnerd what's your build log said? the one you pasted is agent diag log.

DerKnerd commented 7 years ago
Cloning into 'C:/VSTSAgent/_work/1/s/custom/plugins/CompraCategoryNewFlag'...
remote: TF401019: Das Git-Repository mit dem Namen oder Bezeichner Shopware ist nicht vorhanden, oder Sie haben für den gewünschten Vorgang keine Berechtigungen.
fatal: repository 'https://support.ngroup.info/Root/Shopware/_git/CompraCategoryNewFlag/' not found
fatal: clone of 'https://support.ngroup.info/Root/Shopware/_git/CompraCategoryNewFlag' into submodule path 'C:/VSTSAgent/_work/1/s/custom/plugins/CompraCategoryNewFlag' failed
Failed to clone 'custom/plugins/CompraCategoryNewFlag'. Retry scheduled
Cloning into 'C:/VSTSAgent/_work/1/s/custom/plugins/CompraTrademark'...
remote: TF401019: Das Git-Repository mit dem Namen oder Bezeichner Shopware ist nicht vorhanden, oder Sie haben für den gewünschten Vorgang keine Berechtigungen.
fatal: repository 'https://support.ngroup.info/Root/Shopware/_git/CompraTrademark/' not found
fatal: clone of 'https://support.ngroup.info/Root/Shopware/_git/CompraTrademark' into submodule path 'C:/VSTSAgent/_work/1/s/custom/plugins/CompraTrademark' failed
Failed to clone 'custom/plugins/CompraTrademark'. Retry scheduled
Cloning into 'C:/VSTSAgent/_work/1/s/custom/plugins/CompraCategoryNewFlag'...
remote: TF401019: Das Git-Repository mit dem Namen oder Bezeichner Shopware ist nicht vorhanden, oder Sie haben für den gewünschten Vorgang keine Berechtigungen.
fatal: repository 'https://support.ngroup.info/Root/Shopware/_git/CompraCategoryNewFlag/' not found
fatal: clone of 'https://support.ngroup.info/Root/Shopware/_git/CompraCategoryNewFlag' into submodule path 'C:/VSTSAgent/_work/1/s/custom/plugins/CompraCategoryNewFlag' failed
Failed to clone 'custom/plugins/CompraCategoryNewFlag' a second time, aborting
Git submodule update failed with exit code: 1
TingluoHuang commented 7 years ago

looks like the git submocule update command failed with permission error.

TingluoHuang commented 7 years ago

or it can't find the submodule repo.

DerKnerd commented 7 years ago

It works without any issue when I try it with the account that runs the build agent. What users do I have to give rights?

TingluoHuang commented 7 years ago

image

TingluoHuang commented 7 years ago

the build is always running as service account, not you.

DerKnerd commented 7 years ago

Ok, that helped, I needed to add the Build Users in the security tab. After adding them it worked. Thank you.

TingluoHuang commented 7 years ago

cool, i will close this issue.