By using AWS re:Post, you agree to the Terms of Use

Can't update environment variables in elastic beanstalk environment

0

Have an elastic beanstalk environment that's a clone of a different environment that can't do cloudwatch log streaming for some reason but that's another story.

I'm trying to update this environment's configuration. Specifically, I'm trying to toggle an environment variable value from "true" to "false". When I do this in the web console, this is the output:

2022-01-05 14:26:57 UTC-0500	
INFO
	The environment was reverted to the previous configuration setting.
2022-01-05 14:26:24 UTC-0500	
ERROR
	During an aborted deployment, some instances may have deployed the new application version. To ensure all instances are running the same version, re-deploy the appropriate application version.
2022-01-05 14:26:24 UTC-0500	
ERROR
	Failed to deploy configuration.
2022-01-05 14:26:23 UTC-0500	
ERROR
	Unsuccessful command execution on instance id(s) 'i-077df8c5051489285'. Aborting the operation.
2022-01-05 14:26:23 UTC-0500	
INFO
	Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2022-01-05 14:26:23 UTC-0500	
ERROR
	[Instance: i-077df8c5051489285] Command failed on instance. An unexpected error has occurred [ErrorCode: 0000000001].
2022-01-05 14:25:18 UTC-0500	
INFO
	Updating environment api-prod-clone's configuration settings.
2022-01-05 14:25:09 UTC-0500	
INFO
	Environment update is starting.

Have tried this about a half dozen times now, the failure is the same every time. The single instance in this environment winds up degraded and I have to terminate it to get the environment back to OK status.

Figuring maybe the web console was just broken, I next tried the eb CLI.

eb setenv DISABLE_CONSOLE_LOGS=false -e api-prod-clone
2022-01-05 19:25:09    INFO    Environment update is starting.      
2022-01-05 19:25:18    INFO    Updating environment api-prod-clone's configuration settings.
2022-01-05 19:26:23    ERROR   [Instance: i-077df8c5051489285] Command failed on instance. An unexpected error has occurred [ErrorCode: 0000000001].
2022-01-05 19:26:23    INFO    Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2022-01-05 19:26:23    ERROR   Unsuccessful command execution on instance id(s) 'i-077df8c5051489285'. Aborting the operation.
2022-01-05 19:26:24    ERROR   Failed to deploy configuration.      
                                                                      
ERROR: ServiceError - Failed to deploy configuration.

So, I give up. How do you modify the environment variables for an eb environment?

asked 9 months ago1095 views
2 Answers
0

EC2 instances in your Elastic Beanstalk environment generate logs that you can view to troubleshoot issues with your application or configuration files. You can easily retrieve them by using the environment management console or the EB CLI.

Via the console you can pull the last 100 lines of the most commonly used log files. The ones probably of most interest will be eb-activity.log and eb-commandprocessor.log as these logs contain messages about deployment activities and particular stack traces associated with errors during deployment.

Its possible there is a more detailed error message which may help to understand what the issue is.

answered 9 months ago
0

I have also noticed that after setting up an environment (cloning or from scratch) it says it's "ready" sooner then it really is. I found I have to wait another 10-20 minutes sometimes after the env says "ready" before I can change the Configurations or Deploy to it.

answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions