【问题标题】:VanillaSoftwareProcess Entity does not work in Apache BrooklynVanillaSoftwareProcess 实体在 Apache Brooklyn 中不起作用
【发布时间】:2015-08-24 08:54:59
【问题描述】:

我有最后一个 Apache Brooklyn (24.08.2015),版本:0.8.0-SNAPSHOT,当我尝试此处的蓝图示例时:https://brooklyn.incubator.apache.org/v/latest/yaml/custom-entities.html

name: Simple Netcat Server Example
location: localhost
services:
- type: brooklyn.entity.basic.VanillaSoftwareProcess
  name: Simple Netcat Server
  launch.command: |
    echo hello | nc -l 4321 &
    echo $! > $PID_FILE

  # The following overrides demonstrate the use of a custom shell environment as well as
  # check-running and stop commands. These are optional; default behavior will "do the
  # right thing" with the pid file automatically.

  env:                  { CHECK_MARKER: "checkRunning", STOP_MARKER: "stop" }
  checkRunning.command: echo $CHECK_MARKER >> DATE && test -f "$PID_FILE" && ps -p `cat $PID_FILE` >/dev/null
  stop.command:         echo $STOP_MARKER  >> DATE && test -f "$PID_FILE" && { kill -9 `cat $PID_FILE`; rm /tmp/vanilla.pid; }

# can also define download.url, in which case the launch command defaults to ./start.sh in that (archive) file

当我尝试使用 Apache Brooklyn 来创建应用程序时,我收到了一个内部错误。我调试了应用程序,我得到的异常如下(PlanToSpecFactory.java):

java.lang.UnsupportedOperationException:部署计划项 org.apache.brooklyn.camp.spi.pdp.Service@62abec8e[name=Simple Netcat 服务器,description=,serviceType=brooklyn.entity.basic.VanillaSoftwareProcess,characteristics=[],customAttributes={launch.command=echo 你好 | nc -l 4321 & 回声 $! > $PID_FILE , env={CHECK_MARKER=checkRunning, STOP_MARKER=stop}, checkRunning.command=echo $CHECK_MARKER >> DATE && test -f "$PID_FILE" && ps -p cat $PID_FILE >/dev/null, stop.command=echo $STOP_MARKER

日期 && 测试 -f "$PID_FILE" && { kill -9 cat $PID_FILE; rm /tmp/vanilla.pid; }}] 无法匹配

debug.log 中的跟踪

调试 o.a.b.c.plan.PlanToSpecFactory [brooklyn-jetty-server-8443-qtp1119923741-24]:计划不可能 转变;失败将被传播(尝试其他变压器 = []): [java.lang.IllegalArgumentException: 布鲁克林的变压器 OASIS CAMP 解释器在创建此计划时出错]

知道为什么吗?在过去,这是有效的

(我想在 Apache Brooklyn 的邮件列表中发帖,但收到错误消息,无法联系任何人)

【问题讨论】:

  • 您目前使用布鲁克林的哪个版本?
  • @ThomasBouron 版本:0.8.0-SNAPSHOT

标签: java brooklyn


【解决方案1】:

最新的 SNAPSHOT 版本经过大量重构,将包名更改为 org.apache.brooklyn.*。这可能就是为什么您的布鲁克林版本再也找不到VanillaSoftwareProcess 的原因。

基于Github repository,该实体现在位于:org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多