1

我有最后一个 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 Server,description=,serviceType=brooklyn.entity.basic.VanillaSoftwareProcess,characteristics=[],customAttributes ={launch.command=回声你好| 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 中的跟踪

DEBUG oabcplan.PlanToSpecFactory [brooklyn-jetty-server-8443-qtp1119923741-24]:无法转换计划;失败将被传播(尝试其他转换器 = []):[java.lang.IllegalArgumentException:Brooklyn OASIS CAMP 解释器的转换器在创建此计划时出错]

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

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

4

1 回答 1

1

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

基于Github 存储库,该实体现在位于此处:org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess

于 2015-08-24T09:22:12.453 回答