Closed davidelectricfree closed 1 month ago
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
📦 Environment
Docker
1.19.21
Other Linux
Edge
MINI and database have been configured. I tried uploading files to enrich the database. The uploaded files appeared faster. However, after the progress bar was read, it was always stuck on uploading. I opened the developer mode of the browser and found that there was an error in the upload. The error code was : net::ERR_CONNECTION_RESET
Then my compose file is as follows:
services: network-service: image: alpine:3.20 container_name: lobe-network ports:
"${LOBE_PORT}:3210" # LobeChat command: tail -f /dev/null networks: -lobe-network
postgresql: image: pgvector/pgvector:pg16 container_name: lobe-postgres ports:
"POSTGRES_PASSWORD=${POSTGRES_PASSWORD}" healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 restart: always networks: -lobe-network
minio: image: minio/minio:RELEASE.2024-09-13T20-26-02Z container_name: lobe-minio network_mode: "service:network-service" volumes:
"MINIO_API_CORS_ALLOW_ORIGIN=http://192.168.50.114:${LOBE_PORT}" restart: always command: > server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001"
logto: image: svhd/logto:1.19.0 container_name: lobe-logto network_mode: "service:network-service" depends_on: postgresql: condition: service_healthy environment:
"ADMIN_ENDPOINT=http://192.168.50.114:3002" entrypoint: ["sh", "-c", "npm run cli db seed -- --swe && npm start"]
lobe: image: lobehub/lobe-chat-database:v1.19.21 container_name: lobe-database network_mode: "service:network-service" depends_on: postgresql: condition: service_healthy network-service: condition: service_started minio: condition: service_started logto: condition: service_started
environment:
volumes: data: driver:local s3_data: driver: local
networks: lobe-network: driver: bridge
Please help me find out what is the reason
No response
No response
No response
👀 @davidelectricfree
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。
I found a similar unsolved discussion regarding Docker Compose and database configurations that might be relevant to your issue: 分享一组自用的数据库版本私有化docker-compose [1].
Regarding the ERR_CONNECTION_RESET
error during file uploads, this can often be caused by network issues or misconfigurations in your Docker setup. Here are a few things you might want to check:
Network Configuration: Ensure that your network settings in the docker-compose.yml
file are correctly configured. All services should be able to communicate over the specified ports and network. Make sure the network_mode
and ports
settings are correct.
CORS Settings: Verify that the CORS settings for MinIO are correctly configured to allow requests from your application. The MINIO_API_CORS_ALLOW_ORIGIN
should match the domain and port of your application.
Resource Limits: Check if there are any resource constraints (CPU, memory) that might be causing the connection to reset.
Logs and Errors: Look at the logs of the involved containers (minio
, lobe
, etc.) for any errors or warnings that might give more insight into the issue.
Retry Mechanism: The application does not have an explicit retry mechanism for file uploads. If network errors occur, the file is removed from the upload list without retrying [2].
If these steps do not resolve the issue, consider testing the setup on a different network or environment to rule out network-specific problems.
To continue talking to Dosu, mention @dosu.
@dosu 我目前是将全本地方案,将lobe/miniIO/LOGTO/PGSQL均部署在群晖NAS上,如下是我的compose yaml
services: network-service: image: alpine:3.20 container_name: lobe-network ports:
lobe-network
postgresql: image: pgvector/pgvector:pg16 container_name: lobe-postgres ports:
lobe-network
minio: image: minio/minio:RELEASE.2024-09-13T20-26-02Z container_name: lobe-minio network_mode: "service:network-service" volumes:
"MINIO_API_CORS_ALLOW_ORIGIN=http://192.168.50.114:${LOBE_PORT}" restart: always command: > server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001"
logto: image: svhd/logto:1.19.0 container_name: lobe-logto network_mode: "service:network-service" depends_on: postgresql: condition: service_healthy environment:
"ADMIN_ENDPOINT=http://192.168.50.114:3002" entrypoint: ["sh", "-c", "npm run cli db seed -- --swe && npm start"]
lobe: image: lobehub/lobe-chat-database:v1.19.21 container_name: lobe-database network_mode: "service:network-service" depends_on: postgresql: condition: service_healthy network-service: condition: service_started minio: condition: service_started logto: condition: service_started
environment:
volumes: data: driver: local s3_data: driver: local
networks: lobe-network: driver: bridge
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@dosu I currently deploy the all-local solution and deploy lobe/miniIO/LOGTO/PGSQL on Synology NAS. The following is my compose yaml
services: network-service: image: alpine:3.20 container_name: lobe-network ports:
"${LOBE_PORT}:3210" # LobeChat command: tail -f /dev/null networks: -lobe-network
postgresql: image: pgvector/pgvector:pg16 container_name: lobe-postgres ports:
"POSTGRES_PASSWORD=${POSTGRES_PASSWORD}" healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 restart: always networks: -lobe-network
minio: image: minio/minio:RELEASE.2024-09-13T20-26-02Z container_name: lobe-minio network_mode: "service:network-service" volumes:
"MINIO_API_CORS_ALLOW_ORIGIN=http://192.168.50.114:${LOBE_PORT}" restart: always command: > server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001"
logto: image: svhd/logto:1.19.0 container_name: lobe-logto network_mode: "service:network-service" depends_on: postgresql: condition: service_healthy environment:
"ADMIN_ENDPOINT=http://192.168.50.114:3002" entrypoint: ["sh", "-c", "npm run cli db seed -- --swe && npm start"]
lobe: image: lobehub/lobe-chat-database:v1.19.21 container_name: lobe-database network_mode: "service:network-service" depends_on: postgresql: condition: service_healthy network-service: condition: service_started minio: condition: service_started logto: condition: service_started
environment:
volumes: data: driver: local s3_data: driver: local
networks: lobe-network: driver: bridge
To address the ERR_CONNECTION_RESET
error during file uploads in your Docker Compose setup on a Synology NAS, consider the following steps:
CORS Configuration: Ensure that the MINIO_API_CORS_ALLOW_ORIGIN
environment variable is correctly set to allow requests from your LobeChat application. It should match the domain and port of your application. For example:
environment:
- "MINIO_API_CORS_ALLOW_ORIGIN=http://192.168.50.114:${LOBE_PORT}"
This setting allows cross-origin requests from your LobeChat domain [1].
Network Configuration: Verify that your network settings in the docker-compose.yml
file are correctly configured. Ensure that all services can communicate over the specified ports and network. The network_mode
and ports
settings should be correct and consistent across services.
Resource Constraints: Check if there are any resource constraints (CPU, memory) on your Synology NAS that might be causing the connection to reset. Ensure that your NAS has sufficient resources to handle the services.
Logs and Errors: Review the logs of the involved containers (minio
, lobe
, etc.) for any errors or warnings that might provide more insight into the issue.
Retry Mechanism: Note that the application does not have an explicit retry mechanism for file uploads. If network errors occur, the file is removed from the upload list without retrying [2].
If these steps do not resolve the issue, consider testing the setup on a different network or environment to rule out network-specific problems.
To continue talking to Dosu, mention @dosu.
@dosu 但是现在存在上传文件,显示进度条为满,但是始终在上传中,查询浏览器报错信息为:net::ERR_CONNECTION_RESET,结合上面我的docker compose.yaml 请问原因是什么?
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@dosu But now there is an uploaded file, and the progress bar is full, but it is always uploading. The error message reported by the browser is: net::ERR_CONNECTION_RESET. Combined with my docker compose.yaml above, what is the reason?
To address the ERR_CONNECTION_RESET
error during file uploads, consider the following:
CORS Configuration: Ensure that the MINIO_API_CORS_ALLOW_ORIGIN
is set correctly in your Docker Compose file to allow requests from your LobeChat application. It should match the domain and port of your application:
environment:
- "MINIO_API_CORS_ALLOW_ORIGIN=http://192.168.50.114:${LOBE_PORT}"
This setting allows cross-origin requests from your LobeChat domain [1].
Network Configuration: Verify that your network settings in the docker-compose.yml
file are correct. Ensure all services can communicate over the specified ports and network. The network_mode
and ports
settings should be consistent across services.
Resource Constraints: Check for any resource constraints (CPU, memory) on your Synology NAS that might be causing the connection to reset. Ensure your NAS has sufficient resources to handle the services.
Logs and Errors: Review the logs of the involved containers (minio
, lobe
, etc.) for any errors or warnings that might provide more insight into the issue.
Retry Mechanism: Note that the application does not have an explicit retry mechanism for file uploads. If network errors occur, the file is removed from the upload list without retrying.
If these steps do not resolve the issue, consider testing the setup on a different network or environment to rule out network-specific problems.
To continue talking to Dosu, mention @dosu.
@dosu 我检查了你说的CORS设置,确实和你说的是一样的,我该怎么做以排除其他问题?谢谢
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@dosu I checked the CORS settings you mentioned, and they are indeed the same as you said. What should I do to eliminate other problems? Thanks
To further troubleshoot the ERR_CONNECTION_RESET
error, consider the following steps:
Network Configuration: Double-check your Docker Compose network settings. Ensure that all services are correctly configured to communicate over the specified ports and network. Verify that the network_mode
and ports
settings are consistent across services.
Resource Constraints: Ensure your Synology NAS has sufficient resources (CPU, memory) to handle the services. Check if there are any resource limitations that might be causing the connection to reset.
Logs and Errors: Review the logs of the involved containers (minio
, lobe
, etc.) for any errors or warnings. These logs can provide more insight into what might be causing the issue.
Network Environment: Test the setup on a different network or environment to rule out network-specific problems. This can help determine if the issue is related to your current network configuration.
Firewall and Security Settings: Check if there are any firewall or security settings on your NAS or network that might be blocking or interrupting the connection.
By systematically checking these areas, you can identify and resolve potential issues causing the connection reset error.
To continue talking to Dosu, mention @dosu.
@dosu 我在MINIIO的管理后台,通过追踪行为,在上传过程中,检测到上传行为的Status是403 Forbidden,请问下一步我要怎么做
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@dosu I am tracking the behavior in the MINIIO management background. During the upload process, the Status of the upload behavior detected is 403 Forbidden. What should I do next?
To resolve the 403 Forbidden status during the upload process in the MinIO management console, follow these steps:
Bucket Policy Configuration: Ensure that the bucket policy allows the necessary actions. The policy should look like this:
{
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": ["*"]
},
"Action": ["s3:GetBucketLocation"],
"Resource": ["arn:aws:s3:::lobe"]
},
{
"Effect": "Allow",
"Principal": {
"AWS": ["*"]
},
"Action": ["s3:ListBucket"],
"Resource": ["arn:aws:s3:::lobe"],
"Condition": {
"StringEquals": {
"s3:prefix": ["files/*"]
}
}
},
{
"Effect": "Allow",
"Principal": {
"AWS": ["*"]
},
"Action": ["s3:PutObject", "s3:DeleteObject", "s3:GetObject"],
"Resource": ["arn:aws:s3:::lobe/files/**"]
}
],
"Version": "2012-10-17"
}
CORS Configuration: Ensure that CORS is configured correctly to allow cross-origin requests from your domain. This can be set in the MinIO WebUI under Configuration - API - Cors Allow Origin
, or in the Docker Compose file under minio - environment - MINIO_API_CORS_ALLOW_ORIGIN
.
Access Keys: Verify that the correct Access Key
and Secret Key
are set in your .env
file under S3_ACCESS_KEY_ID
and S3_SECRET_ACCESS_KEY
.
Endpoint Configuration: Ensure that the S3_ENDPOINT
is correctly configured without any suffix path, as this can prevent file access. For example:
S3_ENDPOINT=http://192.168.50.114:${MINIO_PORT}
ACL Settings: Check if S3_SET_ACL
is set to public-read
if required by your use case. If your service provider does not support individual ACLs, set S3_SET_ACL
to 0
.
Path Style Access: If using MinIO, ensure S3_ENABLE_PATH_STYLE
is set to 1
to enable path-style access, which is the default for MinIO.
Restart Services: After making changes, restart the services using:
docker compose up -d
Avoid using docker compose restart lobe
as it will not reload the environment variables.
By ensuring these configurations are correct, you should be able to resolve the 403 Forbidden status during the upload process [1][2].
To continue talking to Dosu, mention @dosu.
@dosu 我重新更新了MINIIO的SECRET KEY后,就解决了问题,十分感谢
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
@dosu I solved the problem after updating MINIIO's SECRET KEY. Thank you very much.
✅ @davidelectricfree
This issue is closed, If you have any questions, you can comment and reply.\ 此问题已经关闭。如果您有任何问题,可以留言并回复。
📦 Environment
Docker
📌 Version
1.19.21
💻 Operating System
Other Linux
🌐 Browser
Edge
🐛 Bug Description
目前已配置好MINI和数据库,尝试上传文件丰富资料库,上传文件出现速度,但是当进度条读完后,始终卡在正在上传,打开浏览器的开发者模式,发现上传存在报错,报错代码为: net::ERR_CONNECTION_RESET
然后我的compose 文件如下:
services: network-service: image: alpine:3.20 container_name: lobe-network ports:
lobe-network
postgresql: image: pgvector/pgvector:pg16 container_name: lobe-postgres ports:
lobe-network
minio: image: minio/minio:RELEASE.2024-09-13T20-26-02Z container_name: lobe-minio network_mode: "service:network-service" volumes:
"MINIO_API_CORS_ALLOW_ORIGIN=http://192.168.50.114:${LOBE_PORT}" restart: always command: > server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001"
logto: image: svhd/logto:1.19.0 container_name: lobe-logto network_mode: "service:network-service" depends_on: postgresql: condition: service_healthy environment:
"ADMIN_ENDPOINT=http://192.168.50.114:3002" entrypoint: ["sh", "-c", "npm run cli db seed -- --swe && npm start"]
lobe: image: lobehub/lobe-chat-database:v1.19.21 container_name: lobe-database network_mode: "service:network-service" depends_on: postgresql: condition: service_healthy network-service: condition: service_started minio: condition: service_started logto: condition: service_started
environment:
volumes: data: driver: local s3_data: driver: local
networks: lobe-network: driver: bridge
请大佬帮忙看看是什么原因
📷 Recurrence Steps
No response
🚦 Expected Behavior
No response
📝 Additional Information
No response