让 AWS ElasticBeanstalk 与 Sun JDK 配合使用时遇到问题

发布于 2024-12-14 20:30:23 字数 796 浏览 3 评论 0原文

在我的应用程序中,我需要由 SunJDK 提供支持的 tomcat。但默认的 AWS EBS AMI 附带 OpenJDK。所以我想把它改成Sun JDK。但事实证明,这个简单的任务并不那么简单。这是我所做的 -

  • 在为我的 EBS 环境提供支持的 EC2 实例上,我通过手动下载 rom 安装了 Sun JDK,然后运行 ​​rpm -i
  • 然后我更新了此处列出的 java 替代方案。
  • 接下来,我重新启动了应用程序服务器以确保该功能需要 Sun JDK 才能工作。有用。
  • 接下来,我通过右键单击 EC2 实例并选择“创建映像 (EBS AMI)”来创建映像,
  • 然后等待创建 AMI。然后我得到 AMI ID。
  • 将测试环境配置中的“自定义AMI ID”设置为新创建的AMI。
  • 应用更改。这会触发环境更新。
  • 现在问题来了。一旦更新环境,它就会创建一个新的 EC2 实例来连接到该环境。
  • 然后,在“添加”实例后,它开始抛出此警告消息 - “连续 2 次无法检索实例 'i-eb800c88' 的状态。Elastic Beanstalk 在终止前将尝试连续 10 次检索状态实例。”
  • 这会持续 10 次尝试,然后杀死该实例并添加另一个实例,并且这种情况会持续很长时间。

我不确定我哪里出错了。任何指示表示赞赏。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

遇到 2024-12-21 20:30:23

最近,我收到了在 AWS 团队工作的 Saad 的回复。它解决了我的问题。这是他的答案 -

您需要在 Elastic Beanstalk 之外启动 AMI(直接从 EC2 控制台),登录并进行自定义,然后刻录 AMI。否则,主机管理器可能会损坏,并且您的实例将无法启动。

以下文档重点介绍了创建与 Elastic Beanstalk 兼容的 AMI 所需的步骤: http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/index.html?using-features.customami.html

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文