Error when starting a new instance (IllegalArgumentException)

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

When starting elastic agents, the following error appears in the UI: 

Failed to start elastic instances: Error when starting a new instance

The following stack trace appears in atlassian-bamboo.log:

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.

Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.