Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

生产环境日志下面没有容器 #6086

Open
sibo-git opened this issue Apr 28, 2024 · 8 comments
Open

生产环境日志下面没有容器 #6086

sibo-git opened this issue Apr 28, 2024 · 8 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@sibo-git
Copy link

多次卸载和安装过日志组件,
每次查看安装日志 loggin 都是跳过,每次都按照教程卸载的日志系统
`kubectl delete inputs.logging.kubesphere.io -n kubesphere-logging-system tail
kubectl delete crd fluentbitconfigs.logging.kubesphere.io

kubectl delete crd fluentbits.logging.kubesphere.io

kubectl delete crd inputs.logging.kubesphere.io

kubectl delete crd outputs.logging.kubesphere.io

kubectl delete crd parsers.logging.kubesphere.io

kubectl delete deployments.apps -n kubesphere-logging-system fluentbit-operator

helm uninstall elasticsearch-logging --namespace kubesphere-logging-system

kubectl delete deployment logsidecar-injector-deploy -n kubesphere-logging-system
kubectl delete ns kubesphere-logging-system`
然后开启日志,提示都跳过,是那里控制了日志安装状态吗?
TASK [common : ks-logging | Getting Kubernetes Node info] **********************
skipping: [localhost]

TASK [common : ks-logging | Setting container runtime of kubernetes] ***********
skipping: [localhost]

TASK [common : ks-logging | Setting container runtime of kubernetes] ***********
skipping: [localhost]

TASK [common : ks-logging | Debug container_runtime] ***************************
skipping: [localhost]

TASK [common : ks-logging | Debug logging_container_runtime] *******************
skipping: [localhost]

@sibo-git sibo-git added the kind/bug Categorizes issue or PR as related to a bug. label Apr 28, 2024
@yasyx
Copy link

yasyx commented Apr 29, 2024

你可以进installer的pod检查一下 ks-status.json 文件 是否满足logging这个playbook的启动条件
image

@sibo-git
Copy link
Author

sibo-git commented May 6, 2024

并没有发现Statu。logging 节点
/kubesphere/config $ cat ks-status.json
{
"status": {
"alerting": {
"enabledTime": "2024-03-22T11:44:05CST",
"status": "enabled"
},
"clusterId": "2eef09ce-8ec4-411d-a5a9-77cf71918b85-1704874142",
"core": {
"enabledTime": "2024-05-06T13:45:58CST",
"status": "enabled",
"version": "v3.4.1"
},
"devops": {
"enabledTime": "2024-01-10T16:08:23CST",
"status": "enabled"
},
"events": {
"enabledTime": "2024-03-18T12:10:16CST",
"ruler": {
"enabledTime": "2024-03-18T12:10:16CST",
"status": "enabled"
},
"status": "enabled"
},
"fluentbit": {
"enabledTime": "2024-01-10T16:07:20CST",
"status": "enabled"
},
"minio": {
"enabledTime": "2024-01-10T16:07:08CST",
"status": "enabled"
},
"monitoring": {
"enabledTime": "2024-05-06T13:46:34CST",
"status": "enabled"
},
"openldap": {
"enabledTime": "2024-01-10T16:07:01CST",
"status": "enabled"
},
"opensearch": {
"enabledTime": "2024-01-10T16:07:13CST",
"status": "enabled"
}
}
}/kubesphere/config

@sibo-git
Copy link
Author

sibo-git commented May 6, 2024

/kubesphere/config $ cat ks-status.json
{
"status": {
"alerting": {
"enabledTime": "2024-03-22T11:44:05CST",
"status": "enabled"
},
"clusterId": "2eef09ce-8ec4-411d-a5a9-77cf71918b85-1704874142",
"core": {
"enabledTime": "2024-05-06T13:45:58CST",
"status": "enabled",
"version": "v3.4.1"
},
"devops": {
"enabledTime": "2024-01-10T16:08:23CST",
"status": "enabled"
},
"events": {
"enabledTime": "2024-03-18T12:10:16CST",
"ruler": {
"enabledTime": "2024-03-18T12:10:16CST",
"status": "enabled"
},
"status": "enabled"
},
"fluentbit": {
"enabledTime": "2024-01-10T16:07:20CST",
"status": "enabled"
},
"minio": {
"enabledTime": "2024-01-10T16:07:08CST",
"status": "enabled"
},
"monitoring": {
"enabledTime": "2024-05-06T13:46:34CST",
"status": "enabled"
},
"openldap": {
"enabledTime": "2024-01-10T16:07:01CST",
"status": "enabled"
},
"opensearch": {
"enabledTime": "2024-01-10T16:07:13CST",
"status": "enabled"
}
}
} 输出内容

@yasyx
Copy link

yasyx commented May 6, 2024

https://github.com/kubesphere/ks-installer/blob/38055b318b8f805af65aedfa5ad4508128b5eb2c/roles/common/tasks/common-install.yaml#L39
image
看你的日志应该是fluentbit的安装跳过了,你可以删掉截图里的位置试试。

@sibo-git
Copy link
Author

sibo-git commented May 6, 2024

嗯嗯 好的,谢谢啦 我试试

@sibo-git
Copy link
Author

sibo-git commented May 9, 2024

https://github.com/kubesphere/ks-installer/blob/38055b318b8f805af65aedfa5ad4508128b5eb2c/roles/common/tasks/common-install.yaml#L39 image 看你的日志应该是fluentbit的安装跳过了,你可以删掉截图里的位置试试。
"res": {
"_ansible_no_log": false,
"changed": true,
"cmd": "/usr/local/bin/kubectl apply -f /kubesphere/kubesphere/fluentbit-operator\n",
"delta": "0:00:00.323819",
"end": "2024-05-09 17:50:56.955025",
"invocation": {
"module_args": {
"_raw_params": "/usr/local/bin/kubectl apply -f /kubesphere/kubesphere/fluentbit-operator\n",
"_uses_shell": true,
"argv": null,
"chdir": null,
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"stdin_add_newline": true,
"strip_empty_ends": true,
"warn": true
}
},
"msg": "non-zero return code",
"rc": 1,
"start": "2024-05-09 17:50:56.631206",
"stderr": "unable to recognize "/kubesphere/kubesphere/fluentbit-operator/custom-input-auditing.yaml": no matches for kind "Input" in version "logging.kubesphere.io/v1alpha2"\nunable to recognize "/kubesphere/kubesphere/fluentbit-operator/custom-input-events.yaml": no matches for kind "Input" in version "logging.kubesphere.io/v1alpha2"\nunable to recognize "/kubesphere/kubesphere/fluentbit-operator/custom-input-logging.yaml": no matches for kind "Input" in version "logging.kubesphere.io/v1alpha2"\nunable to recognize "/kubesphere/kubesphere/fluentbit-operator/custom-input-systemd.yaml": no matches for kind "Input" in version "logging.kubesphere.io/v1alpha2"\nunable to recognize "/kubesphere/kubesphere/fluentbit-operator/custom-output-elasticsearch-auditing.yaml": no matches for kind "Output" in version "logging.kubesphere.io/v1alpha2"\nunable to recognize "/kubesphere/kubesphere/fluentbit-operator/custom-output-elasticsearch-logging.yaml": no matches for kind "Output" in version "logging.kubesphere.io/v1alpha2"\nunable to recognize "/kubesphere/kubesphere/fluentbit-operator/custom-output-opensearch-auditing.yaml": no matches for kind "Output" in version "logging.kubesphere.io/v1alpha2"\nunable to recognize "/kubesphere/kubesphere/fluentbit-operator/custom-output-opensearch-events.yaml": no matches for kind "Output" in version "logging.kubesphere.io/v1alpha2"\nunable to recognize "/kubesphere/kubesphere/fluentbit-operator/custom-output-opensearch-logging.yaml": no matches for kind "Output" in version "logging.kubesphere.io/v1alpha2"\nunable to recognize "/kubesphere/kubesphere/fluentbit-operator/input-systemd-kubelet.yaml": no matches for kind "Input" in version "logging.kubesphere.io/v1alpha2"",
"stderr_lines": [
"unable to recognize "/kubesphere/kubesphere/fluentbit-operator/custom-input-auditing.yaml": no matches for kind "Input" in version "logging.kubesphere.io/v1alpha2"",
"unable to recognize "/kubesphere/kubesphere/fluentbit-operator/custom-input-events.yaml": no matches for kind "Input" in version "logging.kubesphere.io/v1alpha2"",
"unable to recognize "/kubesphere/kubesphere/fluentbit-operator/custom-input-logging.yaml": no matches for kind "Input" in version "logging.kubesphere.io/v1alpha2"",
"unable to recognize "/kubesphere/kubesphere/fluentbit-operator/custom-input-systemd.yaml": no matches for kind "Input" in version "logging.kubesphere.io/v1alpha2"",
"unable to recognize "/kubesphere/kubesphere/fluentbit-operator/custom-output-elasticsearch-auditing.yaml": no matches for kind "Output" in version "logging.kubesphere.io/v1alpha2"",
"unable to recognize "/kubesphere/kubesphere/fluentbit-operator/custom-output-elasticsearch-logging.yaml": no matches for kind "Output" in version "logging.kubesphere.io/v1alpha2"",
"unable to recognize "/kubesphere/kubesphere/fluentbit-operator/custom-output-opensearch-auditing.yaml": no matches for kind "Output" in version "logging.kubesphere.io/v1alpha2"",
"unable to recognize "/kubesphere/kubesphere/fluentbit-operator/custom-output-opensearch-events.yaml": no matches for kind "Output" in version "logging.kubesphere.io/v1alpha2"",
"unable to recognize "/kubesphere/kubesphere/fluentbit-operator/custom-output-opensearch-logging.yaml": no matches for kind "Output" in version "logging.kubesphere.io/v1alpha2"",
"unable to recognize "/kubesphere/kubesphere/fluentbit-operator/input-systemd-kubelet.yaml": no matches for kind "Input" in version "logging.kubesphere.io/v1alpha2""
],
"stdout": "filter.logging.kubesphere.io/filter-auditing unchanged\nfilter.logging.kubesphere.io/filter-events unchanged\nfilter.logging.kubesphere.io/kubernetes unchanged\nfilter.logging.kubesphere.io/systemd unchanged",
"stdout_lines": [
"filter.logging.kubesphere.io/filter-auditing unchanged",
"filter.logging.kubesphere.io/filter-events unchanged",
"filter.logging.kubesphere.io/kubernetes unchanged",
"filter.logging.kubesphere.io/systemd unchanged"
]
},
出现如下错误了

@yasyx
Copy link

yasyx commented May 15, 2024

看报错像是 缺少crd

@sibo-git
Copy link
Author

嗯嗯 不报错,能安装了,安装后只有[logsidecar-injector-admission] 这个部署完全不知道如何,日志检索无法使用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants