我有一个kubernetes-cluster设置并正在运行。我在Herman Kubernetes集群上部署了Heron,并且能够访问Heron UI。

$ kubectl get services
NAME                   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                      AGE
bookie                 ClusterIP   None            <none>        3181/TCP                     5d
default-http-backend   ClusterIP   10.152.183.24   <none>        80/TCP                       5d
heron-apiserver        NodePort    10.152.183.99   <none>        9000:30703/TCP               5d
heron-tracker          ClusterIP   10.152.183.30   <none>        8888/TCP                     5d
heron-ui               ClusterIP   10.152.183.29   <none>        8889/TCP                     5d
kubernetes             ClusterIP   10.152.183.1    <none>        443/TCP                      5d
zookeeper              ClusterIP   None            <none>        2888/TCP,3888/TCP,2181/TCP   5d

在浏览器中访问http://localhost:8001/api/v1/namespaces/default/services/heron-ui:8889/proxy/topologies会给我Heron UI,但是当我尝试部署拓扑时,我仍然遇到相同的错误。
heron submit kubernetes \
  --service-url=http://localhost:8001/api/v1/namespaces/default/services/heron-apiserver:9000/proxy \
  ./target/heron-starter-0.0.1-SNAPSHOT-jar-with-dependencies.jar \
  tutorial.WordCountTopology \
  WordCountTopology Cluster \

[2018-06-05 11:00:23 +0000] [INFO]: Launching topology: 'WordCountTopology'
[2018-06-05 11:00:23 +0000] [INFO]: {'config_property': [], 'topology-file-name': './target/heron-starter-0.0.1-SNAPSHOT-jar-with-dependencies.jar', 'verbose': False, 'subcommand': 'submit', 'deploy_deactivated': False, 'submit_user': 'smasherke', 'cluster': 'kubernetes', 'extra_launch_classpath': '', 'deploy_mode': 'server', 'role': 'smasherke', 'dry_run_format': 'colored_table', 'dry_run': False, 'config_path': '/home/smasherke/.heron/conf', 'topology_main_jvm_property': [], 'environ': 'default', 'service_url': 'http://localhost:8001/api/v1/namespaces/default/services/heron-apiserver:9000/proxy', 'topology-class-name': 'tutorial.WordCountTopology'}
[2018-06-05 11:00:24 +0000] [ERROR]: ('Connection aborted.', error(32, 'Broken pipe'))
[2018-06-05 11:00:24 +0000] [ERROR]: Failed to launch topology 'WordCountTopology'

使用curl给我正确的结果:
curl http://localhost:8001/api/v1/namespaces/default/services/heron-apiserver:9000/proxy/api/v1/version
{
  "heron.build.git.revision" : "ddbb98bbf173fb082c6fd575caaa35205abe34df",
  "heron.build.git.status" : "Clean",
  "heron.build.host" : "ci-server-01",
  "heron.build.time" : "Sat Mar 31 09:27:19 UTC 2018",
  "heron.build.timestamp" : "1522488439000",
  "heron.build.user" : "release-agent",
  "heron.build.version" : "0.17.8"
}

最佳答案

您可以尝试在“苍鹭提交”命令中添加“--verbose”选项。它会在日志中为您提供更详细的信息。

关于kubernetes - 无法在Kubernetes的Heron上部署拓扑,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/50696525/

10-12 05:04