【问题标题】:Deploy Graylog on GKE在 GKE 上部署 Graylog
【发布时间】:2019-01-16 13:59:14
【问题描述】:

我很难在 Google Kubernetes Engine 上部署 Graylog,我正在使用此配置 https://github.com/aliasmee/kubernetes-graylog-cluster 并进行了一些小的修改。我的 Graylog 服务器已启动,但在界面中显示此错误:

Error message
    Request has been terminated
    Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.
Original Request
    GET http://ES_IP:12900/system/sessions
Status code
    undefined
Full error message
    Error: Request has been terminated
    Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.

Graylog 日志除此之外没有任何特别之处:

org.graylog.plugins.threatintel.tools.AdapterDisabledException: Spamhaus service is disabled, not starting (E)DROP adapter. To enable it please go to System / Configurations.
    at org.graylog.plugins.threatintel.adapters.spamhaus.SpamhausEDROPDataAdapter.doStart(SpamhausEDROPDataAdapter.java:68) ~[?:?]
    at org.graylog2.plugin.lookup.LookupDataAdapter.startUp(LookupDataAdapter.java:59) [graylog.jar:?]
    at com.google.common.util.concurrent.AbstractIdleService$DelegateService$1.run(AbstractIdleService.java:62) [graylog.jar:?]
    at com.google.common.util.concurrent.Callables$4.run(Callables.java:119) [graylog.jar:?]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]

但最后:

2019-01-16 13:35:00,255 INFO : org.graylog2.bootstrap.ServerBootstrap - Graylog server up and running.

弹性搜索健康检查是绿色的,在 ES 和 Mongo 日志中没有问题。 我怀疑与 Elastic Search 的连接存在问题。

curl http://ip_address:9200/_cluster/health\?pretty
{
  "cluster_name" : "elasticsearch",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 4,
  "active_shards" : 4,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 100.0
}

【问题讨论】:

    标签: kubernetes google-kubernetes-engine graylog2 graylog


    【解决方案1】:

    阅读您分享的教程后,我能够确定 kubelet 需要使用参数 --allow-privileged 运行。

    “Elasticsearch pods 需要一个 init-container 以特权模式运行,因此它可以设置一些 VM 选项。为此,kubelet 应该使用 args --allow-privileged 运行,否则 init-container 将跑不起来。”

    无法自定义或修改 kubelet 参数/参数,这里有一个功能请求:https://issuetracker.google.com/118428580,因此可以在将来实现。

    此外,如果您直接在节点上修改 kubelet,主节点可能会重置配置,并且不能保证配置将保持不变。

    【讨论】:

    • 我了解这个问题,您看到解决方法了吗?我试图将操作系统从Container-Optimized OS from Google更改为CentOS,但遇到了同样的问题。
    • 不使用 GKE,而是使用 Kubernetes 和 Compute Engine 部署您的应用程序,这会有点困难,因为您必须配置主节点和节点,但您可以做任何事情想要。
    猜你喜欢
    • 2020-07-24
    • 1970-01-01
    • 2021-06-14
    • 2021-04-13
    • 1970-01-01
    • 1970-01-01
    • 2019-10-13
    • 2020-07-09
    • 1970-01-01
    相关资源
    最近更新 更多