Error when starting a new instance (IllegalArgumentException)
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
When starting elastic agents, the following error appears in the UI:
1
Failed to start elastic instances: Error when starting a new instance
The following stack trace appears in atlassian-bamboo.log
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2015-12-22 19:41:02,403 ERROR [scheduler_Worker-1] [ElasticInstancesMonitorJob] Failed to adjust the number of elastic agents.
com.atlassian.aws.AWSException: Error when starting a new instance
at com.atlassian.bamboo.agent.elastic.server.ElasticFunctionalityFacadeImpl.startupAgents(ElasticFunctionalityFacadeImpl.java:199)
at com.atlassian.bamboo.agent.elastic.schedule.ElasticInstancesMonitorJob.execute(ElasticInstancesMonitorJob.java:50)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)
at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
Caused by: java.lang.IllegalArgumentException
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:72)
at com.atlassian.aws.ec2.model.SubnetId.<init>(SubnetId.java:37)
at com.atlassian.aws.ec2.model.SubnetId.from(SubnetId.java:54)
at com.atlassian.aws.ec2.model.SubnetId$2.apply(SubnetId.java:30)
at com.atlassian.aws.ec2.model.SubnetId$2.apply(SubnetId.java:26)
at com.google.common.collect.Iterators$8.next(Iterators.java:812)
at com.google.common.collect.Lists.newArrayList(Lists.java:139)
at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:256)
at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:217)
at com.atlassian.aws.ec2.model.ResourceId.from(ResourceId.java:59)
at com.atlassian.aws.ec2.model.SubnetId.from(SubnetId.java:72)
at com.atlassian.bamboo.agent.elastic.server.ElasticFunctionalityFacadeImpl.getVpcsAndSubnets(ElasticFunctionalityFacadeImpl.java:217)
at com.atlassian.bamboo.agent.elastic.server.ElasticFunctionalityFacadeImpl.ensureSecurityGroupsExist(ElasticFunctionalityFacadeImpl.java:235)
Cause
Some configuration information that is required to start the elastic agent is not found.
There has been some reported cases where such configuration disappeared after performing an upgrade.
Resolution
Check the image configuration and verify that all required information such as VPC subnet if VPC is used is selected to its proper values.
Was this helpful?