【问题标题】:Cannot deploy Spring Boot application无法部署 Spring Boot 应用程序
【发布时间】:2014-08-03 10:58:52
【问题描述】:

我目前正在评估 CloudControl 作为我基于 Java 的应用程序的平台提供商。

我使用 Gradle 创建了一个非常简单的 Spring Boot (https://github.com/mhmpl/gradle-example-app) 应用,但我无法部署该应用。

Error 日志中没有可以给我一些信息的错误。但是,这是Deploy 日志的输出:

8/3/14 12:53 PM lxc-1272 INFO Container did not come up within 120 seconds.
8/3/14 12:53 PM lxc-1250 INFO Waiting for the container to be reachable...
8/3/14 12:53 PM lxc-1272 INFO Waiting for the container to be reachable...
8/3/14 12:52 PM lxc-1250 INFO Waiting for the container to be reachable...
8/3/14 12:52 PM lxc-1272 INFO Waiting for the container to be reachable...
8/3/14 12:52 PM lxc-1250 INFO Waiting for the container to be reachable...
8/3/14 12:52 PM lxc-1272 INFO Waiting for the container to be reachable...
8/3/14 12:51 PM lxc-1250 INFO Deploying ...

最后,应用程序没有部署,我看不到我可能犯的错误。我已经尝试将内存设置为 1024MB 并添加了第二个容器,但这并没有改变任何东西。

【问题讨论】:

  • 我将我的项目与https://github.com/Agraphie/springboot-gradle-cctrl-example进行了比较,我发现另一个项目似乎在Tomcat启动后初始化了dispatcherServlet
  • 您是否绑定到正确的端口?它在 PORT 环境变量中定义。
  • @StefanFriesel:我以为我做到了,但不正确。谢谢!我在这里更新了它(github.com/mhmpl/hellocctrl/blob/master/src/main/java/…),现在它可以工作了:-)
  • 很好,然后我会将评论移至答案

标签: gradle spring-boot cloudcontrol


【解决方案1】:

您需要将网络服务器绑定到正确的端口,该端口在 PORT 环境变量中定义。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-06-13
    • 2020-04-13
    • 2020-05-28
    • 1970-01-01
    • 1970-01-01
    • 2017-09-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多