我正在使用机器进行持续部署,第一个项目一切正常。 但是在第二个项目中,当我将代理添加到同一台(上一个)机器时,部署失败并出现此错误:
无法部署到目标' WIN-XXXXXX'目标离线。
如何在VSTS中使用一台机器进行部署2项目?
编辑 :(添加日志)
[2017-09-19 14:35:17Z INFO RSAEncryptedFileKeyManager] Loading RSA key parameters from file C:\vstsagent\A2\.credentials_rsaparams
[2017-09-19 14:35:18Z INFO RSAEncryptedFileKeyManager] Loading RSA key parameters from file C:\vstsagent\A2\.credentials_rsaparams
[2017-09-19 14:35:20Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2017-09-19 14:35:20Z INFO CommandSettings] Arg 'work': '_work'
[2017-09-19 14:35:20Z INFO CommandSettings] Remove work from Arg dictionary. [2017-09-19 14:35:20Z INFO ConfigurationStore] Saving agent settings.
[2017-09-19 14:35:20Z INFO ConfigurationStore] Settings Saved.
[2017-09-19 14:35:20Z INFO Terminal] WRITE LINE: 2017-09-19 14:35:20Z: Settings Saved.
[2017-09-19 14:35:20Z INFO CommandSettings] Flag 'runasservice': 'True'
[2017-09-19 14:35:20Z INFO ConfigurationManager] Configuring to run the agent as service [2017-09-19 14:35:20Z INFO CommandSettings] Flag 'machinegroup': 'False' [2017-09-19 14:35:20Z INFO CommandSettings] Flag 'deploymentgroup': 'True'
[2017-09-19 14:35:20Z INFO CommandSettings] Arg 'windowslogonaccount': ''
[2017-09-19 14:35:20Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-09-19 14:35:20Z INFO PromptManager] ReadValue
[2017-09-19 14:35:20Z INFO Terminal] WRITE: Enter User account to use for the service (press enter for NT AUTHORITY\SYSTEM) >
[2017-09-19 14:35:20Z INFO Terminal] READ LINE
[2017-09-19 14:35:25Z INFO Terminal] Read value: ''
[2017-09-19 14:35:25Z INFO PromptManager] Falling back to the default: 'NT AUTHORITY\SYSTEM'
[2017-09-19 14:35:25Z INFO WindowsServiceControlManager] LogonAccount after transforming: NT AUTHORITY\SYSTEM, user: SYSTEM, domain: NT AUTHORITY
[2017-09-19 14:35:25Z INFO WindowsServiceControlManager] Service name 'vstsagent.----.WIN------------' display name 'VSTS Agent (----.WIN------------)' will be used for service configuration.
[2017-09-19 14:35:25Z INFO Terminal] WRITE LINE: The service already exists: vstsagent.----.WIN------------, it will be replaced
[2017-09-19 14:35:25Z INFO NativeWindowsServiceHelper] Trying to delete service vstsagent.----.WIN------------
[2017-09-19 14:35:25Z ERR Agent] System.ComponentModel.Win32Exception: Could not delete service 'vstsagent.----.WIN------------'
at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.NativeWindowsServiceHelper.UninstallService(String serviceName)
at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.WindowsServiceControlManager.ConfigureService(AgentSettings settings, CommandSettings command)
at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.<ConfigureAsync>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 Microsoft.VisualStudio.Services.Agent.Listener.Agent.<ExecuteCommand>d__5.MoveNext()
[2017-09-19 14:35:25Z ERR Terminal] WRITE ERROR: Could not delete service 'vstsagent.----.WIN------------'