eip-work / kuboard-press

Kuboard 是基于 Kubernetes 的微服务管理界面。同时提供 Kubernetes 免费中文教程,入门教程,最新版本的 Kubernetes v1.23.4 安装手册,(k8s install) 在线答疑,持续更新。
https://kuboard.cn/
22.52k stars 1.52k forks source link

kuboard-agent 和 kuboard-agent-2 在OrbStack v1.6.0+启动失败 #556

Open bostin opened 1 week ago

bostin commented 1 week ago

异常日志如下:

Start kagent

Start nginx nameserver is [192.168.194.138 nameserver fd07:b51a:cc66:a:8000::a] sed: unmatched '/' [GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.

[GIN-debug] POST /check-certificates --> main.checkCerts (3 handlers) [GIN-debug] Listening and serving HTTP on :5000 2024/11/04 18:19:02 [emerg] 36#36: host not found in resolver "NAMESERVER" in /etc/nginx/conf.d/nginx.80.conf:21 nginx: [emerg] host not found in resolver "NAMESERVER" in /etc/nginx/conf.d/nginx.80.conf:21

bostin commented 1 week ago

原因

当/etc/resolv.conf存在多个nameserver时,/start-kuboard-agent.sh执行异常

解决办法 修改镜像 eipwork/kuboard-agent:v3 根目录的 /start-kuboard-agent.sh 文件

117:   echo $(sed -n '/nameserver/p' /etc/resolv.conf | head -n 1)
118:   nameserver=$(sed -n '/nameserver/p' /etc/resolv.conf | head -n 1)