Bamboo export fails with error messages related to EC2

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

問題

Bamboo export fails and displays the following type of error messages:

2015-11-04 15:41:08,667 ERROR [http-apr-8085-exec-25] [Export] org.springframework.orm.hibernate.HibernateSystemException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.EC2InstanceType; nested exception is net.sf.hibernate.HibernateException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.EC2InstanceType
org.springframework.orm.hibernate.HibernateSystemException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.EC2InstanceType; nested exception is net.sf.hibernate.HibernateException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.EC2InstanceType
Caused by: net.sf.hibernate.HibernateException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.EC2InstanceType
at com.atlassian.bamboo.hibernate.GenericEnumUserType.nullSafeGet(GenericEnumUserType.java:70)
at net.sf.hibernate.type.CustomType.nullSafeGet(CustomType.java:92)
at net.sf.hibernate.type.AbstractType.hydrate(AbstractType.java:67)
at net.sf.hibernate.loader.Loader.hydrate(Loader.java:690)
at net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.java:631)
at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:590)
at net.sf.hibernate.loader.Loader.getRow(Loader.java:505)
at net.sf.hibernate.loader.Loader.getRowFromResultSet(Loader.java:218)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:285)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138)
at net.sf.hibernate.loader.Loader.doList(Loader.java:1063)
at net.sf.hibernate.loader.Loader.list(Loader.java:1048)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1556)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49)
at com.atlassian.hibernate.HibernateObjectDao$2.doInHibernate(HibernateObjectDao.java:97)
at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370)
at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:341)
at com.atlassian.hibernate.HibernateObjectDao.findAllSorted(HibernateObjectDao.java:90)
at com.atlassian.hibernate.HibernateObjectDao.findAll(HibernateObjectDao.java:78)
...
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor3225.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.atlassian.bamboo.hibernate.GenericEnumUserType.nullSafeGet(GenericEnumUserType.java:62)
... 299 more
Caused by: java.lang.IllegalArgumentException: No enum const class com.atlassian.aws.ec2.EC2InstanceType.M3Large
at java.lang.Enum.valueOf(Enum.java:196)
at com.atlassian.aws.ec2.EC2InstanceType.valueOf(EC2InstanceType.java:9)
... 303 more

In the above example, the error is reporting that there's no M3Large EC2 instance type available. This is happening because the user has one (or more) elastic image(s) configured to use the M3Large instance type, however, this instance type is not available anymore to the Bamboo version you are running with and/or EC2 region you're using.

 

2015-11-19 10:50:31,109 ERROR [http-apr-8085-exec-15] [Export] org.springframework.orm.hibernate.HibernateSystemException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.awssdk.AwsSupportConstants$Region; nested exception is net.sf.hibernate.HibernateException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.awssdk.AwsSupportConstants$Region
org.springframework.orm.hibernate.HibernateSystemException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.awssdk.AwsSupportConstants$Region; nested exception is net.sf.hibernate.HibernateException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.awssdk.AwsSupportConstants$Region
Caused by: net.sf.hibernate.HibernateException: InvocationTargetException on call to method valueOf(String) for class com.atlassian.aws.ec2.awssdk.AwsSupportConstants$Region
    at com.atlassian.bamboo.hibernate.GenericEnumUserType.nullSafeGet(GenericEnumUserType.java:70)
    at net.sf.hibernate.type.CustomType.nullSafeGet(CustomType.java:92)
    at net.sf.hibernate.type.AbstractType.hydrate(AbstractType.java:67)
    at net.sf.hibernate.loader.Loader.hydrate(Loader.java:690)
    at net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.java:631)
    at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:590)
    at net.sf.hibernate.loader.Loader.getRow(Loader.java:505)
    at net.sf.hibernate.loader.Loader.getRowFromResultSet(Loader.java:218)
    at net.sf.hibernate.loader.Loader.doQuery(Loader.java:285)
    at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138)
    at net.sf.hibernate.loader.Loader.doList(Loader.java:1063)
    at net.sf.hibernate.loader.Loader.list(Loader.java:1048)
    at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)
    at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1556)
    at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49)
    at com.atlassian.hibernate.HibernateObjectDao$2.doInHibernate(HibernateObjectDao.java:97)
    at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370)
    at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:341)
    at com.atlassian.hibernate.HibernateObjectDao.findAllSorted(HibernateObjectDao.java:90)
    at com.atlassian.hibernate.HibernateObjectDao.findAll(HibernateObjectDao.java:78)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    ...
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.GeneratedMethodAccessor489.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.atlassian.bamboo.hibernate.GenericEnumUserType.nullSafeGet(GenericEnumUserType.java:62)
    ... 300 more
Caused by: java.lang.IllegalArgumentException: No enum const class com.atlassian.aws.ec2.awssdk.AwsSupportConstants$Region.EU_CENTRAL_1
    at java.lang.Enum.valueOf(Enum.java:196)
    at com.atlassian.aws.ec2.awssdk.AwsSupportConstants$Region.valueOf(AwsSupportConstants.java:130)
    ... 304 more

This error, for example, is reporting that there's no image available in the EU_CENTRAL_1 (Frankfurt) region. This is happening because the user has one (or more) elastic image(s) configured inside this region, however, this region has no images available anymore to the Bamboo version you are running with, so you can't have an elastic image associated to this region.

診断

This can happen to Bamboo instances that have or had the Elastic Bamboo configuration enabled. Disabling the Elastic Bamboo option will NOT fix the problem. Users that have never activated this option should not run into this issue.

原因

Every time you run the export process, Bamboo will try to connect to AWS to make sure the elastic images' configurations are correct. It is possible that back when you started using your current Bamboo version, those elastic images were available in that region and/or had those instance types available, but they're not available anymore in EC2.

ソリューション

#1 If you are using the Elastic Bamboo configuration and don't want to mess around with your data.

Please open a support request at support.atlassian.com under the Bamboo project and:

  1. Attach a Bamboo support zip (Bamboo Administration >> System >> Atlassian Support Tools >> Support Zip) to the support request.

  2. Create an SQL dump from the Bamboo database and attach it to the support request.

#2 If you are NOT using the Elastic Bamboo configuration.

This is to ensure that you can create an export from your Bamboo instance. If you decide to use Elastic Bamboo later on, you just have to enable the Elastic Bamboo configuration again, it will then automatically download the elastic images available to the bamboo version you're running on. Please perform the steps below:

  1. Go to Bamboo administration >> Elastic instances >> Elastic Bamboo >> Configuration.
  2. Click the Disable button at the bottom of the page.
  3. Stop Bamboo.
  4. Access the Bamboo database.
  5. 次の SQL クエリを実行します。

    (!) Always backup your database before applying any changes.
    delete from elastic_image;
  6. Start Bamboo.
  7. Try to perform a new export.
Last modified on Mar 30, 2016

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.