diff --git a/.changelog/12962.txt b/.changelog/12962.txt new file mode 100644 index 000000000000..d8a2e2c81a83 --- /dev/null +++ b/.changelog/12962.txt @@ -0,0 +1,3 @@ +```release-note:bug +agent: fixed a panic on startup when the `server.protocol_version` config parameter was set +``` diff --git a/command/agent/command.go b/command/agent/command.go index 74cbb7ef0127..42aa4a553a40 100644 --- a/command/agent/command.go +++ b/command/agent/command.go @@ -436,7 +436,7 @@ func (c *Command) IsValidConfig(config, cmdConfig *Config) bool { // ProtocolVersion has never been used. Warn if it is set as someone // has probably made a mistake. if config.Server.ProtocolVersion != 0 { - c.agent.logger.Warn("Please remove deprecated protocol_version field from config.") + c.Ui.Warn("Please remove deprecated protocol_version field from config.") } return true