Skip to content

panic: No instance found with instance-id #367

@ichasco-heytrade

Description

@ichasco-heytrade

Hi, I have configured NTH with SQS and I am getting errors when a spot instance is released. It still detecting it in SQS (I think) and giving errors because now it doesn't exists.

...
2021/02/17 19:25:16 DBG Checking for queue messages
2021/02/17 19:25:16 ??? There was a problem monitoring for events error="No instance found with instance-id i-036d0327276ea8741" event_type=SQS_TERMINATE
2021/02/17 19:25:18 DBG Checking for queue messages
...
2021/02/17 19:25:54 ??? There was a problem monitoring for events error="No instance found with instance-id i-036d0327276ea8741" event_type=SQS_TERMINATE
2021/02/17 19:25:54 ??? Stopping NTH - Duplicate Error Threshold hit.
panic: No instance found with instance-id i-036d0327276ea8741

goroutine 72 [running]:
main.main.func3(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1ca8720, ...)
	/node-termination-handler/cmd/node-termination-handler.go:184 +0x4d1
created by main.main
	/node-termination-handler/cmd/node-termination-handler.go:167 +0x91c

Version of NTH: v1.12.0

Configuration:

2021/02/17 19:31:17 ??? Startup Metadata Retrieved metadata={"accountId":"XXXXXXXX","availabilityZone":"eu-west-1b","instanceId":"i-090bb5ba647dad92e","instanceType":"m5.xlarge","localHostname":"ip-10-11-10-152","privateIp":"10.11.10.152","publicHostname":"","publicIp":"","region":"eu-west-1"}
2021/02/17 19:31:17 ??? aws-node-termination-handler arguments: 
	dry-run: false,
	node-name: ip-10-11-10-152.eu-west-1.compute.internal,
	metadata-url: http://169.254.169.254,
	kubernetes-service-host: 172.20.0.1,
	kubernetes-service-port: 443,
	delete-local-data: true,
	ignore-daemon-sets: true,
	pod-termination-grace-period: -1,
	node-termination-grace-period: 120,
	enable-scheduled-event-draining: false,
	enable-spot-interruption-draining: false,
	enable-sqs-termination-draining: true,
	enable-rebalance-monitoring: false,
	metadata-tries: 3,
	cordon-only: false,
	taint-node: false,
	json-logging: false,
	log-level: debug,
	webhook-proxy: ,
	webhook-headers: <not-displayed>,
	webhook-url: <provided-not-displayed>,
	webhook-template: <not-displayed>,
	uptime-from-file: ,
	enable-prometheus-server: false,
	prometheus-server-port: 9092,
	aws-region: eu-west-1,
	queue-url: https://sqs.eu-west-1.amazonaws.com/XXXXXXXXX/NTH,
	check-asg-tag-before-draining: true,
	managed-asg-tag: aws-node-termination-handler/managed,
	aws-endpoint: ,

2021/02/17 19:31:18 DBG AWS Credentials retrieved from provider: WebIdentityCredentials
2021/02/17 19:31:18 ??? Started watching for interruption events
2021/02/17 19:31:18 ??? Kubernetes AWS Node Termination Handler has started successfully!
2021/02/17 19:31:18 ??? Started watching for event cancellations
2021/02/17 19:31:18 ??? Started monitoring for events event_type=SQS_TERMINATE
2021/02/17 19:31:20 DBG Checking for queue messages

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions