Girish
Girish

Reputation: 201

Setting up Self Hosted Agent on Windows machine : WRITE ERROR: An error occurred: Not configured

Trying to set up Self Hosted Azure DevOps Agent on the windows machine. Pre-requisites are verified and hold good - Windows 10 machine, Powershell 5.1, .NET Framework 4.7. PAT is properly configured, the Agent Administrator role is assigned to the user. When run.cmd is executed, the message appears "the error occurs: Not configured"

When checked the logs under _diag folder, this is a snapshot of the error

[2020-04-16 18:47:26Z INFO ConfigurationManager] LoadSettings
[2020-04-16 18:47:26Z INFO ConfigurationStore] IsConfigured()
[2020-04-16 18:47:26Z INFO ConfigurationStore] IsConfigured: False
[2020-04-16 18:47:26Z INFO ConfigurationManager] Is configured: False
[2020-04-16 18:47:26Z ERR  Terminal] WRITE ERROR: An error occurred: Not configured
[2020-04-16 18:47:26Z ERR  AgentProcess] System.InvalidOperationException: Not configured
   at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.LoadSettings()
   at Microsoft.VisualStudio.Services.Agent.Listener.Agent.ExecuteCommand(CommandSettings command)
   at Microsoft.VisualStudio.Services.Agent.Listener.Program.MainAsync(IHostContext context, String[] args)

Appreciate to receive any inputs

Upvotes: 3

Views: 4171

Answers (2)

Justin
Justin

Reputation: 1503

In my case, the agent was corrupted. the config.cmd was missing entirely. Reinstalling the agent resolved the issue.

Upvotes: 0

Calidus
Calidus

Reputation: 1404

config.cmd must be be ran and complete successfully before running run.cmd

Upvotes: 2

Related Questions