我的AWS Elastic Beanstalk tomcat Java应用程序在过去六个月里一直运行得很好,昨天崩溃了,当我试图使用克隆重新部署时,它失败了
实例:i-0872ed7568a9820f5]命令在实例上失败。回来
代码:1输出:(TRUNCATED)。。。检测到:Python 2.7要继续使用
此安装程序必须使用Python 3.6或更高版本。有关更多信息
请参阅以下博客文章:
https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-python-2-7-in-aws-sdk-for-python-and-aws-cli-v1/
.
.eextensions/copyindexes.config中的命令01_install_cli失败。对于
更详细的信息,请使用控制台或eb CLI检查/var/log/eb-activity.log。
我检查
eb_activity.log
问题似乎出在awscli捆绑包的使用版本上,但我不明白我在哪里定义它。
Archive: awscli-bundle.zip
inflating: awscli-bundle/install
inflating: awscli-bundle/packages/jmespath-0.10.0.tar.gz
inflating: awscli-bundle/packages/pyasn1-0.4.8.tar.gz
inflating: awscli-bundle/packages/docutils-0.15.2.tar.gz
inflating: awscli-bundle/packages/s3transfer-0.5.0.tar.gz
inflating: awscli-bundle/packages/virtualenv-16.7.8.tar.gz
inflating: awscli-bundle/packages/awscli-1.20.1.tar.gz
inflating: awscli-bundle/packages/six-1.16.0.tar.gz
inflating: awscli-bundle/packages/rsa-4.7.2.tar.gz
inflating: awscli-bundle/packages/colorama-0.4.3.tar.gz
inflating: awscli-bundle/packages/PyYAML-5.4.1.tar.gz
inflating: awscli-bundle/packages/urllib3-1.26.6.tar.gz
inflating: awscli-bundle/packages/botocore-1.21.1.tar.gz
inflating: awscli-bundle/packages/python-dateutil-2.8.2.tar.gz
inflating: awscli-bundle/packages/setup/setuptools_scm-3.3.3.tar.gz
inflating: awscli-bundle/packages/setup/wheel-0.33.6.tar.gz
Unsupported Python version detected: Python 2.7
To continue using this installer you must use Python 3.6 or later.
For more information see the following blog post: https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-python-2-7-in-aws-sdk-for-python-and-aws-cli-v1/
(ElasticBeanstalk::ExternalInvocationError)
我查看了.war文件的.eextensions文件夹,但看不到定义的版本号
因此,我尝试使用较新的平台创建一个新的环境,因此认为amazoncli工具是作为平台的一部分安装的,而不是使用
Tomcat 7与Java 7
我试过了
Tomcat 8.5和Corretto 8在64位Amazon Linux 2/4.2.2上运行
现在,我在的cfn-init.log中得到了一个不同的错误
2021-07-17 07:26:02,021 [INFO] -----------------------Starting build-----------------------
2021-07-17 07:26:02,028 [INFO] Running configSets: _OnInstanceBoot
2021-07-17 07:26:02,031 [INFO] Running configSet _OnInstanceBoot
2021-07-17 07:26:02,033 [INFO] Running config AWSEBBaseConfig
2021-07-17 07:26:02,228 [INFO] Command clearbackupfiles succeeded
2021-07-17 07:26:02,234 [INFO] Running config AWSEBCfnHupEndpointOverride
2021-07-17 07:26:02,237 [INFO] Command clearbackupfiles succeeded
2021-07-17 07:26:02,238 [INFO] ConfigSets completed
2021-07-17 07:26:02,238 [INFO] -----------------------Build complete-----------------------
2021-07-17 07:26:37,586 [INFO] -----------------------Starting build-----------------------
2021-07-17 07:26:37,592 [INFO] Running configSets: Infra-EmbeddedPreBuild
2021-07-17 07:26:37,596 [INFO] Running configSet Infra-EmbeddedPreBuild
2021-07-17 07:26:37,599 [INFO] Running config prebuild_0_jthinkws
2021-07-17 07:26:39,257 [ERROR] Command 01_install_cli (wget https://s3.amazonaws.com/aws-cli/awscli-bundle.zip; unzip awscli-bundle.zip; ./awscli-bundle/install -b ~/bin/aws) failed
2021-07-17 07:26:39,257 [ERROR] Error encountered during build of prebuild_0_jthinkws: Command 01_install_cli failed
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 573, in run_config
CloudFormationCarpenter(config, self._auth_config).build(worklog)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 273, in build
self._config.commands)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/command_tool.py", line 127, in apply
raise ToolError(u"Command %s failed" % name)
cfnbootstrap.construction_errors.ToolError: Command 01_install_cli failed
2021-07-17 07:26:39,260 [ERROR] -----------------------BUILD FAILED!------------------------
2021-07-17 07:26:39,260 [ERROR] Unhandled exception during build: Command 01_install_cli failed
Traceback (most recent call last):
File "/opt/aws/bin/cfn-init", line 176, in <module>
worklog.build(metadata, configSets)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 135, in build
Contractor(metadata).build(configSets, self)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 561, in build
self.run_config(config, worklog)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 573, in run_config
CloudFormationCarpenter(config, self._auth_config).build(worklog)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 273, in build
self._config.commands)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/command_tool.py", line 127, in apply
raise ToolError(u"Command %s failed" % name)
cfnbootstrap.construction_errors.ToolError: Command 01_install_cli failed
我不明白我该如何避开这一关,因为
01_安装_cli
不是我写的脚本,它不是战争文件的一部分,它是亚马逊使用的内部脚本!