Skip to content

Upgrading from 0.4.6 to 0.4.7 causes nil pointer exception #1167

@aas47

Description

@aas47

Here's the output snippet.

{"@level":"info","@message":"server now listening for connections","@module":"agent.http_server","@timestamp":"2025-09-19T19:25:37.357644Z","address":"0.0.0.0:27242"}
{"@level":"info","@message":"successfully launched and dispensed plugin","@module":"agent.plugin_manager","@timestamp":"2025-09-19T19:25:37.362530Z","plugin_name":"aws-asg"}
{"@level":"info","@message":"starting workers","@module":"policy_eval","@timestamp":"2025-09-19T19:25:37.362705Z","cluster":10,"horizontal":0}
{"@level":"info","@message":"starting policy source","@module":"policy_manager","@timestamp":"2025-09-19T19:25:37.362833Z","source":"file"}
{"@level":"info","@message":"starting policy source","@module":"policy_manager","@timestamp":"2025-09-19T19:25:37.363608Z","source":"nomad"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x80 pc=0x14ff7e8]

goroutine 16 [running]:
github.com/hashicorp/nomad-autoscaler/policy.(*Manager).monitorPolicies(0x400051a6c0, {0x22b2870, 0x4000173e00}, 0x40001764d0)
	github.com/hashicorp/nomad-autoscaler/policy/manager.go:209 +0x9f8
github.com/hashicorp/nomad-autoscaler/policy.(*Manager).Run(0x400051a6c0, {0x22b2870, 0x4000173e00}, 0x40001764d0)
	github.com/hashicorp/nomad-autoscaler/policy/manager.go:104 +0x164
created by github.com/hashicorp/nomad-autoscaler/agent.(*Agent).Run in goroutine 1
	github.com/hashicorp/nomad-autoscaler/agent/agent.go:82 +0x298

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions