aiproxy的健康检查不起作用
例行检查
- [x] 我已确认目前没有类似 issue
- [x] 我已完整查看过项目 README,以及项目文档
- [x] 我使用了自己的 key,并确认我的 key 是可正常使用的
- [x] 我理解并愿意跟进此 issue,协助测试和提供反馈
- [x] 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭
你的版本
- [ ] 公有云版本
- [x] 私有部署版本, 具体版本号: v4.9.0
问题描述, 日志截图,配置文件等
部署aiproxy(ghcr.io/labring/sealos-aiproxy-service:latest),可以正常使用,但是状态一直是unhealthy,似乎健康检查并不起作用
复现步骤
预期结果 容器部署,healthcheck起作用 相关截图
same
你这是从哪里看到的unhealthy
pg 正常起来了么
pg 正常起来了么
pg是正常的,除了显示unhealthy,使用方面没有发现任何问题。不过,我不是docker-compose将pg和aiproxy一起部署的,pgvector是服务器本来就部署过的,只是给aiproxy开了个账号创建了个新的数据库连接使用而已,所以服务器名称并不是aiproxy_pg,跟这个会有关系?
此问题是因镜像内缺少curl造成无法健康检查,关闭或使用wget代替
OCI runtime exec failed: exec failed: unable to start container process: exec: "curl": executable file not found in $PATH: unknown
wget
test: [ "CMD-SHELL", "wget -q -O - http://localhost:3000/api/status | grep -o '\"success\":\\s*true' | awk -F: '{print $2}'" ]
用oneapi的健康检查写法就正常了
我用楼上的方法,改了重启。还不行,还是 Healthy 不是 Started
'\"success\":\\s*true'
'\"success\":\s*true'
我用楼上的方法,改了重启。还不行,还是 Healthy 不是 Started
健康检查,正常不是都应该显示healthy就行了吗?为什么需要显示Started?
最新版镜像已增加 curl
你可以试试这个办法,在docker-compose.yaml文件中找到aiproxy或者aiproxy_pg,然后在类似命令中间添加privileged: true,然后使用 docker-compose down 和docker-compose up -d重新启动容器。然后该容器即可正常启动,这一小段代码在dify服务和fastgpt服务中都非常有效果。 aiproxy_pg: image: pgvector/pgvector:0.8.0-pg15 # docker hub # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15 # 阿里云 restart: unless-stopped container_name: aiproxy_pg privileged: true
You can try this method, find aiproxy or aiproxy_pg in the docker-compose.yaml file, then add privileged: true in the middle of similar commands, and then restart the container using docker-compose down and docker-compose up -d. Then the container can be started normally. This small piece of code is very effective in both the dify service and the fastgpt service.
aiproxy_pg: image: pgvector/pgvector:0.8.0-pg15 # docker hub # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15 # 阿里云 restart: unless-stopped container_name: aiproxy_pg privileged: true
你可以试试这个办法,在docker-compose.yaml文件中找到aiproxy或者aiproxy_pg,然后在类似命令中间添加privileged: true,然后使用 docker-compose down 和docker-compose up -d重新启动容器。然后该容器即可正常启动,这一小段代码在dify服务和fastgpt服务中都非常有效果。 aiproxy_pg: image: pgvector/pgvector:0.8.0-pg15 # docker hub # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15 # 阿里云 restart: unless-stopped container_name: aiproxy_pg privileged: true
You can try this method, find aiproxy or aiproxy_pg in the docker-compose.yaml file, then add privileged: true in the middle of similar commands, and then restart the container using docker-compose down and docker-compose up -d. Then the container can be started normally. This small piece of code is very effective in both the dify service and the fastgpt service.
aiproxy_pg: image: pgvector/pgvector:0.8.0-pg15 # docker hub # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15 # 阿里云 restart: unless-stopped container_name: aiproxy_pg privileged: true
神医