buildkite / lifecycled

A daemon for responding to AWS AutoScaling Lifecycle Hooks
MIT License
146 stars 34 forks source link

MissingRegion: could not find region configuration #64

Closed Urahara closed 5 years ago

Urahara commented 5 years ago

I configured everything, them i copied the arn address from AWS SNS but this erros occurs when i run the command: systemctl start lifecycled

Jan 07 18:32:08 ip-172-30-74-53 systemd[1]: Started Autoscale Lifecycle Daemon.
Jan 07 18:32:08 ip-172-30-74-53 lifecycled[2156]: time="2019-01-07T18:32:08Z" level=info msg="Looking up instance id from metadata service"
Jan 07 18:32:08 ip-172-30-74-53 lifecycled[2156]: time="2019-01-07T18:32:08Z" level=info msg="Starting listener" instanceId=i-0b2dfc8542b54c50c listener=spot
Jan 07 18:32:08 ip-172-30-74-53 lifecycled[2156]: time="2019-01-07T18:32:08Z" level=info msg="Starting listener" instanceId=i-0b2dfc8542b54c50c listener=autos
Jan 07 18:32:08 ip-172-30-74-53 lifecycled[2156]: time="2019-01-07T18:32:08Z" level=info msg="Waiting for termination notices" instanceId=i-0b2dfc8542b54c50c
Jan 07 18:32:08 ip-172-30-74-53 lifecycled[2156]: time="2019-01-07T18:32:08Z" level=error msg="Failed to start listener" error="MissingRegion: could not find region configuration" instanceId=i-0b2dfc8542b54c50c listener=autoscaling
Jan 07 18:32:08 ip-172-30-74-53 lifecycled[2156]: time="2019-01-07T18:32:08Z" level=error msg="Failed to start listener" error="MissingRegion: could not find region configuration" instanceId=i-0b2dfc8542b54c50c listener=spot
Jan 07 18:32:08 ip-172-30-74-53 lifecycled[2156]: lifecycled: error: an error occured, try --help
Jan 07 18:32:08 ip-172-30-74-53 systemd[1]: lifecycled.service: Main process exited, code=exited, status=1/FAILURE
Jan 07 18:32:08 ip-172-30-74-53 systemd[1]: lifecycled.service: Failed with result 'exit-code'.
lox commented 5 years ago

Sounds like you need to set AWS_REGION!

Urahara commented 5 years ago

I set this /etc/lifecycled in file?

lox commented 5 years ago

Yup, because https://github.com/buildkite/lifecycled/blob/master/init/systemd/lifecycled.unit uses that file for environment, you can set it in there.

Urahara commented 5 years ago

@lox Thanks! I think will be awesome put this info on README too.

Also discover that i have set the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY in order to make make work, thanks!

gmagella-ca commented 5 years ago

I know this is already closed, but PLEASE put this information (need for AWS_REGION) on the README. I've spend some time trying to find how to fix this.. Also, I couldn't pass while running manually the executable (--debug), couldn't find a way to pass it...

lox commented 5 years ago

Sorry about that! We’ll try and get something in the README, if you felt inclined we’d truly appreciate a PR!