Open bostin opened 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)
异常日志如下:
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