Closed CalvinFang closed 8 months ago
可以尝试一下在 pg 部署的 docker-compose 配置中 增加 privileged=true ,应该是由于权限问题,我是通过这个方式解决的
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
You can try adding privileged=true in the docker-compose configuration deployed by pg. It should be due to permission issues. I solved it in this way.
tks,我将pg镜像版本由v0.5.0更换为pgvector:v0.4.2解决了这个问题;
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
tks, I changed the pg image version from v0.5.0 to pgvector:v0.4.2 to solve this problem;
可以尝试一下在 pg 部署的 docker-compose 配置中 增加 privileged=true ,应该是由于权限问题,我是通过这个方式解决的
thx,我也是这个问题解决了
可以尝试一下在 pg 部署的 docker-compose 配置中 增加 privileged=true ,应该是由于权限问题,我是通过这个方式解决的 (base) root@DESKTOP-ND8N4R2:/mnt/e/code/FastGPT/fastgpt# docker-compose up -d privileged=true no such service: privileged=true 何解?我是wsl2+docker桌面版弄的,
例行检查
你的版本
问题描述 我使用docker-compose部署启动时发现pg一直重启,通过logs查看提示 popen failure: Cannot allocate memory initdb: error: program "postgres" is needed by initdb but was not found in the same directory as "/usr/lib/postgresql/15/bin/initdb" 也使用了初始化的curl尝试修复但未成功: curl --location --request POST 'http://*****:3000/api/admin/initv467' \
预期结果
相关截图
docker ps结果
[root@***** fast]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 0e739ee4b4b4 ghcr.io/labring/fastgpt:latest "sh -c 'node ${serve…" 32 minutes ago Up 32 minutes 0.0.0.0:3000->3000/tcp fastgpt 9ab1e0909d33 ankane/pgvector:v0.5.0 "docker-entrypoint.s…" 32 minutes ago Restarting (1) 23 seconds ago pg eb5523051929 mongo:5.0.18 "docker-entrypoint.s…" 32 minutes ago Up 32 minutes 0.0.0.0:27017->27017/tcp mongo
docker的logs
[root@ fast]# docker logs 9ab1e0909d33 popen failure: Cannot allocate memory initdb: error: program "postgres" is needed by initdb but was not found in the same directory as "/usr/lib/postgresql/15/bin/initdb" popen failure: Cannot allocate memory initdb: error: program "postgres" is needed by initdb but was not found in the same directory as "/usr/lib/postgresql/15/bin/initdb" [root@ fast]# curl --location --request POST 'http://*****:3000/api/admin/initv467' --header 'rootkey: root_key' --header 'Content-Type: application/json' 得到的回复是{"code":500,"statusText":"","message":"getaddrinfo ENOTFOUND pg","data":null}
文件目录如下,发现pg的目录下为空
[root@***** fast]# tree ├── config.json ├── docker-compose.yml ├── mongo │ └── data │ ├── collection-0--4162485612890685892.wt │ ├── collection-11-7081506281161257466.wt │ └── WiredTiger.wt │ └── ....... └── pg | └── data │ └── data目录下没有文件生成
DockerFile文件内容如下
[root@***** fast]# cat docker-compose.yml version: '3.3' services: pg: image: ankane/pgvector:v0.5.0 # git
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.5.0 # 阿里云
mongo: image: mongo:5.0.18
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 # 阿里云
fastgpt: container_name: fastgpt image: ghcr.io/labring/fastgpt:latest # git
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:latest # 阿里云
networks: fastgpt: