coze-dev / coze-dev/coze-studio
coze-server启动失败,由于我本机docker 已经安装了mysql redis,es,minio,改了 docker-compose.yml ,安装失败,
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 21.6k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
unexpected EOF
goroutine 1 [running]:
main.main()
/app/main.go:60 +0x99
2025/08/13 04:03:18.319613 main.go:117: [Info] load env file: .env
2025/08/13 04:03:18.319978 main.go:138: [Info] log level: debug
2025/08/13 04:03:18.500519 milvus_manager.go:62: [Warn] [NewManager] milvus embedding not support sparse, so hybrid search is disabled.
2025/08/13 04:03:18.500589 init.go:111: [Warn] [ve_ocr] ak / sk not configured, ocr might not work well
2025/08/13 04:03:18 INF 4 [opencoze_knowledge/cg_knowledge] (nsqlookupd:4161) connecting to nsqd
panic: InitializeInfra failed, err=Init - initPrimaryServices failed, err: register knowledge consumer failed, err=connect to nsqd failed, err=failed to IDENTIFY - read tcp 172.18.0.12:59266->172.18.0.8:4161: read: connection reset by peer
配置文件下面
name: coze-studio
x-env-file: &env_file
- .env
services:
etcd:
image: bitnami/etcd:3.5
container_name: coze-etcd
user: root
restart: always
privileged: true
env_file: *env_file
environment:
- ETCD_AUTO_COMPACTION_MODE=revision
- ETCD_AUTO_COMPACTION_RETENTION=1000
- ETCD_QUOTA_BACKEND_BYTES=4294967296
- ALLOW_NONE_AUTHENTICATION=yes
ports:
- 2379:2379
- 2380:2380
volumes:
- ./data/bitnami/etcd:/bitnami/etcd:rw,Z
- ./volumes/etcd/etcd.conf.yml:/opt/bitnami/etcd/conf/etcd.conf.yml:ro,Z
command: >
bash -c "
/opt/bitnami/scripts/etcd/setup.sh
chown -R etcd:etcd /bitnami/etcd
chmod g+s /bitnami/etcd
exec /opt/bitnami/scripts/etcd/entrypoint.sh /opt/bitnami/scripts/etcd/run.sh
"
healthcheck:
test: ['CMD', 'etcdctl', 'endpoint', 'health']
interval: 5s
timeout: 10s
retries: 10
start_period: 10s
networks:
- docker_ragflow
milvus:
container_name: coze-milvus
image: milvusdb/milvus:v2.5.10
user: root
privileged: true
restart: always
env_file: *env_file
command: >
bash -c "
chown -R root:root /var/lib/milvus
chmod g+s /var/lib/milvus
exec milvus run standalone
"
security_opt:
- seccomp:unconfined
environment:
ETCD_ENDPOINTS: etcd:2379
MINIO_ADDRESS: ragflow-minio:9000 # 对应您的MinIO容器名
MINIO_BUCKET_NAME: ${MINIO_BUCKET:-milvus}
MINIO_ACCESS_KEY_ID: rag_flow
MINIO_SECRET_ACCESS_KEY: infini_rag_flow
MINIO_USE_SSL: false
LOG_LEVEL: debug
volumes:
- ./data/milvus:/var/lib/milvus:rw,Z
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9091/healthz']
interval: 5s
timeout: 10s
retries: 10
start_period: 10s
ports:
- '19530'
- '9091'
depends_on:
etcd:
condition: service_healthy
networks:
- docker_ragflow
nsqlookupd:
image: nsqio/nsq:v1.2.1
container_name: coze-nsqlookupd
command: /nsqlookupd
restart: always
ports:
- '4160'
- '4161'
networks:
- docker_ragflow
healthcheck:
test: ['CMD-SHELL', 'nsqlookupd --version']
interval: 5s
timeout: 10s
retries: 10
start_period: 10s
nsqd:
image: nsqio/nsq:v1.2.1
container_name: coze-nsqd
command: /nsqd --lookupd-tcp-address=nsqlookupd:4160 --broadcast-address=nsqd
restart: always
ports:
- '4150'
- '4151'
depends_on:
nsqlookupd:
condition: service_healthy
networks:
- docker_ragflow
healthcheck:
test: ['CMD-SHELL', '/nsqd --version']
interval: 5s
timeout: 10s
retries: 10
start_period: 10s
nsqadmin:
image: nsqio/nsq:v1.2.1
container_name: coze-nsqadmin
command: /nsqadmin --lookupd-http-address=nsqlookupd:4161
restart: always
ports:
- '4171'
depends_on:
nsqlookupd:
condition: service_healthy
networks:
- docker_ragflow
coze-server:
image: opencoze/opencoze:latest
restart: always
container_name: coze-server
env_file: *env_file
environment:
# MySQL 配置(对应容器名 ragflow-mysql)
MYSQL_HOST: ragflow-mysql
MYSQL_PORT: 3306
MYSQL_USER: root
MYSQL_PASSWORD: infini_rag_flow
MYSQL_DATABASE: opencoze # 确保已在您的MySQL中创建该数据库
# Redis 配置(对应容器名 ragflow-redis)
REDIS_ADDR: ragflow-redis:6379
REDIS_PASSWORD: infini_rag_flow
# Elasticsearch 配置(对应容器名 ragflow-es-01)
ES_ADDR: http://ragflow-es-01:9200
ES_USERNAME: elastic
ES_PASSWORD: infini_rag_flow
ES_VERSION: "v8"
# MinIO 配置(对应容器名 ragflow-minio)
MINIO_ENDPOINT: ragflow-minio:9000
MINIO_AK: rag_flow
MINIO_SK: infini_rag_flow
STORAGE_BUCKET: opencoze # 确保已在您的MinIO中创建该桶
MINIO_USE_SSL: false
# 其他必要配置
MILVUS_ADDR: milvus:19530
MQ_NAME_SERVER: "nsqlookupd:4161"
LISTEN_ADDR: 0.0.0.0:8888
networks:
- docker_ragflow
ports:
- '8888'
- '8889:8889'
volumes:
- .env:/app/.env
- ../backend/conf:/app/resources/conf
depends_on:
milvus:
condition: service_healthy
nsqd:
condition: service_healthy
command: ['/app/opencoze']
coze-web:
image: opencoze/web:latest
container_name: coze-web
restart: always
ports:
- "8888:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- coze-server
networks:
- docker_ragflow
networks:
docker_ragflow:
external: true # 使用您现有的外部网络
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the posted docker-compose.yml and the startup log around /app/main.go:60 and /app/main.go:117, then inspect the .env and the external docker_ragflow network configuration. Reproduce the failure and verify that coze-server starts successfully and the NSQ knowledge consumer connects without the connection-reset error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, elasticsearch, go, mysql, redis
- Domain
- databases, devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100