[Bug] 我用FNOS的docker安装IP模式,其中{:8000}和{:5432}端口均被占用了,于是我修改了配置文件,但是lobe-casdoor一直报错。 #6081
Replies: 4 comments
-
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
Beta Was this translation helpful? Give feedback.
-
@Chincherry93 你好!我是Dosu,一个可以帮助你解决bug、回答问题并成为贡献者的机器人。我会在人类维护者到来之前帮助你解决问题。 The "connection refused" error for the 'casdoor' service is likely due to the incorrect port configuration for the PostgreSQL service. In your Docker Compose file, the PostgreSQL service is exposed on port To resolve this issue, update the dataSourceName: 'user=postgres password=${POSTGRES_PASSWORD} host=postgresql port=5432 sslmode=disable dbname=casdoor' This change ensures that 'casdoor' connects to the PostgreSQL service using the correct internal port. The external port To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Beta Was this translation helpful? Give feedback.
-
这个可能要你自行探索下了,或者 @cy948 有空看看? |
Beta Was this translation helpful? Give feedback.
-
我也遇到同样的情况 |
Beta Was this translation helpful? Give feedback.
-
📦 Environment
Docker
📌 Version
latest
💻 Operating System
Other Linux
🌐 Browser
Other
🐛 Bug Description
##这是yml文件
name: lobe-chat-database
services:
network-service:
image: alpine
container_name: lobe-network
ports:
- '${MINIO_PORT}:${MINIO_PORT}' # MinIO API
- '9001:9001' # MinIO Console
- '${CASDOOR_PORT}:8000' # Casdoor
- '${LOBE_PORT}:3210' # LobeChat
command: tail -f /dev/null
networks:
- lobe-network
postgresql:
image: pgvector/pgvector:pg16
container_name: lobe-postgres
ports:
- '5400:5432'
volumes:
- './data:/var/lib/postgresql/data'
environment:
- 'POSTGRES_DB=${LOBE_DB_NAME}'
- 'POSTGRES_PASSWORD=${POSTGRES_PASSWORD}'
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 30s
timeout: 30s
retries: 5
restart: always
networks:
- lobe-network
minio:
image: minio/minio
container_name: lobe-minio
network_mode: 'service:network-service'
volumes:
- './s3_data:/etc/minio/data'
environment:
- 'MINIO_ROOT_USER=${MINIO_ROOT_USER}'
- 'MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}'
- 'MINIO_API_CORS_ALLOW_ORIGIN=http://192.168.110.172:${LOBE_PORT}'
restart: always
command: >
server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001"
casdoor:
image: casbin/casdoor
container_name: lobe-casdoor
entrypoint: /bin/sh -c './server --createDatabase=true'
network_mode: 'service:network-service'
depends_on:
postgresql:
condition: service_healthy
environment:
RUNNING_IN_DOCKER: 'true'
driverName: 'postgres'
dataSourceName: 'user=postgres password=${POSTGRES_PASSWORD} host=postgresql port=5400 sslmode=disable dbname=casdoor'
origin: 'http://192.168.110.172:${CASDOOR_PORT}'
runmode: 'dev'
volumes:
- ./init_data.json:/init_data.json
lobe:
image: lobehub/lobe-chat-database
container_name: lobe-chat
network_mode: 'service:network-service'
depends_on:
postgresql:
condition: service_healthy
network-service:
condition: service_started
minio:
condition: service_started
casdoor:
condition: service_started
volumes:
data:
driver: local
s3_data:
driver: local
networks:
lobe-network:
driver: bridge
##这是.env文件
Proxy, if you need it
HTTP_PROXY=http://localhost:7890
HTTPS_PROXY=http://localhost:7890
Other environment variables, as needed. You can refer to the environment variables configuration for the client version, making sure not to have ACCESS_CODE.
OPENAI_API_KEY=sk-xxxx
OPENAI_PROXY_URL=https://api.openai.com/v1
OPENAI_MODEL_LIST=...
===========================
====== Preset config ======
===========================
if no special requirements, no need to change
LOBE_PORT=3210
CASDOOR_PORT=8011
MINIO_PORT=9000
Postgres related, which are the necessary environment variables for DB
LOBE_DB_NAME=lobechat
POSTGRES_PASSWORD=uWNZugjBqixf8dxC
Casdoor secret
AUTH_CASDOOR_ID=a387a4892ee19b1a2249
AUTH_CASDOOR_SECRET=e1e7e9efd1ddf448ea5f742aa1f09c3d
MinIO S3 configuration
MINIO_ROOT_USER=YOUR_MINIO_USER
MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD
Configure the bucket information of MinIO
MINIO_LOBE_BUCKET=lobe
S3_ACCESS_KEY_ID=soaucnP8Bip0TDdUjxng
S3_SECRET_ACCESS_KEY=ZPUzvY34umfcfxvWKSv0P00vczVMB6YmgJS5J9eO
📷 Recurrence Steps
##lobe-casdoor这是报错信息
panic: dial tcp 192.168.48.3:5400: connect: connection refused
goroutine 1 [running]:
github.com/casdoor/casdoor/object.InitAdapter()
main.main()
🚦 Expected Behavior
No response
📝 Additional Information
No response
Beta Was this translation helpful? Give feedback.
All reactions