gpt4 book ai didi

java - 无法在 Spring Cloud Dataflow 上部署流

转载 作者:行者123 更新时间:2023-12-01 17:39:04 31 4
gpt4 key购买 nike

问题

我之前能够注册应用程序并部署它们,但现在不能了。

curl --request POST \
--url http://10.30.7.244:31444//apps/source/http \
--header 'content-type: application/x-www-form-urlencoded' \
--data uri=docker:springcloudstream/http-source-rabbit:2.1.1.RELEASE \
--data version=2.1.1.RELEASE \
--data metadata-uri=maven://org.springframework.cloud.stream.app:http-source-rabbit:jar:metadata:2.1.1.RELEASE

# + more custom apps

curl --request POST \
--url http://10.30.7.244:31444/streams/definitions \
--header 'content-type: application/x-www-form-urlencoded' \
--data name=my-stream \
--data 'definition=http | my-proc1 | my-proc-2 | my-sink' \
--data deploy=false

curl --request POST \
--url http://thehost:31444/streams/deployments/my-stream \
--header 'content-type: application/json' \
--data '{
"deployer.*.kubernetes.imagePullPolicy":"Always",
"deployer.http.kubernetes.createNodePort" : "32125",

"app.*.spring.profiles.active":"integ",


}'

事情是如何发生的

我能够很好地取消部署和部署上述流。然而,有一天,我取消部署它并试图太快地再次部署它,它提示入口 http 端口不可用,因为 pod 尚未停止。我基本上在 2 秒内取消部署并重新部署,没有给它太多时间。现在,由于船长中似乎存在卡住/孤立的部署元数据,我无法进行部署。现在每次我尝试部署我的流时都会收到此错误:

[
{
"logref": "SkipperException",
"message": "Could not install AppDeployRequest [[AppDeploymentRequest@7afd79d6 commandlineArguments = list[[empty]], deploymentProperties = map['spring.cloud.deployer.group' -> 'my-app-to-era', 'spring.cloud.deployer.kubernetes.imagePullPolicy' -> 'Always'], definition = [AppDefinition@1fb86fe0 name = 'my-app-data-mapper-v14', properties = map['spring.metrics.export.triggers.application.includes' -> 'integration**', 'spring.cloud.dataflow.stream.app.label' -> 'my-app-data-mapper', 'spring.cloud.stream.metrics.key' -> 'my-app-to-era.my-app-data-mapper.${spring.cloud.application.guid}', 'spring.cloud.stream.bindings.input.group' -> 'my-app-to-era', 'spring.cloud.stream.bindings.output.producer.requiredGroups' -> 'my-app-to-era', 'spring.cloud.stream.metrics.properties' -> 'spring.application.name,spring.application.index,spring.cloud.application.*,spring.cloud.dataflow.*', 'spring.cloud.dataflow.stream.name' -> 'my-app-to-era', 'spring.cloud.stream.bindings.output.destination' -> 'my-app-to-era.my-app-data-mapper', 'spring.cloud.dataflow.stream.app.type' -> 'processor', 'spring.cloud.stream.bindings.input.destination' -> 'my-app-to-era.my-app-packet-builder', 'spring.profiles.active' -> 'integ']], resource = Docker Resource [docker:artifacts.dynatron.io/era-docker/stream-my-app-data-mapper:1.0.5-SNAPSHOT]]] to platform [default]. Error Message = [Failure executing: POST at: https://10.152.183.1/api/v1/namespaces/default/services. Message: services \"my-app-to-era-my-app-data-mapper-v14\" already exists. Received status: Status(apiVersion=v1, code=409, details=StatusDetails(causes=[], group=null, kind=services, name=my-app-to-era-my-app-data-mapper-v14, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=services \"my-app-to-era-my-app-data-mapper-v14\" already exists, metadata=ListMeta(_continue=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=AlreadyExists, status=Failure, additionalProperties={}).]"
}
]

解决办法

如果我取消注册应用程序并重新注册,它不会解决任何问题。但是,如果我取消注册应用程序并使用新名称注册它们,那么它就可以工作。但由于它是在自动化环境中使用,因此必须继续这样做很烦人。执行 hacky 命令和重命名并不理想。

最佳答案

在这种情况下,您可能需要尝试删除卡在 Skipper 端的版本。为此,您可以从 Skipper shell 尝试:

skipper:>release delete <release-name>

关于java - 无法在 Spring Cloud Dataflow 上部署流,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60993378/

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