rennokki/laravel-aws-eb

Problem with new instances launched by auto scaling

mchumer opened this issue · 4 comments

Hi,

I've been trying to solve this problem.

When I deploy a new application version all instances on the auto scaling group work well.. All of them respond on health checks.

However, when a new instance is launched by auto scaling, this new instance don't pass on health check.

If I have two instances on my environments and one is not healthy and I deploy a new version off the App, then both instances becomes healthy.

I've been investigating all the logs and I've found the problem bellow.. I don't know if this is what cause the problem but it's a problem...

So... Can somebody help me?

[2020-09-19T12:50:14.326Z] Sending signal 0 to CFN wait condition https://cloudformation-waitcondition-us-east-1.s3.amazonaws.com/arn%3Aaws%3Acloudformation%3Aus-east-1%3A932404652971%3Astack/awseb-e-38r7gqg8xp-stack/e972b630-f67f-11ea-8859-12bdd946785e/AWSEBInstanceLaunchWaitHandle?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20200914T114629Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86399&X-Amz-Credential=AKIAIIT3CWAIMJYUTISA%2F20200914%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=8853fd1d98a1d6e6d52c261fd42e85edf7834881bcc01e854f699cb1ba577170
Error signaling CloudFormation: [Errno 403] HTTP Error 403 :
AccessDeniedRequest has expired863992020-09-15T11:46:28Z2020-09-19T12:50:14Z974C16058757A26E8T4XS0mKn16PFeWnBbet5ChYS0saDtHeJng3VS0gR5JZ3KAAW0CggQcRVX53PGaenk5BROidV0o=
[2020-09-19T12:50:15.159Z] Wait Condition Signal expired.

Can you by any means send me the content of your .ebextensions/00_copy_env_file.config via email (you can find it on my profile) ?

Thank you.. email sent..

@rennokki Did you fix this issue? I'm also getting like this.

@rennokki

I'm using $SERVER variable In laravel app of config files . for example, i added 'env' => array_key_exists('APP_ENV', $_SERVER) ? $_SERVER['APP_ENV'] : env('APP_ENV', 'production'), in config/app.php file.

Does it triggers this issue? Then Now I have added your 00_pass_envs_to_server.config file in .ebextenstion.

Please clarify my issue.
Thanks