caelus
caelus copied to clipboard
lighthouse运行报错
systemctl status lighthouse.service ● lighthouse.service - Lighthouse server Loaded: loaded (/usr/lib/systemd/system/lighthouse.service; enabled; vendor preset: disabled) Active: failed (Result: start-limit) since 一 2022-08-29 18:09:16 CST; 9min ago Process: 57742 ExecStart=/usr/bin/lighthouse $ARGS (code=exited, status=255) Main PID: 57742 (code=exited, status=255)
8月 29 18:09:16 host-241 systemd[1]: lighthouse.service: main process exited, code=exited, status=255/n/a 8月 29 18:09:16 host-241 lighthouse[57742]: F0829 18:09:16.070937 57742 server.go:54] failed complete: failed to decode hook configuration file "/etc/lighthouse/config.yaml", no kind "hookConfiguration" is registered for version "lighthouse.io/v1alpha1" in scheme "pkg/runtime/scheme.go:101" 8月 29 18:09:16 host-241 systemd[1]: Failed to start Lighthouse server. 8月 29 18:09:16 host-241 systemd[1]: Unit lighthouse.service entered failed state. 8月 29 18:09:16 host-241 systemd[1]: lighthouse.service failed. 8月 29 18:09:16 host-241 systemd[1]: lighthouse.service holdoff time over, scheduling restart. 8月 29 18:09:16 host-241 systemd[1]: start request repeated too quickly for lighthouse.service 8月 29 18:09:16 host-241 systemd[1]: Failed to start Lighthouse server. 8月 29 18:09:16 host-241 systemd[1]: Unit lighthouse.service entered failed state. 8月 29 18:09:16 host-241 systemd[1]: lighthouse.service failed.
使用的是最新的代码
kubelet --docker-endpoint=unix:///var/run/lighthouse.sock --docker=unix:///var/run/lighthouse.sock
Flag --docker-endpoint has been deprecated, will be removed along with dockershim. Flag --docker has been deprecated, This is a cadvisor flag that was mistakenly registered with the Kubelet. Due to legacy concerns, it will follow the standard CLI deprecation timeline before being removed. I0829 18:08:37.115017 57180 server.go:440] "Kubelet version" kubeletVersion="v1.21.5-hc.1" I0829 18:08:37.115454 57180 server.go:573] "Standalone mode, no API client" I0829 18:08:37.115546 57180 container_manager_linux.go:991] "CPUAccounting not enabled for process" pid=57180 I0829 18:08:37.115569 57180 container_manager_linux.go:994] "MemoryAccounting not enabled for process" pid=57180
https://github.com/Tencent/caelus/issues/52#issue-1213254961
e "/etc/lighthouse/config.yaml", no k
lighthouse的配置文件能否发下?
cat > /etc/lighthouse/config.yaml <<EOF apiVersion: lighthouse.io/v1alpha1 kind: hookConfiguration timeout: 10 listenAddress: unix:///var/run/lighthouse.sock webhooks:
- name: docker
endpoint: unix://@plugin-server
failurePolicy: Fail
stages:
- urlPattern: /containers/create method: post type: PreHook
- urlPattern: /containers/{name:.*}/update method: post type: PreHook EOF
上面是lighthous提供的配置文本 https://github.com/Tencent/caelus/blob/master/doc/start.md#%E5%AE%89%E8%A3%85plugin-server
上面有两个地方有问题 apiVersion: lighthouse.io/v1alpha1 kind: hookConfiguration 应改为 apiVersion: componentconfig.lighthouse.io/v1alpha1 kind: HookConfiguration 才能通过