eip-work/kuboard-press

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

Closed this issue · 1 comments

异常日志如下:

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.

  • using env: export GIN_MODE=release
  • using code: gin.SetMode(gin.ReleaseMode)

[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

原因

当/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)