【问题标题】:Set ACE target launcher's internal server port to Bluemix's random port number将 ACE 目标启动器的内部服务器端口设置为 Bluemix 的随机端口号
【发布时间】:2016-10-29 15:46:08
【问题描述】:

我目前正尝试在 IBM Bluemix CloudFoundry Java/Liberty buildpack 上部署和运行 Ace Target,但没有取得多大成功。

症状: 在部署/重新部署过程中,ACE Launcher 的内部服务器使用预设端口号(默认或通过 cfg 手动设置)启动,同时为 Bluemix 容器动态分配一个随机端口号。两个实体之间的端口绑定超时,启动过程失败。

选项: Bluemix 随机端口可通过系统访问。环境。变量 $PORT。

问题: 将新生成的 Bluemix 的随机端口号分配给 ACE Launcher 的内部服务器的最佳/最简单方法是什么?

【问题讨论】:

    标签: ibm-cloud cloud-foundry apache-ace


    【解决方案1】:

    您可以像这样启动 ACE 启动器:

    java -jar org.apache.ace.agent.launcher.felix.jar -v -s http://server:${PORT}
    

    地点:

    -v -- verbose, mainly so you can better diagnose what is going on
    -s URL -- provides the launcher with the URL (which includes the port) of the server
    

    【讨论】:

    • 感谢您的建议 - 我不确定是否真的可以直接在远程云节点上使用 java 命令,而不是通过 self exe JAR 中的嵌入脚本,但也许您是暗示我忽略的其他东西?
    【解决方案2】:

    这取决于 ACE 如何接受参数。 documentation for the Java Buildpack 解释了如何提供自定义 JVM 参数,这些参数可能能够为 ACE 提供所需的东西(也许是 -s http://localhost:$PORT 其他人建议的)。

    【讨论】:

      猜你喜欢
      • 2021-02-09
      • 1970-01-01
      • 2011-04-13
      • 1970-01-01
      • 2021-11-17
      • 2021-02-28
      • 1970-01-01
      • 1970-01-01
      • 2010-12-07
      相关资源
      最近更新 更多