【问题标题】:Are service addresses available to the dc/os host OS?dc/os 主机操作系统是否可以使用服务地址?
【发布时间】:2018-07-02 18:36:50
【问题描述】:

我正在尝试让我的 dc/os 1.8 docker 容器使用 logstash 服务的服务地址将日志消息发送到也在 dc/os 中运行的 logstash。

这似乎不起作用,因为 docker 抛出错误:logstash.marathon.l4lb.thisdcos.directory: no such host

服务地址是否没有暴露给主机系统(或者我需要为此配置一些东西)?

在 dc/os 1.7 上,我在我的 logstash 配置中使用了一个固定的主机端口,并将 logstash.marathon.mesos 作为主机,但这些 .marathon.mesos 主机名似乎不再存在于 1.8 中。

当我尝试在容器中使用它们时,服务地址可以正常工作(例如,将我的 prometheus 服务链接到我的 alertmanager 服务)。但从主机级别来看,它们不存在。

编辑:

我关于缺少 marathon.mesos 网址的陈述是错误的。他们确实有效,但我用错了。现在这解决了我的问题。我使用此主机和固定的容器端口配置了日志记录。

对于尝试相同事情的每个人:每次通过 json 模式更改 ui 中的服务配置时,您都必须配置固定主机端口。固定的主机端口配置在 ui 的网络选项卡中不再可用,因此 dc/os ui 将在每次加载时删除主机端口配置。

仍然不知道为什么 l4lb 网址不起作用。

EDIT2

仍然不知道,但我发现Minuteman 每隔一秒就会生成一次崩溃和错误日志:

/opt/mesosphere/active/minuteman/minuteman/error.log:

CRASH REPORT Process <0.25809.2> with 0 neighbours exited with reason: {timeout,{gen_server,call,[{lashup_kv,'navstar@10.2.140.216'},{start_kv_sync_fsm,'minuteman@10.2.103.143',<0.25809.2>}]}} in gen_server:call/2 line 204

/opt/mesosphere/active/minuteman/minuteman/log/crash.log

2016-10-12 13:16:49 =CRASH REPORT====
  crasher:
    initial call: lashup_kv_sync_tx_fsm:init/1
    pid: <0.29002.2>
    registered_name: []
    exception exit: {{timeout,{gen_server,call,[{lashup_kv,'navstar@10.2.140.216'},{start_kv_sync_fsm,'minuteman@10.2.103.143',<0.29002.2>}]}},[{gen_server,call,2,[{file,"gen_server.erl"},{line,204}]},{lashup_kv_sync_tx_fsm,init,1,[{file,"/pkg/src/minuteman/_build/default/lib/lashup/src/lashup_kv_sync_tx_fsm.erl"},{line,23}]},{gen_statem,init_it,6,[{file,"gen_statem.erl"},{line,554}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}
    ancestors: [lashup_kv_aae_sup,lashup_kv_sup,lashup_platform_sup,lashup_sup,<0.916.0>]
    messages: []
    links: [<0.992.0>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 610
    stack_size: 27
    reductions: 127
  neighbours:

dc/os ui 声称 spartan 和 minuteman 是健康的,但是当 dns 调度程序的 crash.log 为空时,l4lb 每隔一秒就会出现新的崩溃。

【问题讨论】:

    标签: marathon dcos


    【解决方案1】:

    它们当然应该可以从主机操作系统中获得。这些主机服务是否运行“Spartan”和“Minuteman”服务?

    【讨论】:

    • 我没有部署任何类似的服务,但我的 dc/os 是基于云形成模板的,所以默认情况下它可能在那里。组件列表没有显示任何称为“spartan”或“minuteman”的内容,但它确实显示Layer 4 Load BalancerMesos DNS 是健康的。这两个不负责 l4lb 和 .mesos 主机名吗?
    • System 下的 DC/OS UI 中,您会发现 Minuteman (github.com/dcos/minuteman),因为 Layer 4 Load Balancer 和 Spartan (github.com/dcos/spartan) 被列为 DNS Dispatcher。或者,从集群内的 CLI:systemctl list-unit-files | grep dcos
    • Layer 4 Load BalancerDNS Dispatcher 在 DC/OS UI 中都显示为正常
    • @MichaelHausenblas 我又看了看我的代理节点,也许你可以看看我为 minuteman 找到的日志条目。
    • 我建议您加入我们的 DC/OS 社区 Slack (chat.dcos.io) 并在 #networking 频道上对 Sargun 进行 ping 操作
    【解决方案2】:

    我的问题是双重的:

    1. l4b 没有正常运行,只有在完全重新安装集群后才能修复

    2. l4b 仅支持 TCP 流量。因为我想用它来使用 udp 将容器日志发送到 logstash(docker-gelf 只支持 UDP)所以失败了

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-03-10
      • 2010-12-31
      • 2011-01-22
      • 1970-01-01
      • 2012-06-09
      • 2017-07-28
      • 2018-05-28
      • 1970-01-01
      相关资源
      最近更新 更多