labring / FastGPT

FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, and visual AI workflow orchestration, letting you easily develop and deploy complex question-answering systems without the need for extensive setup or configuration.
https://tryfastgpt.ai
Other
17.23k stars 4.61k forks source link

[MongoDB timeout][PG chown not permitted] Mac Apple Silicon Aliyun docker image not compatible #341

Closed yhyu13 closed 1 year ago

yhyu13 commented 1 year ago

例行检查

你的版本 docker image

问题描述

MacMini M2 MacOS13.5.2 用的着里 https://doc.fastgpt.run/docs/installation/docker/ 给出的docker compose文件 没有配置任何代理

Mac本地docker root 1234 登陆,docker日志显示mongodb连不上。docker中pg一直权限报错。 请问有先例吗。

我在ubuntu上都是ok的,mac上就出问题了

ohanyu@yohandeMac-mini FastGPT % sudo docker-compose up
Password:
[+] Running 3/0
 ✔ Container mongo    Created                                                                                     0.0s 
 ✔ Container pg       Created                                                                                     0.0s 
 ✔ Container fastgpt  Created                                                                                     0.0s 
Attaching to fastgpt, mongo, pg
pg       | chown: changing ownership of '/var/lib/postgresql/data/._pg_wal': Operation not permitted
mongo    | 
mongo    | WARNING: MongoDB 5.0+ requires a CPU with AVX support, and your current system does not appear to have that!
mongo    |   see https://jira.mongodb.org/browse/SERVER-54407
mongo    |   see also https://www.mongodb.com/community/forums/t/mongodb-5-0-cpu-intel-g4650-compatibility/116610/2
mongo    |   see also https://github.com/docker-library/mongo/issues/485#issuecomment-891991814
mongo    | 
pg exited with code 1
pg       | chown: changing ownership of '/var/lib/postgresql/data/._pg_wal': Operation not permitted
pg exited with code 1
pg       | chown: changing ownership of '/var/lib/postgresql/data/._pg_wal': Operation not permitted
pg exited with code 1
fastgpt  | Listening on port 3000 url: http://80c905b032e0:3000
pg       | chown: changing ownership of '/var/lib/postgresql/data/._pg_wal': Operation not permitted
pg exited with code 1
pg       | chown: changing ownership of '/var/lib/postgresql/data/._pg_wal': Operation not permitted
pg exited with code 1
pg       | chown: changing ownership of '/var/lib/postgresql/data/._pg_wal': Operation not permitted
pg exited with code 1
pg       | chown: changing ownership of '/var/lib/postgresql/data/._pg_wal': Operation not permitted
pg exited with code 1
pg       | chown: changing ownership of '/var/lib/postgresql/data/._pg_wal': Operation not permitted
pg exited with code 1
pg       | chown: changing ownership of '/var/lib/postgresql/data/._pg_wal': Operation not permitted
pg exited with code 1
pg       | chown: changing ownership of '/var/lib/postgresql/data/._pg_wal': Operation not permitted
pg exited with code 1
pg       | chown: changing ownership of '/var/lib/postgresql/data/._pg_wal': Operation not permitted
pg exited with code 1
pg       | chown: changing ownership of '/var/lib/postgresql/data/._pg_wal': Operation not permitted
pg exited with code 1
pg       | chown: changing ownership of '/var/lib/postgresql/data/._pg_wal': Operation not permitted
pg exited with code 1
fastgpt  | System Version: 4.4.4
fastgpt  | {
fastgpt  |   FeConfig: {
fastgpt  |     show_emptyChat: true,
fastgpt  |     show_register: false,
fastgpt  |     show_appStore: false,
fastgpt  |     show_userDetail: false,
fastgpt  |     show_contact: true,
fastgpt  |     show_git: true,
fastgpt  |     show_doc: true,
fastgpt  |     systemTitle: 'FastGPT',
fastgpt  |     authorText: 'Made by FastGPT Team.',
fastgpt  |     limit: { exportLimitMinutes: 0 },
fastgpt  |     scripts: []
fastgpt  |   },
fastgpt  |   SystemParams: { vectorMaxProcess: 15, qaMaxProcess: 15, pgIvfflatProbe: 20 },
fastgpt  |   ChatModels: [
fastgpt  |     {
fastgpt  |       model: 'gpt-3.5-turbo',
fastgpt  |       name: 'GPT35-4k',
fastgpt  |       contextMaxToken: 4000,
fastgpt  |       quoteMaxToken: 2000,
fastgpt  |       maxTemperature: 1.2,
fastgpt  |       price: 0,
fastgpt  |       defaultSystem: ''
fastgpt  |     },
fastgpt  |     {
fastgpt  |       model: 'gpt-3.5-turbo-16k',
fastgpt  |       name: 'GPT35-16k',
fastgpt  |       contextMaxToken: 16000,
fastgpt  |       quoteMaxToken: 8000,
fastgpt  |       maxTemperature: 1.2,
fastgpt  |       price: 0,
fastgpt  |       defaultSystem: ''
fastgpt  |     },
fastgpt  |     {
fastgpt  |       model: 'gpt-4',
fastgpt  |       name: 'GPT4-8k',
fastgpt  |       contextMaxToken: 8000,
fastgpt  |       quoteMaxToken: 4000,
fastgpt  |       maxTemperature: 1.2,
fastgpt  |       price: 0,
fastgpt  |       defaultSystem: ''
fastgpt  |     }
fastgpt  |   ],
fastgpt  |   VectorModels: [
fastgpt  |     {
fastgpt  |       model: 'text-embedding-ada-002',
fastgpt  |       name: 'Embedding-2',
fastgpt  |       price: 0,
fastgpt  |       defaultToken: 500,
fastgpt  |       maxToken: 3000
fastgpt  |     }
fastgpt  |   ],
fastgpt  |   QAModel: {
fastgpt  |     model: 'gpt-3.5-turbo-16k',
fastgpt  |     name: 'GPT35-16k',
fastgpt  |     maxToken: 16000,
fastgpt  |     price: 0
fastgpt  |   },
fastgpt  |   ExtractModel: {
fastgpt  |     model: 'gpt-3.5-turbo-16k',
fastgpt  |     functionCall: true,
fastgpt  |     name: 'GPT35-16k',
fastgpt  |     maxToken: 16000,
fastgpt  |     price: 0,
fastgpt  |     prompt: ''
fastgpt  |   },
fastgpt  |   CQModel: {
fastgpt  |     model: 'gpt-3.5-turbo-16k',
fastgpt  |     functionCall: true,
fastgpt  |     name: 'GPT35-16k',
fastgpt  |     maxToken: 16000,
fastgpt  |     price: 0,
fastgpt  |     prompt: ''
fastgpt  |   }
fastgpt  | }
fastgpt  | winston-mongodb: error initialising logger MongoServerSelectionError: connect ECONNREFUSED 172.18.0.2:27017
fastgpt  |     at Timeout._onTimeout (/app/node_modules/.pnpm/registry.npmmirror.com+mongodb@3.7.4/node_modules/mongodb/lib/core/sdam/topology.js:438:30)
fastgpt  |     at listOnTimeout (node:internal/timers:573:17)
fastgpt  |     at process.processTimers (node:internal/timers:514:7) {
fastgpt  |   reason: TopologyDescription {
fastgpt  |     type: 'Single',
fastgpt  |     setName: null,
fastgpt  |     maxSetVersion: null,
fastgpt  |     maxElectionId: null,
fastgpt  |     servers: Map(1) { 'mongo:27017' => [ServerDescription] },
fastgpt  |     stale: false,
fastgpt  |     compatible: true,
fastgpt  |     compatibilityError: null,
fastgpt  |     logicalSessionTimeoutMinutes: null,
fastgpt  |     heartbeatFrequencyMS: 10000,
fastgpt  |     localThresholdMS: 15,
fastgpt  |     commonWireVersion: null
fastgpt  |   }
fastgpt  | }
fastgpt  | winston-mongodb: will try reconnecting in 10 seconds
fastgpt  | error-> mongo connect error
yhyu13 commented 1 year ago

有mac机器的可以复线一下,不行的话,我再本地查一下原因

c121914yu commented 1 year ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


If you have a Mac machine, you can reconnect. If it doesn't work, I'll check the reason locally.

c121914yu commented 1 year ago

它提示你不支持mongo5.x,换4.x就好了。

c121914yu commented 1 year ago

pg大概率是磁盘权限问题

yhyu13 commented 1 year ago

@c121914yu 笑死,pg和mongodb我用的是阿里云的镜像。这两个用dockerhub的就好了。是不是镜像出问题了,sha256一致吗

c121914yu commented 1 year ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@c121914yu Laughing, I use Alibaba Cloud images for pg and mongodb. Just use dockerhub for these two. Is there something wrong with the mirror? Is the sha256 consistent?

c121914yu commented 1 year ago

@c121914yu 笑死,pg和mongodb我用的是阿里云的镜像。这两个用dockerhub的就好了。是不是镜像出问题了,sha256一致吗

说明你是 arm, 阿里云的没有arm。

yhyu13 commented 1 year ago

@c121914yu 笑死,pg和mongodb我用的是阿里云的镜像。这两个用dockerhub的就好了。是不是镜像出问题了,sha256一致吗

说明你是 arm, 阿里云的没有arm。

ok 原来如此

c121914yu commented 1 year ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@c121914yu Laughing, I use Alibaba Cloud images for pg and mongodb. Just use dockerhub for these two. Is there something wrong with the mirror? Is the sha256 consistent?

It means you are arm, Alibaba Cloud does not have arm.

ok that’s it

yhyu13 commented 1 year ago

Actually found other complains on pg/mongo db permissin error within docker container

https://github.com/docker-library/postgres/issues/361

https://stackoverflow.com/questions/60740673/docker-compose-up-postgresql-error-chmod-var-lib-postgresql-data-operation-n

I placed this project on an external drive with exFAFT format. It is due to Mac computer external drive format not compatible with linux permission system.

So it is not problem with Aliyun or this project but with Apple and docker