Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/372.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 弹性豆茎_Java_Spring_Amazon Web Services_Amazon Elastic Beanstalk - Fatal编程技术网

Java 弹性豆茎

Java 弹性豆茎,java,spring,amazon-web-services,amazon-elastic-beanstalk,Java,Spring,Amazon Web Services,Amazon Elastic Beanstalk,我终于到达了启动Elastic Beanstalk实例/环境的位置。(Java Corretto 11平台)现在它无法启动提供的.jar文件 在eb engine.log文件中,我找不到比此更多的错误: 2021/05/27 11:36:25.889735 [INFO] Executing instruction: StageJavaApplication 2021/05/27 11:36:25.889871 [ERROR] An error occurred during execution

我终于到达了启动Elastic Beanstalk实例/环境的位置。(Java Corretto 11平台)现在它无法启动提供的
.jar
文件

eb engine.log
文件中,我找不到比此更多的错误:

2021/05/27 11:36:25.889735 [INFO] Executing instruction: StageJavaApplication
2021/05/27 11:36:25.889871 [ERROR] An error occurred during execution of command [app-deploy] - [StageJavaApplication]. Stop running the command. Error: staging java app failed due to invalid zip file 
jar文件是一个使用
mvn-B包构建的Spring引导应用程序。
整个过程从局部开始,但随后由于没有给定环境变量(预期行为)而崩溃。
但AWS似乎还没有启动应用程序


对此有何建议?

Spring Boot应用程序在Elastic Beanstalk上运行良好。但是,您确实需要设置一些变量。例如,您是否已将服务器端口变量设置为5000

正如您所说的,要成功地使用服务客户机,您可以为您的cred设置环境变量。下面是一个端到端的演练,展示了如何成功地将一个调用Elastic Beanstalk上的多个AWS服务的Spring引导应用程序放入其中


PS-您的日志文件提到一个ZIP文件。请确保按照上述示例中的讨论正确创建JAR。

非常感谢您提供此链接。它终于开始了,在我的pom.xml中,我删除了以下内容:
true
我很高兴它帮助了您。我们这里有相当多的JavaV2用例,其中包括许多一起工作的AWS服务。