问题
Our builds fails intermittently without any error message other than
Exit code -1 returned from process: file name 'C:\agent\vsts-agent-win-x64-2.129.0\externals\node\bin\node.exe'
We have two build agents hosted on our own VM's in Azure. They are hosted inside an App Service Environment (ASE) so that they can deploy to App Services inside the ASE.
This happens on any of our two build agents, and on different vsts tasks:
npm test:
Exit code -1 returned from process: file name 'C:\agent\vsts-agent-win-x64-2.129.0\externals\node\bin\node.exe', arguments '"C:\agent\vsts-agent-win-x64-2.129.0\_work\_tasks\Npm_fe47e961-9fa8-4106-8639-368c022d43ad\1.0.24\npm.js"'.
dotnet test:
Exit code -1 returned from process: file name 'C:\agent\Agent2\externals\node\bin\node.exe', arguments '"C:\agent\Agent2\_work\_tasks\DotNetCoreCLI_5541a522-603c-47ad-91fc-a4b1d163081b\2.139.9\dotnetcore.js"'.
This doesn't seem to be dotnet.exe or npm that fails, when that happens we get proper error messages like this:
2018-10-04T07:57:20.2881190Z ##[error]Error: Npm failed with return code: 1
or
2018-10-10T14:31:50.9716800Z ##[error]Dotnet command failed with non-zero exit code on the following projects
The working theory is that something causes node.exe to exit unexpectedly. I'm interested in both solutions to this problem but also ways to troubleshoot these types of errors.
来源:https://stackoverflow.com/questions/52831343/vsts-task-fails-intermittently-with-exit-code-1-returned-from-node-exe