AWS上的Spring Boot应用与GitHub持续部署
我正在学习与AWS的工作方式,现在我正在尝试进行连接AWS和GitHub(Spring Boot Jar Application)的Codepipeline。我已经与github连接并编译了来源,但是部署失败了。
这是管道中显示的错误:
我已经转到了指定错误的日志,并找到了其他描述:
2022/05/09 20:38:31.199534 [INFO] Job for web.service failed because the control process exited with error code. See "systemctl status web.service" and "journalctl -xe" for details.
2022/05/09 20:38:31.199559 [ERROR] An error occurred during execution of command [app-deploy] - [FlipApplication]. Stop running the command. Error: Register application failed because the registration of proc web failed:
startProcess Failure: starting process "web" failed: Command /bin/sh -c systemctl start web.service failed with error exit status 1. Stderr:Job for web.service failed because the control process exited with error code. See "systemctl status web.service" and "journalctl -xe" for details.
但是我不明白。我在网络上寻找并尝试,但它仍然不起作用。我已经从pom.xm更改了版本。 这是我使用的buildspec.yml:
version: 0.2
phases:
install:
runtime-versions:
java: corretto11
commands:
- echo install
pre_build:
commands:
- echo pre_build
build:
commands:
- mvn package
- echo build
post_build:
commands:
- echo post_build
artifacts:
files:
- '**/*'
- target/02-todo-rest-api-h2-0.0.2-SNAPSHOT.jar
我添加codepipeline配置的摘要:
事先感谢您的帮助。
I'm learning how work with AWS, and now I'm trying to do a codepipeline connecting AWS and GitHub (a spring boot jar applicacion). I have connected with GitHub and compile the sources but the deployment fails.
This is the error showed in the pipeline:
I have gone to the log that specify the error and find this other description:
2022/05/09 20:38:31.199534 [INFO] Job for web.service failed because the control process exited with error code. See "systemctl status web.service" and "journalctl -xe" for details.
2022/05/09 20:38:31.199559 [ERROR] An error occurred during execution of command [app-deploy] - [FlipApplication]. Stop running the command. Error: Register application failed because the registration of proc web failed:
startProcess Failure: starting process "web" failed: Command /bin/sh -c systemctl start web.service failed with error exit status 1. Stderr:Job for web.service failed because the control process exited with error code. See "systemctl status web.service" and "journalctl -xe" for details.
But I don't understand. I looking in the web and try but it still not work. I have change the version from pom.xm already.
This is the buildspec.yml that I use:
version: 0.2
phases:
install:
runtime-versions:
java: corretto11
commands:
- echo install
pre_build:
commands:
- echo pre_build
build:
commands:
- mvn package
- echo build
post_build:
commands:
- echo post_build
artifacts:
files:
- '**/*'
- target/02-todo-rest-api-h2-0.0.2-SNAPSHOT.jar
I add the codepipeline configuration's summary:
Thanks in advance for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论