简体   繁体   English

无法在 Spring Cloud Dataflow 上部署流

[英]Unable to deploy streams on Spring Cloud Dataflow

Problem问题

I was able to register applications and deploy them previously, now I am not able to.以前能够注册应用程序并部署它们,现在我不能。

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",
    

}'

How it happened它是怎么发生的

I was able to undeploy and deploy the above stream just fine.我能够很好地取消部署和部署上述流。 However, one day I undeployed it and tried to deploy it again too quickly and it complained about the ingress http port not being available as the pod didn't stop yet.然而,有一天我取消了它的部署并试图过快地再次部署它,它抱怨入口 http 端口不可用,因为 pod 还没有停止。 I basically undeploye and redeployed within 2 seconds, not giving it much time.我基本上在 2 秒内取消部署和重新部署,没有给它太多时间。 Now, I am unable to deploy due to what appears to be a stuck/orphaned deployment metadata in skipper.现在,由于船长中似乎卡住/孤立的部署元数据,我无法部署。 I am getting this error now EVERY time I tried to deploy my stream:每次尝试部署流时,我都会收到此错误:

[
  {
    "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={}).]"
  }
]

Work around解决

If I unregister the apps and re-register it fixes nothing.如果我取消注册应用程序并重新注册它不会解决任何问题。 But if I unregister the apps and register them with new names then it works.但是,如果我取消注册应用程序并使用新名称注册它们,则它可以工作。 But it is annoying to have to keep doing this as it is used in an automated environment.但是因为它在自动化环境中使用,所以不得不继续这样做很烦人。 Doing hacky commands and renames is not ideal going forward.执行 hacky 命令和重命名并不理想。

In this case, you might want to try deleting the release that is stuck at the Skipper side.在这种情况下,您可能想尝试删除卡在 Skipper 端的版本。 To do this, you can try from the Skipper shell:为此,您可以从 Skipper shell 尝试:

skipper:>release delete <release-name>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM