yes
Version of your agent? 2.126.0
OS of the machine running the agent?
Windows Server 2016 on Azure
VisualStudio.com
If VisualStudio.com, what is your account name? http://msresearch.visualstudio.com
We install VSTS agents to run as a Windows service.
The Windows Azure VM that has the agent was rebooted automatically (presumably by Azure management software to install updates).
After VM rebooted VSTS agent service wasn't started despite having "Automatic" startup type.
I found this in Windows event logs:
A timeout was reached (30000 milliseconds) while waiting for the vstsagent.msresearch.kryten-9 service to connect.
The vstsagent.msresearch.kryten-9 service failed to start due to the following error:
The service did not respond to the start or control request in a timely fashion.
There's nothing related in VSTS logs.
I was able to start the service manually and it works fine.
This situation repeated on 3 out of 60 agents in the deployment group.
Nothing interesting in the logs
It might be the case that a lot happens at startup and VSTS agent contends for resources.
Running it as "Automatic (Delayed Start)" might help as referenced here:
https://stackoverflow.com/a/10876667/7417402
The startup type is set as "Automatic" here in the VSTS agent code:
https://github.com/Microsoft/vsts-agent/blob/master/src/Agent.Listener/Configuration/NativeWindowsServiceHelper.cs#L489
You probably need to use ChangeServiceConfig2 function to change the fDelayedAutostart flag
@shtratos thanks for reporting this, i will take a look.
I have a similar issue. When i restart the vm, the vsts agent wont start and dissapears from the windows startup services in services.msc. it seems to lost configuration/unconfigured, because i have to run ./config again.
I got this error in the log:
[2018-01-10 08:08:13Z INFO AgentProcess] Agent is built for Windows - win-x64.
[2018-01-10 08:08:13Z INFO AgentProcess] RuntimeInformation: Microsoft Windows 10.0.14393 .
[2018-01-10 08:08:13Z INFO AgentProcess] Version: 2.126.0
[2018-01-10 08:08:13Z INFO AgentProcess] Commit: 54fa61b7cbd67e9c769b22fd7b63007e7d4827a1
[2018-01-10 08:08:13Z INFO AgentProcess] Culture: en-US
[2018-01-10 08:08:13Z INFO AgentProcess] UI Culture: en-US
[2018-01-10 08:08:13Z INFO HostContext] Well known directory 'Bin': 'C:\VSTSAgent\bin'
[2018-01-10 08:08:13Z INFO HostContext] Well known directory 'Root': 'C:\VSTSAgent'
[2018-01-10 08:08:13Z INFO AgentProcess] Validating directory permissions for: 'C:\VSTSAgent'
[2018-01-10 08:08:13Z INFO PowerShellExeUtil] Generation: '1'
[2018-01-10 08:08:13Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1', value name 'Install': '1'
[2018-01-10 08:08:13Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine', value name 'PowerShellVersion': '2.0'
[2018-01-10 08:08:13Z INFO PowerShellExeUtil] Unsupported version. Skipping.
[2018-01-10 08:08:13Z INFO PowerShellExeUtil] Generation: '3'
[2018-01-10 08:08:13Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3', value name 'Install': '1'
[2018-01-10 08:08:13Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine', value name 'PowerShellVersion': '5.1.14393.0'
[2018-01-10 08:08:13Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine', value name 'ApplicationBase': 'C:\Windows\System32\WindowsPowerShell\v1.0'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework', value name 'InstallRoot': 'C:\Windows\Microsoft.NET\Framework64\'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'SOFTWARE\Microsoft\NET Framework Setup\NDP' contains sub keys:
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] 'CDF'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] 'v2.0.50727'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] 'v3.0'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] 'v3.5'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] 'v4'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] 'v4.0'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727', value name 'Version': '2.0.50727.4927'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727', value name 'Install': '1'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Testing directory: 'C:\Windows\Microsoft.NET\Framework64\v2.0.50727'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Found version: 2.0.50727
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0', value name 'Version': '3.0.30729.4926'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0', value name 'Install': '1'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Testing directory: 'C:\Windows\Microsoft.NET\Framework64\v3.0'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Found version: 3.0
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5', value name 'Version': '3.5.30729.4926'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5', value name 'Install': '1'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Testing directory: 'C:\Windows\Microsoft.NET\Framework64\v3.5'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Found version: 3.5
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4', value name 'Version' is null.
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4', value name '' is null.
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4' contains sub keys:
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] 'Client'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] 'Full'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'Version': '4.6.01586'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'Install': '1'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'InstallPath': 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'Release': '394802'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Type is System.Int32
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Interpreted version: 4.6.2
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'Version': '4.6.01586'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'Install': '1'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'InstallPath': 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'Release': '394802'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Type is System.Int32
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Interpreted version: 4.6.2
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4.0', value name 'Version' is null.
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4.0', value name '': 'deprecated'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Found 5 versions:
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] 2.0.50727
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] 3.0
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] 3.5
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] 4.6.2
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] 4.6.2
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Testing for min NET Framework version: '4.5'
[2018-01-10 08:08:13Z INFO CommandLineParser] Parse
[2018-01-10 08:08:13Z INFO CommandLineParser] Parsing 19 args
[2018-01-10 08:08:13Z INFO CommandLineParser] parsing argument
[2018-01-10 08:08:13Z INFO CommandLineParser] HasArgs: False
[2018-01-10 08:08:13Z INFO CommandLineParser] Adding Command: configure
[2018-01-10 08:08:13Z INFO CommandLineParser] parsing argument
[2018-01-10 08:08:13Z INFO CommandLineParser] HasArgs: True
[2018-01-10 08:08:13Z INFO CommandLineParser] arg: deploymentgroup
[2018-01-10 08:08:13Z INFO CommandLineParser] parsing argument
[2018-01-10 08:08:13Z INFO CommandLineParser] HasArgs: True
[2018-01-10 08:08:13Z INFO CommandLineParser] arg: runasservice
[2018-01-10 08:08:13Z INFO CommandLineParser] Adding flag: deploymentgroup
[2018-01-10 08:08:13Z INFO CommandLineParser] parsing argument
[2018-01-10 08:08:13Z INFO CommandLineParser] HasArgs: True
[2018-01-10 08:08:13Z INFO CommandLineParser] arg: unattended
[2018-01-10 08:08:13Z INFO CommandLineParser] Adding flag: runasservice
[2018-01-10 08:08:13Z INFO CommandLineParser] parsing argument
[2018-01-10 08:08:13Z INFO CommandLineParser] HasArgs: True
[2018-01-10 08:08:13Z INFO CommandLineParser] arg: replace
[2018-01-10 08:08:13Z INFO CommandLineParser] Adding flag: unattended
[2018-01-10 08:08:13Z INFO CommandLineParser] parsing argument
[2018-01-10 08:08:13Z INFO CommandLineParser] HasArgs: True
[2018-01-10 08:08:13Z INFO CommandLineParser] arg: auth
[2018-01-10 08:08:13Z INFO CommandLineParser] Adding flag: replace
[2018-01-10 08:08:13Z INFO CommandLineParser] parsing argument
[2018-01-10 08:08:13Z INFO CommandLineParser] HasArgs: True
[2018-01-10 08:08:13Z INFO CommandLineParser] Adding option 'auth': 'PAT'
[2018-01-10 08:08:13Z INFO CommandLineParser] parsing argument
[2018-01-10 08:08:13Z INFO CommandLineParser] HasArgs: True
[2018-01-10 08:08:13Z INFO CommandLineParser] arg: agent
[2018-01-10 08:08:13Z INFO CommandLineParser] parsing argument
[2018-01-10 08:08:13Z INFO CommandLineParser] HasArgs: True
[2018-01-10 08:08:13Z INFO CommandLineParser] Adding option 'agent': 'VSTSAgent171220-DG'
[2018-01-10 08:08:13Z INFO CommandLineParser] parsing argument
[2018-01-10 08:08:13Z INFO CommandLineParser] HasArgs: True
[2018-01-10 08:08:13Z INFO CommandLineParser] arg: url
[2018-01-10 08:08:13Z INFO CommandLineParser] parsing argument
[2018-01-10 08:08:13Z INFO CommandLineParser] HasArgs: True
[2018-01-10 08:08:13Z INFO CommandLineParser] Adding option 'url': 'https://getsleek.visualstudio.com'
[2018-01-10 08:08:13Z INFO CommandLineParser] parsing argument
[2018-01-10 08:08:13Z INFO CommandLineParser] HasArgs: True
[2018-01-10 08:08:13Z INFO CommandLineParser] arg: token
[2018-01-10 08:08:13Z INFO CommandLineParser] parsing argument
[2018-01-10 08:08:13Z INFO CommandLineParser] HasArgs: True
[2018-01-10 08:08:13Z INFO CommandLineParser] Adding option 'token': '********'
[2018-01-10 08:08:13Z INFO CommandLineParser] parsing argument
[2018-01-10 08:08:13Z INFO CommandLineParser] HasArgs: True
[2018-01-10 08:08:13Z INFO CommandLineParser] arg: work
[2018-01-10 08:08:13Z INFO CommandLineParser] parsing argument
[2018-01-10 08:08:13Z INFO CommandLineParser] HasArgs: True
[2018-01-10 08:08:13Z INFO CommandLineParser] Adding option 'work': '_work'
[2018-01-10 08:08:13Z INFO CommandLineParser] parsing argument
[2018-01-10 08:08:13Z INFO CommandLineParser] HasArgs: True
[2018-01-10 08:08:13Z INFO CommandLineParser] arg: projectname
[2018-01-10 08:08:13Z INFO CommandLineParser] parsing argument
[2018-01-10 08:08:13Z INFO CommandLineParser] HasArgs: True
[2018-01-10 08:08:13Z INFO CommandLineParser] Adding option 'projectname': 'Sleek'
[2018-01-10 08:08:13Z INFO CommandLineParser] parsing argument
[2018-01-10 08:08:13Z INFO CommandLineParser] HasArgs: True
[2018-01-10 08:08:13Z INFO CommandLineParser] arg: deploymentgroupname
[2018-01-10 08:08:13Z INFO CommandLineParser] parsing argument
[2018-01-10 08:08:13Z INFO CommandLineParser] HasArgs: True
[2018-01-10 08:08:13Z INFO CommandLineParser] Adding option 'deploymentgroupname': 'Azure'
[2018-01-10 08:08:13Z INFO AgentProcess] Arguments parsed
[2018-01-10 08:08:13Z INFO VstsAgentWebProxy] No proxy setting found.
[2018-01-10 08:08:13Z INFO AgentCertificateManager] No certificate setting found.
[2018-01-10 08:08:13Z INFO Agent] ExecuteCommand
[2018-01-10 08:08:13Z INFO ConfigurationStore] currentAssemblyLocation: C:\VSTSAgent\bin\Agent.Listener.dll
[2018-01-10 08:08:13Z INFO HostContext] Well known directory 'Bin': 'C:\VSTSAgent\bin'
[2018-01-10 08:08:13Z INFO ConfigurationStore] binPath: C:\VSTSAgent\bin
[2018-01-10 08:08:13Z INFO HostContext] Well known directory 'Bin': 'C:\VSTSAgent\bin'
[2018-01-10 08:08:13Z INFO HostContext] Well known directory 'Root': 'C:\VSTSAgent'
[2018-01-10 08:08:13Z INFO ConfigurationStore] RootFolder: C:\VSTSAgent
[2018-01-10 08:08:13Z INFO ConfigurationStore] ConfigFilePath: C:\VSTSAgent\.agent
[2018-01-10 08:08:13Z INFO ConfigurationStore] CredFilePath: C:\VSTSAgent\.credentials
[2018-01-10 08:08:13Z INFO ConfigurationStore] ServiceConfigFilePath: C:\VSTSAgent\.service
[2018-01-10 08:08:13Z INFO ConfigurationStore] AutoLogonSettingsFilePath: C:\VSTSAgent\.autologon
[2018-01-10 08:08:13Z INFO CommandSettings] Flag 'help': 'False'
[2018-01-10 08:08:13Z INFO CommandSettings] Flag 'version': 'False'
[2018-01-10 08:08:13Z INFO CommandSettings] Flag 'commit': 'False'
[2018-01-10 08:08:13Z INFO CommandSettings] Command 'configure': 'True'
[2018-01-10 08:08:13Z INFO ConfigurationManager] ConfigureAsync
[2018-01-10 08:08:13Z INFO ConfigurationStore] IsConfigured()
[2018-01-10 08:08:13Z INFO ConfigurationStore] IsConfigured: False
[2018-01-10 08:08:13Z INFO ConfigurationManager] Is configured: False
[2018-01-10 08:08:13Z INFO CommandSettings] Flag 'sslskipcertvalidation': 'False'
[2018-01-10 08:08:13Z INFO NetFrameworkUtil] Testing for min NET Framework version: '4.6'
[2018-01-10 08:08:13Z INFO CommandSettings] Flag 'machinegroup': 'False'
[2018-01-10 08:08:13Z INFO CommandSettings] Flag 'deploymentgroup': 'True'
[2018-01-10 08:08:13Z INFO ExtensionManager] Getting extensions for interface: 'Microsoft.VisualStudio.Services.Agent.Listener.Configuration.IConfigurationProvider'
[2018-01-10 08:08:13Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.BuildReleasesAgentConfigProvider, Agent.Listener
[2018-01-10 08:08:13Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.DeploymentGroupAgentConfigProvider, Agent.Listener
[2018-01-10 08:08:13Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.SharedDeploymentAgentConfigProvider, Agent.Listener
[2018-01-10 08:08:13Z INFO Terminal] WRITE LINE:
[2018-01-10 08:08:13Z INFO Terminal] WRITE LINE: >> Connect:
[2018-01-10 08:08:13Z INFO Terminal] WRITE LINE:
[2018-01-10 08:08:13Z INFO CommandSettings] Arg 'url': 'https://getsleek.visualstudio.com'
[2018-01-10 08:08:13Z INFO CommandSettings] Remove url from Arg dictionary.
[2018-01-10 08:08:13Z INFO DeploymentGroupAgentConfigProvider] url - https://getsleek.visualstudio.com
[2018-01-10 08:08:13Z INFO ConfigurationManager] GetCredentialProvider
[2018-01-10 08:08:13Z INFO CommandSettings] Arg 'auth': 'PAT'
[2018-01-10 08:08:13Z INFO CommandSettings] Remove auth from Arg dictionary.
[2018-01-10 08:08:13Z INFO ConfigurationManager] Creating credential for auth: PAT
[2018-01-10 08:08:13Z INFO CredentialManager] GetCredentialProvider
[2018-01-10 08:08:13Z INFO CredentialManager] Creating type PAT
[2018-01-10 08:08:13Z INFO CredentialManager] Creating credential type: PAT
[2018-01-10 08:08:13Z INFO PersonalAccessToken] EnsureCredential
[2018-01-10 08:08:13Z INFO CommandSettings] Arg 'token': '********'
[2018-01-10 08:08:13Z INFO CommandSettings] Remove token from Arg dictionary.
[2018-01-10 08:08:13Z INFO PersonalAccessToken] GetVssCredentials
[2018-01-10 08:08:13Z INFO PersonalAccessToken] token retrieved: 52 chars
[2018-01-10 08:08:13Z INFO ConfigurationManager] cred retrieved
[2018-01-10 08:08:13Z INFO Terminal] WRITE LINE: Connecting to server ...
[2018-01-10 08:08:13Z INFO DeploymentGroupAgentConfigProvider] Test connection with deployment group
[2018-01-10 08:08:13Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2018-01-10 08:08:15Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2018-01-10 08:08:15Z INFO DeploymentGroupAgentConfigProvider] Connect complete for deployment group
[2018-01-10 08:08:15Z INFO ConfigurationManager] Test Connection complete.
[2018-01-10 08:08:15Z INFO RSAEncryptedFileKeyManager] Found existing RSA key parameters file C:\VSTSAgent\.credentials_rsaparams
[2018-01-10 08:08:15Z INFO Terminal] WRITE LINE:
[2018-01-10 08:08:15Z INFO Terminal] WRITE LINE: >> Register Agent:
[2018-01-10 08:08:15Z INFO Terminal] WRITE LINE:
[2018-01-10 08:08:15Z INFO CommandSettings] Arg 'projectname': 'Sleek'
[2018-01-10 08:08:15Z INFO CommandSettings] Remove projectname from Arg dictionary.
[2018-01-10 08:08:15Z INFO CommandSettings] Arg 'deploymentgroupname': 'Azure'
[2018-01-10 08:08:15Z INFO CommandSettings] Remove deploymentgroupname from Arg dictionary.
[2018-01-10 08:08:16Z INFO CommandSettings] Flag 'unattended': 'True'
[2018-01-10 08:08:16Z ERR Agent] Microsoft.TeamFoundation.DistributedTask.WebApi.DeploymentGroupNotFoundException: Deployment Group not found: 'Azure'
at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.DeploymentGroupAgentConfigProvider.<GetDeploymentGroupAsync>d__18.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.Configuration.DeploymentGroupAgentConfigProvider.<GetPoolId>d__9.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.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()
[2018-01-10 08:08:16Z ERR Terminal] WRITE ERROR: Deployment Group not found: 'Azure'
@mhgamework looks like you have different problem, can you share the log that indicate the agent lost it's config?
I dont have a log file for that. After a VM restart, when i run "./run" it says the agent is not configured yet. When i then try "./config" it proceeds with prompting for config information and setting up, instead of saying it is configured already and should call "./config remove"
@mhgamework what kind of VM you have? does it has any restore point? will restart remove any file from disk?
Im running a windows 10 OS on a Standard B2s (2 vcpus, 4 GB memory) VM.
Yesterday, i put the VSTS service on "automatic (delayed start)" as suggested above. The instance shuts down in the evening and starts up in the morning. The configuration seems to again have dissapeared. Calling run gives me "An error occurred: Not configured"
Now i have 2 logs in the morning instead of one (see below).
=8:06 AM
[2018-01-11 08:04:09Z INFO AgentProcess] Agent is built for Windows - win-x64.
[2018-01-11 08:04:09Z INFO AgentProcess] RuntimeInformation: Microsoft Windows 10.0.14393 .
[2018-01-11 08:04:09Z INFO AgentProcess] Version: 2.126.0
[2018-01-11 08:04:09Z INFO AgentProcess] Commit: 54fa61b7cbd67e9c769b22fd7b63007e7d4827a1
[2018-01-11 08:04:09Z INFO AgentProcess] Culture: en-US
[2018-01-11 08:04:09Z INFO AgentProcess] UI Culture: en-US
[2018-01-11 08:04:09Z INFO HostContext] Well known directory 'Bin': 'C:\VSTSAgent\bin'
[2018-01-11 08:04:09Z INFO HostContext] Well known directory 'Root': 'C:\VSTSAgent'
[2018-01-11 08:04:09Z INFO AgentProcess] Validating directory permissions for: 'C:\VSTSAgent'
[2018-01-11 08:04:09Z INFO PowerShellExeUtil] Generation: '1'
[2018-01-11 08:04:09Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1', value name 'Install': '1'
[2018-01-11 08:04:09Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine', value name 'PowerShellVersion': '2.0'
[2018-01-11 08:04:09Z INFO PowerShellExeUtil] Unsupported version. Skipping.
[2018-01-11 08:04:09Z INFO PowerShellExeUtil] Generation: '3'
[2018-01-11 08:04:09Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3', value name 'Install': '1'
[2018-01-11 08:04:09Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine', value name 'PowerShellVersion': '5.1.14393.0'
[2018-01-11 08:04:09Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine', value name 'ApplicationBase': 'C:\Windows\System32\WindowsPowerShell\v1.0'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework', value name 'InstallRoot': 'C:\Windows\Microsoft.NET\Framework64\'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'SOFTWARE\Microsoft\NET Framework Setup\NDP' contains sub keys:
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] 'CDF'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] 'v2.0.50727'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] 'v3.0'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] 'v3.5'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] 'v4'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] 'v4.0'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727', value name 'Version': '2.0.50727.4927'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727', value name 'Install': '1'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Testing directory: 'C:\Windows\Microsoft.NET\Framework64\v2.0.50727'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Found version: 2.0.50727
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0', value name 'Version': '3.0.30729.4926'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0', value name 'Install': '1'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Testing directory: 'C:\Windows\Microsoft.NET\Framework64\v3.0'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Found version: 3.0
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5', value name 'Version': '3.5.30729.4926'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5', value name 'Install': '1'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Testing directory: 'C:\Windows\Microsoft.NET\Framework64\v3.5'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Found version: 3.5
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4', value name 'Version' is null.
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4', value name '' is null.
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4' contains sub keys:
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] 'Client'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] 'Full'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'Version': '4.6.01586'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'Install': '1'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'InstallPath': 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'Release': '394802'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Type is System.Int32
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Interpreted version: 4.6.2
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'Version': '4.6.01586'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'Install': '1'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'InstallPath': 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'Release': '394802'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Type is System.Int32
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Interpreted version: 4.6.2
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4.0', value name 'Version' is null.
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4.0', value name '': 'deprecated'
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Found 5 versions:
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] 2.0.50727
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] 3.0
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] 3.5
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] 4.6.2
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] 4.6.2
[2018-01-11 08:04:09Z INFO NetFrameworkUtil] Testing for min NET Framework version: '4.5'
[2018-01-11 08:04:09Z INFO CommandLineParser] Parse
[2018-01-11 08:04:09Z INFO CommandLineParser] Parsing 6 args
[2018-01-11 08:04:09Z INFO CommandLineParser] parsing argument
[2018-01-11 08:04:09Z INFO CommandLineParser] HasArgs: False
[2018-01-11 08:04:09Z INFO CommandLineParser] Adding Command: remove
[2018-01-11 08:04:09Z INFO CommandLineParser] parsing argument
[2018-01-11 08:04:09Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:04:09Z INFO CommandLineParser] arg: unattended
[2018-01-11 08:04:09Z INFO CommandLineParser] parsing argument
[2018-01-11 08:04:09Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:04:09Z INFO CommandLineParser] arg: auth
[2018-01-11 08:04:09Z INFO CommandLineParser] Adding flag: unattended
[2018-01-11 08:04:09Z INFO CommandLineParser] parsing argument
[2018-01-11 08:04:09Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:04:09Z INFO CommandLineParser] Adding option 'auth': 'PAT'
[2018-01-11 08:04:09Z INFO CommandLineParser] parsing argument
[2018-01-11 08:04:09Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:04:09Z INFO CommandLineParser] arg: token
[2018-01-11 08:04:09Z INFO CommandLineParser] parsing argument
[2018-01-11 08:04:09Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:04:09Z INFO CommandLineParser] Adding option 'token': '********'
[2018-01-11 08:04:09Z INFO AgentProcess] Arguments parsed
[2018-01-11 08:04:10Z INFO VstsAgentWebProxy] No proxy setting found.
[2018-01-11 08:04:10Z INFO AgentCertificateManager] No certificate setting found.
[2018-01-11 08:04:10Z INFO Agent] ExecuteCommand
[2018-01-11 08:04:10Z INFO ConfigurationStore] currentAssemblyLocation: C:\VSTSAgent\bin\Agent.Listener.dll
[2018-01-11 08:04:10Z INFO HostContext] Well known directory 'Bin': 'C:\VSTSAgent\bin'
[2018-01-11 08:04:10Z INFO ConfigurationStore] binPath: C:\VSTSAgent\bin
[2018-01-11 08:04:10Z INFO HostContext] Well known directory 'Bin': 'C:\VSTSAgent\bin'
[2018-01-11 08:04:10Z INFO HostContext] Well known directory 'Root': 'C:\VSTSAgent'
[2018-01-11 08:04:10Z INFO ConfigurationStore] RootFolder: C:\VSTSAgent
[2018-01-11 08:04:10Z INFO ConfigurationStore] ConfigFilePath: C:\VSTSAgent\.agent
[2018-01-11 08:04:10Z INFO ConfigurationStore] CredFilePath: C:\VSTSAgent\.credentials
[2018-01-11 08:04:10Z INFO ConfigurationStore] ServiceConfigFilePath: C:\VSTSAgent\.service
[2018-01-11 08:04:10Z INFO ConfigurationStore] AutoLogonSettingsFilePath: C:\VSTSAgent\.autologon
[2018-01-11 08:04:10Z INFO CommandSettings] Flag 'help': 'False'
[2018-01-11 08:04:10Z INFO CommandSettings] Flag 'version': 'False'
[2018-01-11 08:04:10Z INFO CommandSettings] Flag 'commit': 'False'
[2018-01-11 08:04:10Z INFO CommandSettings] Command 'configure': 'False'
[2018-01-11 08:04:10Z INFO CommandSettings] Command 'remove': 'True'
[2018-01-11 08:04:10Z INFO ConfigurationStore] IsServiceConfigured()
[2018-01-11 08:04:10Z INFO ConfigurationStore] IsServiceConfigured: True
[2018-01-11 08:04:11Z INFO Terminal] WRITE LINE: Removing service
[2018-01-11 08:04:12Z INFO NativeWindowsServiceHelper] Successfully stopped the service
[2018-01-11 08:04:12Z INFO NativeWindowsServiceHelper] Trying to delete service vstsagent.getsleek.VSTSAgent171220
[2018-01-11 08:04:12Z INFO NativeWindowsServiceHelper] successfully removed the service
[2018-01-11 08:04:12Z INFO WindowsServiceControlManager] Calculated unique group name VSTS_AgentService_Gf8296
[2018-01-11 08:04:12Z INFO WindowsServiceControlManager] Remove the group VSTS_AgentService_Gf8296 for the folder C:\VSTSAgent\_work.
[2018-01-11 08:05:51Z INFO WindowsServiceControlManager] Remove the group VSTS_AgentService_Gf8296 for the folder C:\VSTSAgent.
[2018-01-11 08:06:22Z INFO WindowsServiceControlManager] Delete the group VSTS_AgentService_Gf8296.
[2018-01-11 08:06:23Z INFO NativeWindowsServiceHelper] Local Group 'VSTS_AgentService_Gf8296' deleted
[2018-01-11 08:06:23Z INFO Terminal] WRITE LINE: Succeeded: Removing service
[2018-01-11 08:06:23Z INFO Terminal] WRITE LINE: Removing agent from the server
[2018-01-11 08:06:23Z INFO ConfigurationStore] IsConfigured()
[2018-01-11 08:06:23Z INFO ConfigurationStore] IsConfigured: True
[2018-01-11 08:06:23Z INFO ConfigurationStore] HasCredentials()
[2018-01-11 08:06:23Z INFO ConfigurationStore] stored True
[2018-01-11 08:06:23Z INFO ConfigurationManager] GetCredentialProvider
[2018-01-11 08:06:23Z INFO CommandSettings] Arg 'auth': 'PAT'
[2018-01-11 08:06:23Z INFO CommandSettings] Remove auth from Arg dictionary.
[2018-01-11 08:06:23Z INFO ConfigurationManager] Creating credential for auth: PAT
[2018-01-11 08:06:23Z INFO CredentialManager] GetCredentialProvider
[2018-01-11 08:06:23Z INFO CredentialManager] Creating type PAT
[2018-01-11 08:06:23Z INFO CredentialManager] Creating credential type: PAT
[2018-01-11 08:06:23Z INFO PersonalAccessToken] EnsureCredential
[2018-01-11 08:06:23Z INFO CommandSettings] Arg 'token': '********'
[2018-01-11 08:06:23Z INFO CommandSettings] Remove token from Arg dictionary.
[2018-01-11 08:06:23Z INFO PersonalAccessToken] GetVssCredentials
[2018-01-11 08:06:23Z INFO PersonalAccessToken] token retrieved: 52 chars
[2018-01-11 08:06:23Z INFO ConfigurationManager] cred retrieved
[2018-01-11 08:06:23Z INFO ConfigurationManager] Agent configured for deploymentGroup : False
[2018-01-11 08:06:23Z INFO ExtensionManager] Getting extensions for interface: 'Microsoft.VisualStudio.Services.Agent.Listener.Configuration.IConfigurationProvider'
[2018-01-11 08:06:23Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.BuildReleasesAgentConfigProvider, Agent.Listener
[2018-01-11 08:06:23Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.DeploymentGroupAgentConfigProvider, Agent.Listener
[2018-01-11 08:06:23Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.SharedDeploymentAgentConfigProvider, Agent.Listener
[2018-01-11 08:06:23Z INFO Terminal] WRITE LINE: Connecting to server ...
[2018-01-11 08:06:23Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2018-01-11 08:06:31Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2018-01-11 08:06:32Z INFO Terminal] WRITE LINE: Succeeded: Removing agent from the server
[2018-01-11 08:06:32Z INFO Terminal] WRITE LINE: Removing .credentials
[2018-01-11 08:06:32Z INFO RSAEncryptedFileKeyManager] Deleting RSA key parameters file C:\VSTSAgent\.credentials_rsaparams
[2018-01-11 08:06:32Z INFO Terminal] WRITE LINE: Succeeded: Removing .credentials
[2018-01-11 08:06:32Z INFO Terminal] WRITE LINE: Removing .agent
[2018-01-11 08:06:32Z INFO VstsAgentWebProxy] Delete .proxy file: C:\VSTSAgent\.proxy
[2018-01-11 08:06:32Z INFO Terminal] WRITE LINE: Succeeded: Removing .agent
= 8:08 AM
[2018-01-11 08:08:23Z INFO AgentProcess] Agent is built for Windows - win-x64.
[2018-01-11 08:08:23Z INFO AgentProcess] RuntimeInformation: Microsoft Windows 10.0.14393 .
[2018-01-11 08:08:23Z INFO AgentProcess] Version: 2.126.0
[2018-01-11 08:08:23Z INFO AgentProcess] Commit: 54fa61b7cbd67e9c769b22fd7b63007e7d4827a1
[2018-01-11 08:08:23Z INFO AgentProcess] Culture: en-US
[2018-01-11 08:08:23Z INFO AgentProcess] UI Culture: en-US
[2018-01-11 08:08:23Z INFO HostContext] Well known directory 'Bin': 'C:\VSTSAgent\bin'
[2018-01-11 08:08:23Z INFO HostContext] Well known directory 'Root': 'C:\VSTSAgent'
[2018-01-11 08:08:23Z INFO AgentProcess] Validating directory permissions for: 'C:\VSTSAgent'
[2018-01-11 08:08:23Z INFO PowerShellExeUtil] Generation: '1'
[2018-01-11 08:08:23Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1', value name 'Install': '1'
[2018-01-11 08:08:23Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine', value name 'PowerShellVersion': '2.0'
[2018-01-11 08:08:23Z INFO PowerShellExeUtil] Unsupported version. Skipping.
[2018-01-11 08:08:23Z INFO PowerShellExeUtil] Generation: '3'
[2018-01-11 08:08:23Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3', value name 'Install': '1'
[2018-01-11 08:08:23Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine', value name 'PowerShellVersion': '5.1.14393.0'
[2018-01-11 08:08:23Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine', value name 'ApplicationBase': 'C:\Windows\System32\WindowsPowerShell\v1.0'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework', value name 'InstallRoot': 'C:\Windows\Microsoft.NET\Framework64\'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'SOFTWARE\Microsoft\NET Framework Setup\NDP' contains sub keys:
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] 'CDF'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] 'v2.0.50727'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] 'v3.0'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] 'v3.5'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] 'v4'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] 'v4.0'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727', value name 'Version': '2.0.50727.4927'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727', value name 'Install': '1'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Testing directory: 'C:\Windows\Microsoft.NET\Framework64\v2.0.50727'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Found version: 2.0.50727
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0', value name 'Version': '3.0.30729.4926'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0', value name 'Install': '1'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Testing directory: 'C:\Windows\Microsoft.NET\Framework64\v3.0'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Found version: 3.0
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5', value name 'Version': '3.5.30729.4926'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5', value name 'Install': '1'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Testing directory: 'C:\Windows\Microsoft.NET\Framework64\v3.5'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Found version: 3.5
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4', value name 'Version' is null.
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4', value name '' is null.
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4' contains sub keys:
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] 'Client'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] 'Full'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'Version': '4.6.01586'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'Install': '1'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'InstallPath': 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'Release': '394802'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Type is System.Int32
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Interpreted version: 4.6.2
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'Version': '4.6.01586'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'Install': '1'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'InstallPath': 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'Release': '394802'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Type is System.Int32
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Interpreted version: 4.6.2
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4.0', value name 'Version' is null.
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4.0', value name '': 'deprecated'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Found 5 versions:
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] 2.0.50727
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] 3.0
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] 3.5
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] 4.6.2
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] 4.6.2
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Testing for min NET Framework version: '4.5'
[2018-01-11 08:08:23Z INFO CommandLineParser] Parse
[2018-01-11 08:08:23Z INFO CommandLineParser] Parsing 19 args
[2018-01-11 08:08:23Z INFO CommandLineParser] parsing argument
[2018-01-11 08:08:23Z INFO CommandLineParser] HasArgs: False
[2018-01-11 08:08:23Z INFO CommandLineParser] Adding Command: configure
[2018-01-11 08:08:23Z INFO CommandLineParser] parsing argument
[2018-01-11 08:08:23Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:08:23Z INFO CommandLineParser] arg: deploymentgroup
[2018-01-11 08:08:23Z INFO CommandLineParser] parsing argument
[2018-01-11 08:08:23Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:08:23Z INFO CommandLineParser] arg: runasservice
[2018-01-11 08:08:23Z INFO CommandLineParser] Adding flag: deploymentgroup
[2018-01-11 08:08:23Z INFO CommandLineParser] parsing argument
[2018-01-11 08:08:23Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:08:23Z INFO CommandLineParser] arg: unattended
[2018-01-11 08:08:23Z INFO CommandLineParser] Adding flag: runasservice
[2018-01-11 08:08:23Z INFO CommandLineParser] parsing argument
[2018-01-11 08:08:23Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:08:23Z INFO CommandLineParser] arg: replace
[2018-01-11 08:08:23Z INFO CommandLineParser] Adding flag: unattended
[2018-01-11 08:08:23Z INFO CommandLineParser] parsing argument
[2018-01-11 08:08:23Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:08:23Z INFO CommandLineParser] arg: auth
[2018-01-11 08:08:23Z INFO CommandLineParser] Adding flag: replace
[2018-01-11 08:08:23Z INFO CommandLineParser] parsing argument
[2018-01-11 08:08:23Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:08:23Z INFO CommandLineParser] Adding option 'auth': 'PAT'
[2018-01-11 08:08:23Z INFO CommandLineParser] parsing argument
[2018-01-11 08:08:23Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:08:23Z INFO CommandLineParser] arg: agent
[2018-01-11 08:08:23Z INFO CommandLineParser] parsing argument
[2018-01-11 08:08:23Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:08:23Z INFO CommandLineParser] Adding option 'agent': 'VSTSAgent171220-DG'
[2018-01-11 08:08:23Z INFO CommandLineParser] parsing argument
[2018-01-11 08:08:23Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:08:23Z INFO CommandLineParser] arg: url
[2018-01-11 08:08:23Z INFO CommandLineParser] parsing argument
[2018-01-11 08:08:23Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:08:23Z INFO CommandLineParser] Adding option 'url': 'https://getsleek.visualstudio.com'
[2018-01-11 08:08:23Z INFO CommandLineParser] parsing argument
[2018-01-11 08:08:23Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:08:23Z INFO CommandLineParser] arg: token
[2018-01-11 08:08:23Z INFO CommandLineParser] parsing argument
[2018-01-11 08:08:23Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:08:23Z INFO CommandLineParser] Adding option 'token': '********'
[2018-01-11 08:08:23Z INFO CommandLineParser] parsing argument
[2018-01-11 08:08:23Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:08:23Z INFO CommandLineParser] arg: work
[2018-01-11 08:08:23Z INFO CommandLineParser] parsing argument
[2018-01-11 08:08:23Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:08:23Z INFO CommandLineParser] Adding option 'work': '_work'
[2018-01-11 08:08:23Z INFO CommandLineParser] parsing argument
[2018-01-11 08:08:23Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:08:23Z INFO CommandLineParser] arg: projectname
[2018-01-11 08:08:23Z INFO CommandLineParser] parsing argument
[2018-01-11 08:08:23Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:08:23Z INFO CommandLineParser] Adding option 'projectname': 'Sleek'
[2018-01-11 08:08:23Z INFO CommandLineParser] parsing argument
[2018-01-11 08:08:23Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:08:23Z INFO CommandLineParser] arg: deploymentgroupname
[2018-01-11 08:08:23Z INFO CommandLineParser] parsing argument
[2018-01-11 08:08:23Z INFO CommandLineParser] HasArgs: True
[2018-01-11 08:08:23Z INFO CommandLineParser] Adding option 'deploymentgroupname': 'Azure'
[2018-01-11 08:08:23Z INFO AgentProcess] Arguments parsed
[2018-01-11 08:08:23Z INFO VstsAgentWebProxy] No proxy setting found.
[2018-01-11 08:08:23Z INFO AgentCertificateManager] No certificate setting found.
[2018-01-11 08:08:23Z INFO Agent] ExecuteCommand
[2018-01-11 08:08:23Z INFO ConfigurationStore] currentAssemblyLocation: C:\VSTSAgent\bin\Agent.Listener.dll
[2018-01-11 08:08:23Z INFO HostContext] Well known directory 'Bin': 'C:\VSTSAgent\bin'
[2018-01-11 08:08:23Z INFO ConfigurationStore] binPath: C:\VSTSAgent\bin
[2018-01-11 08:08:23Z INFO HostContext] Well known directory 'Bin': 'C:\VSTSAgent\bin'
[2018-01-11 08:08:23Z INFO HostContext] Well known directory 'Root': 'C:\VSTSAgent'
[2018-01-11 08:08:23Z INFO ConfigurationStore] RootFolder: C:\VSTSAgent
[2018-01-11 08:08:23Z INFO ConfigurationStore] ConfigFilePath: C:\VSTSAgent\.agent
[2018-01-11 08:08:23Z INFO ConfigurationStore] CredFilePath: C:\VSTSAgent\.credentials
[2018-01-11 08:08:23Z INFO ConfigurationStore] ServiceConfigFilePath: C:\VSTSAgent\.service
[2018-01-11 08:08:23Z INFO ConfigurationStore] AutoLogonSettingsFilePath: C:\VSTSAgent\.autologon
[2018-01-11 08:08:23Z INFO CommandSettings] Flag 'help': 'False'
[2018-01-11 08:08:23Z INFO CommandSettings] Flag 'version': 'False'
[2018-01-11 08:08:23Z INFO CommandSettings] Flag 'commit': 'False'
[2018-01-11 08:08:23Z INFO CommandSettings] Command 'configure': 'True'
[2018-01-11 08:08:23Z INFO ConfigurationManager] ConfigureAsync
[2018-01-11 08:08:23Z INFO ConfigurationStore] IsConfigured()
[2018-01-11 08:08:23Z INFO ConfigurationStore] IsConfigured: False
[2018-01-11 08:08:23Z INFO ConfigurationManager] Is configured: False
[2018-01-11 08:08:23Z INFO CommandSettings] Flag 'sslskipcertvalidation': 'False'
[2018-01-11 08:08:23Z INFO NetFrameworkUtil] Testing for min NET Framework version: '4.6'
[2018-01-11 08:08:23Z INFO CommandSettings] Flag 'machinegroup': 'False'
[2018-01-11 08:08:23Z INFO CommandSettings] Flag 'deploymentgroup': 'True'
[2018-01-11 08:08:23Z INFO ExtensionManager] Getting extensions for interface: 'Microsoft.VisualStudio.Services.Agent.Listener.Configuration.IConfigurationProvider'
[2018-01-11 08:08:23Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.BuildReleasesAgentConfigProvider, Agent.Listener
[2018-01-11 08:08:23Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.DeploymentGroupAgentConfigProvider, Agent.Listener
[2018-01-11 08:08:23Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.SharedDeploymentAgentConfigProvider, Agent.Listener
[2018-01-11 08:08:23Z INFO Terminal] WRITE LINE:
[2018-01-11 08:08:23Z INFO Terminal] WRITE LINE: >> Connect:
[2018-01-11 08:08:23Z INFO Terminal] WRITE LINE:
[2018-01-11 08:08:23Z INFO CommandSettings] Arg 'url': 'https://getsleek.visualstudio.com'
[2018-01-11 08:08:23Z INFO CommandSettings] Remove url from Arg dictionary.
[2018-01-11 08:08:23Z INFO DeploymentGroupAgentConfigProvider] url - https://getsleek.visualstudio.com
[2018-01-11 08:08:23Z INFO ConfigurationManager] GetCredentialProvider
[2018-01-11 08:08:23Z INFO CommandSettings] Arg 'auth': 'PAT'
[2018-01-11 08:08:23Z INFO CommandSettings] Remove auth from Arg dictionary.
[2018-01-11 08:08:23Z INFO ConfigurationManager] Creating credential for auth: PAT
[2018-01-11 08:08:23Z INFO CredentialManager] GetCredentialProvider
[2018-01-11 08:08:23Z INFO CredentialManager] Creating type PAT
[2018-01-11 08:08:23Z INFO CredentialManager] Creating credential type: PAT
[2018-01-11 08:08:23Z INFO PersonalAccessToken] EnsureCredential
[2018-01-11 08:08:23Z INFO CommandSettings] Arg 'token': '********'
[2018-01-11 08:08:23Z INFO CommandSettings] Remove token from Arg dictionary.
[2018-01-11 08:08:23Z INFO PersonalAccessToken] GetVssCredentials
[2018-01-11 08:08:23Z INFO PersonalAccessToken] token retrieved: 52 chars
[2018-01-11 08:08:23Z INFO ConfigurationManager] cred retrieved
[2018-01-11 08:08:23Z INFO Terminal] WRITE LINE: Connecting to server ...
[2018-01-11 08:08:23Z INFO DeploymentGroupAgentConfigProvider] Test connection with deployment group
[2018-01-11 08:08:23Z INFO VisualStudioServices] Starting operation Location.GetConnectionData
[2018-01-11 08:08:25Z INFO VisualStudioServices] Finished operation Location.GetConnectionData
[2018-01-11 08:08:25Z INFO DeploymentGroupAgentConfigProvider] Connect complete for deployment group
[2018-01-11 08:08:25Z INFO ConfigurationManager] Test Connection complete.
[2018-01-11 08:08:25Z INFO RSAEncryptedFileKeyManager] Creating new RSA key using 2048-bit key length
[2018-01-11 08:08:25Z INFO RSAEncryptedFileKeyManager] Successfully saved RSA key parameters to file C:\VSTSAgent\.credentials_rsaparams
[2018-01-11 08:08:25Z INFO Terminal] WRITE LINE:
[2018-01-11 08:08:25Z INFO Terminal] WRITE LINE: >> Register Agent:
[2018-01-11 08:08:25Z INFO Terminal] WRITE LINE:
[2018-01-11 08:08:25Z INFO CommandSettings] Arg 'projectname': 'Sleek'
[2018-01-11 08:08:25Z INFO CommandSettings] Remove projectname from Arg dictionary.
[2018-01-11 08:08:25Z INFO CommandSettings] Arg 'deploymentgroupname': 'Azure'
[2018-01-11 08:08:25Z INFO CommandSettings] Remove deploymentgroupname from Arg dictionary.
[2018-01-11 08:08:25Z INFO CommandSettings] Flag 'unattended': 'True'
[2018-01-11 08:08:25Z ERR Agent] Microsoft.TeamFoundation.DistributedTask.WebApi.DeploymentGroupNotFoundException: Deployment Group not found: 'Azure'
at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.DeploymentGroupAgentConfigProvider.<GetDeploymentGroupAsync>d__18.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.Configuration.DeploymentGroupAgentConfigProvider.<GetPoolId>d__9.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.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()
[2018-01-11 08:08:25Z ERR Terminal] WRITE ERROR: Deployment Group not found: 'Azure'
If a config file is disappearing, it sounds like some sort of corruption etc going on. You will need to figure out why files are disappearing.
Close this as we change the windows service to be delayed auto start on Windows.
@TingluoHuang
At our environment, the startup type was set as "Automactic (Delayed Start)", but also didn't automatically start (not even 5 hours after the reboot).
Manually starting did work.
It seems that the "fix" to delay the start, isn't a total fix.
When I start the service on Windows 10, it returns an error (error 1068)