문제

In my application I need the tomcat to be powered by SunJDK. But the default AWS EBS AMI comes with OpenJDK. So I wanted to change this to Sun JDK. But this simplistic task is turning out to be not-so-simple. Here is what I did -

  • On the EC2 instance that is powering my EBS Environment I installed Sun JDK by downloading the rom manually and then running rpm -i <jdk-rpm-file.rpm> .
  • Then I updated the java alternatives as listed here.
  • Next I restarted the app server to make sure that the feature that requires Sun JDK is working. It works.
  • Next I create an image by right clicking on the EC2 instance and selecting "Create Image (EBS AMI)"
  • I wait for the AMI to be created. Then I get the AMI ID.
  • Set the "Custom AMI ID" in configuration of the test environment to be the newly created AMI.
  • Apply change. This triggers update of environment.
  • Now comes the problem. As soon as it updates the environment it creates a new EC2 instance to connect to this environment.
  • Then after "adding" the instance it starts throwing this warning messages - "Failed to retrieve status of instance 'i-eb800c88' 2 consecutive time(s). Elastic Beanstalk will attempt to retrieve status up to 10 consecutive times before terminating the instance."
  • This continues for 10 tries and then it kills the instance and adds another instance and this continues for a long time.

I am not sure where am I going wrong. Any pointers appreciated.

도움이 되었습니까?

해결책

Recently I got a response from Saad working at AWS Team & it solved my problem. Here is his answer -

You will need to launch the AMI outside of Elastic Beanstalk (directly from the EC2 console), log into it and do your customizations then burn the AMI. Otherwise, the Host Manager might get corrupted and your instance will fail to come up.

The following documentation highlights the steps needed to create an AMI compatible with Elastic Beanstalk: http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/index.html?using-features.customami.html.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top