gpt4 book ai didi

java - VanillaSoftwareProcess 实体在 Apache Brooklyn 中不起作用

转载 作者:行者123 更新时间:2023-11-30 07:59:21 27 4
gpt4 key购买 nike

我有最后一个 Apache Brooklyn(2015 年 8 月 24 日),版本: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: Deployment plan item org.apache.brooklyn.camp.spi.pdp.Service@62abec8e[name=Simple Netcat Server,description=,serviceType=brooklyn.entity.basic.VanillaSoftwareProcess,characteristics=[],customAttributes={launch.command=echo hello | nc -l 4321 & echo $! > $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

DATE && test -f "$PID_FILE" && { kill -9 cat $PID_FILE; rm /tmp/vanilla.pid; }}] cannot be matched

debug.log 中的跟踪

DEBUG o.a.b.c.plan.PlanToSpecFactory [brooklyn-jetty-server-8443-qtp1119923741-24]: Plan could not be transformed; failure will be propagated (other transformers tried = []): [java.lang.IllegalArgumentException: Transformer for Brooklyn OASIS CAMP interpreter gave an error creating this plan]

知道为什么吗?在过去这确实有效

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

最佳答案

最新的 SNAPSHOT 版本经过大量重构,将包名称更改为 org.apache.brooklyn.*。这可能就是为什么您的 Brooklyn 版本无法再找到 VanillaSoftwareProcess 的原因。

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

关于java - VanillaSoftwareProcess 实体在 Apache Brooklyn 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32178154/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com