FastGPT icon indicating copy to clipboard operation
FastGPT copied to clipboard

aiproxy的健康检查不起作用

Open chung1912 opened this issue 9 months ago • 4 comments

例行检查

  • [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起作用 相关截图

Image

chung1912 avatar Mar 06 '25 15:03 chung1912

same

pickedbrian avatar Mar 07 '25 07:03 pickedbrian

你这是从哪里看到的unhealthy

Image

goactiongo avatar Mar 07 '25 16:03 goactiongo

pg 正常起来了么

c121914yu avatar Mar 07 '25 16:03 c121914yu

pg 正常起来了么

pg是正常的,除了显示unhealthy,使用方面没有发现任何问题。不过,我不是docker-compose将pg和aiproxy一起部署的,pgvector是服务器本来就部署过的,只是给aiproxy开了个账号创建了个新的数据库连接使用而已,所以服务器名称并不是aiproxy_pg,跟这个会有关系?

chung1912 avatar Mar 08 '25 01:03 chung1912

此问题是因镜像内缺少curl造成无法健康检查,关闭或使用wget代替

OCI runtime exec failed: exec failed: unable to start container process: exec: "curl": executable file not found in $PATH: unknown

xiaoyao9184 avatar Mar 10 '25 00:03 xiaoyao9184

wget

test: [ "CMD-SHELL", "wget -q -O - http://localhost:3000/api/status | grep -o '\"success\":\\s*true' | awk -F: '{print $2}'" ] 用oneapi的健康检查写法就正常了

chung1912 avatar Mar 10 '25 01:03 chung1912

我用楼上的方法,改了重启。还不行,还是 Healthy 不是 Started

davidhsing avatar Mar 10 '25 02:03 davidhsing

'\"success\":\\s*true'
'\"success\":\s*true'

xiaoyao9184 avatar Mar 10 '25 02:03 xiaoyao9184

我用楼上的方法,改了重启。还不行,还是 Healthy 不是 Started

健康检查,正常不是都应该显示healthy就行了吗?为什么需要显示Started?

chung1912 avatar Mar 10 '25 03:03 chung1912

最新版镜像已增加 curl

c121914yu avatar Mar 10 '25 15:03 c121914yu

你可以试试这个办法,在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

Image

seasurt avatar Apr 30 '25 08:04 seasurt

你可以试试这个办法,在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

Image

神医

Image

Yikumasai avatar Nov 03 '25 15:11 Yikumasai