[英]Filebeat initialize failed with 10.96.0.1:443 i/o timeout error
在我的 k8s 集群中,filebeat 連接在節點重啟后失敗。 其他k8s節點正常工作。
來自 filebeat pod 的日志:
2020-08-30T03:18:58.770Z ERROR kubernetes/util.go:90 kubernetes: Querying for pod failed with error: performing request: Get https://10.96.0.1:443/api/v1/namespaces/monitoring/pods/filebeat-gfg5l: dial tcp 10.96.0.1:443: i/o timeout
2020-08-30T03:18:58.770Z INFO kubernetes/watcher.go:180 kubernetes: Performing a resource sync for *v1.PodList
2020-08-30T03:19:28.771Z ERROR kubernetes/watcher.go:183 kubernetes: Performing a resource sync err performing request: Get https://10.96.0.1:443/api/v1/pods?fieldSelector=spec.nodeName%3Dlocalhost&resourceVersion=0: dial tcp 10.96.0.1:443: i/o timeout for *v1.PodList
2020-08-30T03:19:28.771Z INFO instance/beat.go:357 filebeat stopped.
2020-08-30T03:19:28.771Z ERROR instance/beat.go:800 Exiting: error initializing publisher: error initializing processors: performing request: Get https://10.96.0.1:443/api/v1/pods?fieldSelector=spec.nodeName%3Dlocalhost&resourceVersion=0: dial tcp 10.96.0.1:443: i/o timeout
Exiting: error initializing publisher: error initializing processors: performing request: Get https://10.96.0.1:443/api/v1/pods?fieldSelector=spec.nodeName%3Dlocalhost&resourceVersion=0: dial tcp 10.96.0.1:443: i/o timeout
發生錯誤並重復 pod 重啟。 我也重新啟動了這個節點,但它沒有用。
filebeat 版本為 6.5.2 並使用 daemonset 部署。 有這樣的已知問題嗎?
除了 filebeat 之外的所有 pod 在該節點上工作都沒有問題。
更新:
apiVersion: v1
data:
filebeat.yml: |-
filebeat.inputs:
- type: docker
multiline.pattern: '^[[:space:]]+'
multiline.negate: false
multiline.match: after
symlinks: true
cri.parse_flags: true
containers:
ids: [""]
path: "/var/log/containers"
processors:
- decode_json_fields:
fields: ["message"]
process_array: false
max_depth: 1
target: message_json
overwrite_keys: false
when:
contains:
source: "/var/log/containers/app"
- add_kubernetes_metadata:
in_cluster: true
default_matchers.enabled: false
matchers:
- logs_path:
logs_path: /var/log/containers/
output:
logstash:
hosts:
- logstash:5044
kind: ConfigMap
metadata:
creationTimestamp: "2020-01-06T09:31:31Z"
labels:
k8s-app: filebeat
name: filebeat-config
namespace: monitoring
resourceVersion: "6797684985"
selfLink: /api/v1/namespaces/monitoring/configmaps/filebeat-config
uid: 52d86bbb-3067-11ea-89c6-246e96da5c9c
add_kube.netes_metadata
查詢https://10.96.0.1:443/api/v1/pods?fieldSelector=spec.nodeName%3Dlocalhost&resourceVersion=0
。 正如在上面的討論中所證明的那樣,這可以通過重新啟動解決了臨時網絡接口問題的 Beat 來解決。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.