【发布时间】:2017-01-18 09:49:41
【问题描述】:
我在 AWS 上使用 Boxfuse 部署了一个 Spring Boot 应用程序。我正在尝试使 SSL 与“mydomain.com”一起使用。我从 Godaddy 获得了证书。它适用于自签名证书。但是当我用 GoDaddy 证书尝试它时,它说 Payload 未能在 300 秒内出现。我需要在 AWS 或 Godaddy 上配置任何东西吗?现在我的 application.properties 文件中有以下配置。
server.port=443
server.ssl.enabled=true
server.ssl.key-store=classpath:example.jks
server.ssl.key-store-password=myS3cr3tPwd
server.ssl.trust-store=/cacerts/example.jks
server.ssl.trust-store-password=my0th3rPwd
日志这样说:
2017-01-19 09:22:38.315 INFO 895 --- [ main] s.b.c.e.t.TomcatEmbedded
ServletContainer : Tomcat started on port(s): 443 (https)
2017-01-19 09:22:38.338 INFO 895 --- [ main] com.unoiatech.o3.Applica
tion : Started Application in 50.814 seconds (JVM running for 51.171
)
The system is going down NOW!
Sent SIGTERM to all processes
2017-01-19 09:26:34.501 INFO 895 --- [ Thread-4] ationConfigEmbeddedWebAp
plicationContext : Closing org.springframework.boot.context.embedded.AnnotationC
onfigEmbeddedWebApplicationContext@73f0f3d4: startup date [Thu Jan 19 09:21:48 G
MT 2017]; root of context hierarchy
2017-01-19 09:26:34.530 INFO 895 --- [ Thread-4] o.s.j.e.a.AnnotationMBea
nExporter : Unregistering JMX-exposed beans on shutdown
2017-01-19 09:26:34.553 INFO 895 --- [ Thread-4] j.LocalContainerEntityMa
nagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'defaul
t'
Sent SIGKILL to all processes
Requesting system poweroff
[ 290.976653] reboot: Power down
我不知道在哪里寻找问题。任何帮助,将不胜感激 。
编辑:
运行应用程序的命令:boxfuse run myapp:1.x -env=test,
添加端口到命令后编辑:
另外,它正在使用端口 8443。
【问题讨论】:
-
通过在 Boxfuse 执行健康检查期间直接访问其 IP,确保您的应用程序在 / 处返回 HTTP 200。
-
@AxelFontaine 应用程序使用 https 而不是 http 返回 200。
-
它说:等待有效载荷从 http 开始://xx.xxx.xx.xx:443/
-
请同时包含您的 Boxfuse 配置和您传递给 Boxfuse 命令的参数
-
@AxelFontaine 请检查我已添加它们。
标签: spring-boot amazon-ec2 ssl-certificate cloudcaptain