Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

AWS Elastic Beanstalk Environment task exception solution stack

Kev Gunn
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 3, 2019

I keep getting this exception even though i'm selecting from the provided solution stack options, Does it want some other solution stack identifier?

04-Dec-2019 08:30:21 Starting task 'Create AWS ENS env' of type 'net.utoolity.atlassian.bamboo.tasks-for-aws:aws.elasticbeanstalk.environment'
04-Dec-2019 08:30:21 Setting maxErrorRetry=7 and awaitTransitionInterval=15000
04-Dec-2019 08:30:21 Using basic credentials entered directly in task configuration
04-Dec-2019 08:30:21 Selecting region ap-southeast-2
04-Dec-2019 08:30:22 Creating environment 'app-env' as 'WebServer (1.0)' tier for application 'app':
04-Dec-2019 08:30:22 ... using configuration source '64bit Amazon Linux 2018.03 v2.9.2 running Java 8'
04-Dec-2019 08:30:22 ElasticBeanstalk request rejected by AWS!
04-Dec-2019 08:30:22 com.amazonaws.services.elasticbeanstalk.model.AWSElasticBeanstalkException: No Solution Stack named '64bit Amazon Linux 2018.03 v2.9.2 running Java 8' found. (Service: AWSElasticBeanstalk; Status Code: 400; Error Code: InvalidParameterValue; Request ID: e80ba660-4ce5-423f-b9e8-8fb6f85b00e7)
04-Dec-2019 08:30:22 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1712)
04-Dec-2019 08:30:22 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1367)
04-Dec-2019 08:30:22 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1113)
04-Dec-2019 08:30:22 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:770)
04-Dec-2019 08:30:22 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:744)
04-Dec-2019 08:30:22 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:726)
04-Dec-2019 08:30:22 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:686)
04-Dec-2019 08:30:22 at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:668)
04-Dec-2019 08:30:22 at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:532)
04-Dec-2019 08:30:22 at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:512)
04-Dec-2019 08:30:22 at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.doInvoke(AWSElasticBeanstalkClient.java:3147)
04-Dec-2019 08:30:22 at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.invoke(AWSElasticBeanstalkClient.java:3114)
04-Dec-2019 08:30:22 at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.invoke(AWSElasticBeanstalkClient.java:3103)
04-Dec-2019 08:30:22 at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.executeCreateEnvironment(AWSElasticBeanstalkClient.java:837)
04-Dec-2019 08:30:22 at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.createEnvironment(AWSElasticBeanstalkClient.java:809)
04-Dec-2019 08:30:22 at net.utoolity.atlassian.bamboo.taws.ElasticBeanstalkEnvironmentTask.executeCreate(ElasticBeanstalkEnvironmentTask.java:327)
04-Dec-2019 08:30:22 at net.utoolity.atlassian.bamboo.taws.ElasticBeanstalkEnvironmentTask.execute(ElasticBeanstalkEnvironmentTask.java:138)
04-Dec-2019 08:30:22 at net.utoolity.atlassian.bamboo.taws.AWSTask.execute(AWSTask.java:164)
04-Dec-2019 08:30:22 at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$3(TaskExecutorImpl.java:319)
04-Dec-2019 08:30:22 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:252)
04-Dec-2019 08:30:22 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:319)
04-Dec-2019 08:30:22 at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:112)
04-Dec-2019 08:30:22 at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:73)
04-Dec-2019 08:30:22 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:203)
04-Dec-2019 08:30:22 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:175)
04-Dec-2019 08:30:22 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:131)
04-Dec-2019 08:30:22 at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:185)
04-Dec-2019 08:30:22 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:125)
04-Dec-2019 08:30:22 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:126)
04-Dec-2019 08:30:22 at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
04-Dec-2019 08:30:22 at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
04-Dec-2019 08:30:22 at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
04-Dec-2019 08:30:22 at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
04-Dec-2019 08:30:22 at java.lang.Thread.run(Thread.java:748)
04-Dec-2019 08:30:22 Finished task 'Create AWS ENS env' with result: Error

1 answer

1 vote
Steffen Opel _Utoolity_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 5, 2019

Thank you for using our apps, and sorry for not noticing your question here in time.

To hopefully help other users who might encounter the same issue, I'll post below the relevant summary of what we have figured out via your subsequent support request, thanks again for pointing out this usability flaw!

Cause

You are encountering a scenario that is partially new for me as well, but it turns out that AWS has been getting more aggressive in making superseded Elastic Beanstalk solution stacks unavailable for those customers that have never been using them, see Java SE Platform History:

Platform versions that you used to launch or update an environment in the last 30 days remain available (to the using account, in the used region) even after they are no longer current.

According to the history, the offending '64bit Amazon Linux 2018.03 v2.9.2 running Java 8' were current between September 6, 2019 and October 16, 2019, so if you have never used it before, it has apparently become inaccessible by now.

Workaround

As a workaround, you can always just specify the latest supported platform as a text string when specifying the 'Solution Stack Name' within the 'Create Environment' action of the AWS Elastic Beanstalk Environment task - so for Java SE this would be '64bit Amazon Linux 2018.03 v2.10.1 running Java 8' right now. Apparently this will remain available in your account once you have used it at least once.

Possible improvement

We always ship the latest solution stacks with our most recent patch release, but even the '64bit Amazon Linux 2018.03 v2.10.0 running Java 8' shipped with Tasks for AWS 2.19.1 is already outdated again. Accordingly, we need to think about how to improve on this going forward so that the workaround is at least easier to discover, or possibly entirely avoided by fetching the most current list at runtime for example (so far our app does not do any runtime lookups though).

Cheers,
Steffen

Siva Karuppiah December 14, 2021

Did you guys fix this issue? I'm still getting this exception, I'm trying to create a tomcat environment. 

Could pls help me out on this ?

 

Creating environment 'MyTest-Env' as 'WebServer (1.0)' tier for application 'MyTest':
15-Dec-2021 04:51:13 ... using configuration source 'Tomcat 8.5 with Corretto 11 running on 64bit Amazon Linux 2'
15-Dec-2021 04:51:13 ElasticBeanstalk request rejected by AWS!
15-Dec-2021 04:51:13 com.amazonaws.services.elasticbeanstalk.model.AWSElasticBeanstalkException: No Solution Stack named 'Tomcat 8.5 with Corretto 11 running on 64bit Amazon Linux 2' found. (Service: AWSElasticBeanstalk; Status Code: 400; Error Code: InvalidParameterValue; Request ID: c86dab0f-04ba-4a9d-a8ce-21a5c12cbc37; Proxy: null)
15-Dec-2021 04:51:13 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1862)
15-Dec-2021 04:51:13 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleServiceErrorResponse(AmazonHttpClient.java:1415)
15-Dec-2021 04:51:13 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1384)
15-Dec-2021 04:51:13 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1154)
15-Dec-2021 04:51:13 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:811)
15-Dec-2021 04:51:13 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:779)
15-Dec-2021 04:51:13 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:753)
15-Dec-2021 04:51:13 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:713)
15-Dec-2021 04:51:13 at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:695)
15-Dec-2021 04:51:13 at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:559)
15-Dec-2021 04:51:13 at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:539)
15-Dec-2021 04:51:13 at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.doInvoke(AWSElasticBeanstalkClient.java:3532)
15-Dec-2021 04:51:13 at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.invoke(AWSElasticBeanstalkClient.java:3499)
15-Dec-2021 04:51:13 at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.invoke(AWSElasticBeanstalkClient.java:3488)
15-Dec-2021 04:51:13 at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.executeCreateEnvironment(AWSElasticBeanstalkClient.java:939)
15-Dec-2021 04:51:13 at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.createEnvironment(AWSElasticBeanstalkClient.java:907)
15-Dec-2021 04:51:13 at net.utoolity.atlassian.bamboo.taws.ElasticBeanstalkEnvironmentTask.executeCreate(ElasticBeanstalkEnvironmentTask.java:322)
15-Dec-2021 04:51:13 at net.utoolity.atlassian.bamboo.taws.ElasticBeanstalkEnvironmentTask.execute(ElasticBeanstalkEnvironmentTask.java:147)
15-Dec-2021 04:51:13 at net.utoolity.atlassian.bamboo.taws.AWSTask.execute(AWSTask.java:202)
15-Dec-2021 04:51:13 at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$3(TaskExecutorImpl.java:323)
15-Dec-2021 04:51:13 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:258)
15-Dec-2021 04:51:13 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:323)
15-Dec-2021 04:51:13 at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:118)
15-Dec-2021 04:51:13 at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:73)
15-Dec-2021 04:51:13 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:205)
15-Dec-2021 04:51:13 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:177)
15-Dec-2021 04:51:13 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:168)
15-Dec-2021 04:51:13 at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:118)
15-Dec-2021 04:51:13 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:161)
15-Dec-2021 04:51:13 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.lambda$start$0(DefaultBuildAgent.java:122)
15-Dec-2021 04:51:13 at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
15-Dec-2021 04:51:13 at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
15-Dec-2021 04:51:13 at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
15-Dec-2021 04:51:13 at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
15-Dec-2021 04:51:13 at java.base/java.lang.Thread.run(Thread.java:829)
15-Dec-2021 04:51:13 Finished task 'CreateEnv' with result: Error
15-Dec-2021 04:51:13 Running post build plugin 'NCover Results Collector'
15-Dec-2021 04:51:13 Running post build plugin 'Artifact Copier'
15-Dec-2021 04:51:13 Running post build plugin 'npm Cache Cleanup'
15-Dec-2021 04:51:13 Running post build plugin 'Clover Results Collector'
15-Dec-2021 04:51:13 Running post build plugin 'Docker Container Cleanup'
15-Dec-2021 04:51:13 Finalising the build...
15-Dec-2021 04:51:13 Stopping timer.
15-Dec-2021 04:51:13 Build PRES-PRES-JOB1-29 completed.
15-Dec-2021 04:51:13 Running on server: post build plugin 'NCover Results Collector'
15-Dec-2021 04:51:13 Running on server: post build plugin 'Build Hanging Detection Configuration'
15-Dec-2021 04:51:13 Running on server: post build plugin 'Clover Delta Calculator'
15-Dec-2021 04:51:13 Running on server: post build plugin 'Maven Dependencies Postprocessor' 

Like Steffen Opel _Utoolity_ likes this
Steffen Opel _Utoolity_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 16, 2021

Hi @Siva Karuppiah , and welcome to the Atlassian Community!

We have not yet introduced a runtime lookup of supported platform versions, so my answer and suggested workaround still apply:

Problem

Just like with the original question, the API is refusing to accept the specified solution stack:

com.amazonaws.services.elasticbeanstalk.model.AWSElasticBeanstalkException: No Solution Stack named 'Tomcat 8.5 with Corretto 11 running on 64bit Amazon Linux 2' found.

Your scenario differs slightly, insofar the referenced solution stack 'Tomcat 8.5 with Corretto 11 running on 64bit Amazon Linux 2' is not listed in the resp. Tomcat platform history, do you happen to know where the specification stems from (see below for the workaround)?

Workaround

As a workaround, you can always just specify the latest supported platform as a text string when specifying the 'Solution Stack Name' within the 'Create Environment' action of the AWS Elastic Beanstalk Environment task - [...]

As per the Elastic Beanstalk supported platforms summary, the equivalent current solution stack name would be '64bit Amazon Linux 2 v4.2.8 running Tomcat 8.5 Corretto 11', so if you replace the current solution stack name with this one (w/o the quotes), things should work as expected!

I hope this helps, please let us know how it goes.

Cheers,
Steffen

Like Henrik Opel _Utoolity_ likes this
Siva Karuppiah December 16, 2021

@Steffen Opel _Utoolity_ , Thanks for you reply, After updating the solution stack name as '64bit Amazon Linux 2 v4.2.8 running Tomcat 8.5 Corretto 11' im getting below exception,

 

Creating environment 'MyApp-Env' as 'WebServer (1.0)' tier for application 'MyApp':
simple 17-Dec-2021 05:03:02 ... using configuration source '64bit Amazon Linux 2 v4.2.8 running Tomcat 8.5 Corretto 11'
simple 17-Dec-2021 05:03:04 ... waiting for status transition of environment 'e-cqtijcnrmm' ('MyApp-Env') from 'Launching' to 'Ready'
simple 17-Dec-2021 05:03:05 ... 'MyApp-Env': 20211217T050303Z [INFO] createEnvironment is starting.
simple 17-Dec-2021 05:03:20 ... 'MyApp-Env': 20211217T050304Z [INFO] Using elasticbeanstalk-eu-west-1-716523076871 as Amazon S3 storage bucket for environment data.
simple 17-Dec-2021 05:03:20 ... 'MyApp-Env': 20211217T050307Z [ERROR] Environment must have instance profile associated with it.
simple 17-Dec-2021 05:03:20 ... 'MyApp-Env': 20211217T050307Z [ERROR] Failed to launch environment.
simple 17-Dec-2021 05:03:20 ... 'MyApp-Env': 20211217T050308Z [INFO] Deleting SNS topic for environment MyApp-Env.
error 17-Dec-2021 05:03:20 Failed to fetch resource from AWS!
error 17-Dec-2021 05:03:20 java.lang.RuntimeException: Expected single EnvironmentDescription, but found none
error 17-Dec-2021 05:03:20 at net.utoolity.atlassian.bamboo.taws.aws.ElasticBeanstalk.getSingleEnvironmentDescription(ElasticBeanstalk.java:373)
error 17-Dec-2021 05:03:20 at net.utoolity.atlassian.bamboo.taws.ElasticBeanstalkEnvironmentTask.checkTransitionCompletion(ElasticBeanstalkEnvironmentTask.java:694)
error 17-Dec-2021 05:03:20 at net.utoolity.atlassian.bamboo.taws.ElasticBeanstalkEnvironmentTask.waitForTransitionCompletion(ElasticBeanstalkEnvironmentTask.java:581)
error 17-Dec-2021 05:03:20 at net.utoolity.atlassian.bamboo.taws.ElasticBeanstalkEnvironmentTask.waitForTransitionCompletion(ElasticBeanstalkEnvironmentTask.java:559)
error 17-Dec-2021 05:03:20 at net.utoolity.atlassian.bamboo.taws.ElasticBeanstalkEnvironmentTask.waitForSingleTransitionCompletion(ElasticBeanstalkEnvironmentTask.java:536)
error 17-Dec-2021 05:03:20 at net.utoolity.atlassian.bamboo.taws.ElasticBeanstalkEnvironmentTask.executeCreate(ElasticBeanstalkEnvironmentTask.java:328)
error 17-Dec-2021 05:03:20 at net.utoolity.atlassian.bamboo.taws.ElasticBeanstalkEnvironmentTask.execute(ElasticBeanstalkEnvironmentTask.java:147)
error 17-Dec-2021 05:03:20 at net.utoolity.atlassian.bamboo.taws.AWSTask.execute(AWSTask.java:202)

Like Steffen Opel _Utoolity_ likes this
Steffen Opel _Utoolity_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 19, 2021

@Siva Karuppiah - the problem is actually the first error reported in the log, i.e. 'Environment must have instance profile associated with it'. Requiring an instance profile is an upstream change that is difficult to model in the task configuration validation, we provide an example 'IAM Instance Profile' snippet within the 'Configuration Option Settings' under 'Advanced Options' though:

cac-1242561-1.png

Here's the JSON depicted in the screenshot:

[
{
"Namespace": "aws:autoscaling:launchconfiguration",
"OptionName": "IamInstanceProfile",
"Value": "aws-elasticbeanstalk-ec2-role"
}
]

After I also specified an instance profile like this, using ''64bit Amazon Linux 2 v4.2.8 running Tomcat 8.5 Corretto 11' w/o any additional configuration worked fine for me.

If the above doesn't fully address things, please sign-up to our support instance to discuss further details of your scenario in a more suitable setting (I've created a support request on your behalf and will assign it to you after you've logged in once).

Siva Karuppiah December 23, 2021

@Steffen Opel _Utoolity_ , Thanks so much. It working now. 

Like Steffen Opel _Utoolity_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events