操作系统信息
虚拟机,openeuler 24.3
Kubernetes版本信息
[root@ksmaster01 ~]# kubectl version
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.17", GitCommit:"953be8927218ec8067e1af2641e540238ffd7576", GitTreeState:"clean", BuildDate:"2023-02-22T13:34:27Z", GoVersion:"go1.19.6", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.17", GitCommit:"953be8927218ec8067e1af2641e540238ffd7576", GitTreeState:"clean", BuildDate:"2023-02-22T13:27:46Z", GoVersion:"go1.19.6", Compiler:"gc", Platform:"linux/amd64"}
容器运行时
Version: 0.1.0
RuntimeName: containerd
RuntimeVersion: v1.7.13
RuntimeApiVersion: v1
KubeSphere版本信息
3.4.1
问题是什么
修改opensearch的默认密码后,fluentbit往opensearch写入日志时报401未授权,
使用用户admin和密码admin可以登录dashboard,但自定义的密码就不行
相同问题: kubesphere/kubesphere#6004
查看secret中的密码是自定义的密码,但登录还是使用的默认密码admin
[root@ksmaster01 ~]# kubectl get secret opensearch-credentials -n kubesphere-logging-system
NAME TYPE DATA AGE
opensearch-credentials kubernetes.io/basic-auth 2 19d
fluentbit错误日志:
2024-12-25T14:44:36.008861974+08:00 [2024/12/25 06:44:36] [ warn] [engine] failed to flush chunk '12-1735109074.972222575.flb', retry in 7 seconds: task_id=1, input=tail.2 > output=opensearch.0 (out_id=0)
2024-12-25T14:44:36.984787300+08:00 [2024/12/25 06:44:36] [error] [output:opensearch:opensearch.0] HTTP status=401 URI=/_bulk, response:
2024-12-25T14:44:36.984863915+08:00 Unauthorized
2024-12-25T14:44:36.984875211+08:00
2024-12-25T14:44:36.984883751+08:00 [2024/12/25 06:44:36] [ warn] [engine] chunk '12-1735109069.870988028.flb' cannot be retried: task_id=7, input=tail.2 > output=opensearch.0
2024-12-25T14:44:37.105842401+08:00 [2024/12/25 06:44:37] [error] [output:opensearch:opensearch.0] HTTP status=401 URI=/_bulk, response:
2024-12-25T14:44:37.105905032+08:00 Unauthorized
2024-12-25T14:44:37.105911647+08:00
2024-12-25T14:44:37.105917566+08:00 [2024/12/25 06:44:37] [ warn] [engine] failed to flush chunk '12-1735109076.8946702.flb', retry in 7 seconds: task_id=3, input=tail.2 > output=opensearch.0 (out_id=0)
2024-12-25T14:44:38.093340097+08:00 [2024/12/25 06:44:38] [error] [output:opensearch:opensearch.0] HTTP status=401 URI=/_bulk, response:
2024-12-25T14:44:38.093373010+08:00 Unauthorized
2024-12-25T14:44:38.093375489+08:00
2024-12-25T14:44:38.093377415+08:00 [2024/12/25 06:44:38] [ warn] [engine] failed to flush chunk '12-1735109076.985056291.flb', retry in 11 seconds: task_id=6, input=tail.2 > output=opensearch.0 (out_id=0)
2024-12-25T14:44:39.012889867+08:00 [2024/12/25 06:44:39] [error] [output:opensearch:opensearch.0] HTTP status=401 URI=/_bulk, response:
2024-12-25T14:44:39.012936777+08:00 Unauthorized
2024-12-25T14:44:39.012942934+08:00
2024-12-25T14:44:39.012948293+08:00 [2024/12/25 06:44:39] [ warn] [engine] failed to flush chunk '12-1735109078.93445265.flb', retry in 9 seconds: task_id=7, input=tail.2 > output=opensearch.0 (out_id=0)
2024-12-25T14:44:39.984426983+08:00 [2024/12/25 06:44:39] [error] [output:opensearch:opensearch.0] HTTP status=401 URI=/_bulk, response:
2024-12-25T14:44:39.984510554+08:00 Unauthorized
2024-12-25T14:44:39.984520870+08:00
2024-12-25T14:44:39.984527780+08:00 [2024/12/25 06:44:39] [ warn] [engine] failed to flush chunk '12-1735109079.259224636.flb', retry in 6 seconds: task_id=11, input=tail.2 > output=opensearch.0 (out_id=0)
2024-12-25T14:44:40.284674129+08:00 [2024/12/25 06:44:40] [error] [output:opensearch:opensearch.0] HTTP status=401 URI=/_bulk, response:
2024-12-25T14:44:40.284730228+08:00 Unauthorized
2024-12-25T14:44:40.284738141+08:00
2024-12-25T14:44:40.284744550+08:00 [2024/12/25 06:44:40] [ warn] [engine] failed to flush chunk '12-1735109079.13082982.flb', retry in 9 seconds: task_id=8, input=tail.2 > output=opensearch.0 (out_id=0)