Closed AndrewZuo01 closed 4 months ago
fix docker-compose file, add:
version: '3.1'
services:
mysql:
image: mysql:latest
environment:
user: "1000:1000" # 指定非 root 用户的 UID 和 GID
volumes:
my-db:
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
fix docker-compose file, add:
version: '3.1'
services: mysql: image: mysql:latest environment: user: "1000:1000" # Specify the UID and GID of the non-root user
volumes: my-db:
bug i use `user: "1000:100"
smile@smile:/data/workspaces/openim-docker$ docker logs openim-chat -f
================> Architecture: x86_64
================> BIN_DIR: /openim/openim-chat/scripts/..//openim/openim-chat/scripts/../_output/bin/platforms/linux/amd64
=======>SCRIPTS_ROOT=/openim/openim-chat/scripts
=======>OPENIM_ROOT=/openim/openim-chat/scripts/..
=======>pwd=/openim/openim-chat/scripts
=======>bin_dir=/openim/openim-chat/scripts/../_output/bin/platforms/linux/amd64
=======>logs_dir=/openim/openim-chat/scripts/../logs
=======>sdk_db_dir=
Generating configuration file...
Configuration file generated.
/openim/openim-chat/scripts/../_output/bin/platforms/linux/amd64/chat-api -port 10008 --config_folder_path /openim/openim-chat/scripts/../config/config.yaml
/openim/openim-chat/scripts/../_output/bin/platforms/linux/amd64/admin-api -port 10009 --config_folder_path /openim/openim-chat/scripts/../config/config.yaml
/openim/openim-chat/scripts/../_output/bin/platforms/linux/amd64/admin-rpc -port 30200 --config_folder_path /openim/openim-chat/scripts/../config/config.yaml
/openim/openim-chat/scripts/../_output/bin/platforms/linux/amd64/chat-rpc -port 30300 --config_folder_path /openim/openim-chat/scripts/../config/config.yaml
# Start Chat check_all.sh 16:14:00, For local deployments, use ./check_all.sh --print-screen
goroutine 1 [running]:
main.main()
github.com/OpenIMSDK/chat/cmd/rpc/chat-rpc/main.go:65 +0x53e
================> Architecture: x86_64
================> BIN_DIR: /openim/openim-chat/scripts/..//openim/openim-chat/scripts/../_output/bin/platforms/linux/amd64
================> Architecture: x86_64
================> BIN_DIR: /openim/openim-chat/scripts/..//openim/openim-chat/scripts/../_output/bin/platforms/linux/amd64
10008 port has been listening, belongs service is openImChatApiPort
openImAdminApiPort service does not start normally, not initiated port is 30200
please check /openim/openim-chat/scripts/../logs/openIM.log
10008 port has been listening, belongs service is openImChatApiPort
openImAdminApiPort service does not start normally, not initiated port is 30200
please check /openim/openim-chat/scripts/../logs/openIM.log
^C
Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details.
[GIN-debug] Listening and serving HTTP on :10009
2024/01/03 16:13:13 github.com/OpenIMSDK/chat/pkg/common/dbconn/gorm.go:37
[error] failed to initialize database, got error dial tcp 172.28.0.1:13306: connect: connection refused
2024/01/03 16:13:14 github.com/OpenIMSDK/chat/pkg/common/dbconn/gorm.go:37
[error] failed to initialize database, got error dial tcp 172.28.0.1:13306: connect: connection refused
2024/01/03 16:13:43 github.com/OpenIMSDK/chat/pkg/common/dbconn/gorm.go:40
[error] failed to initialize database, got error dial tcp 172.28.0.1:13306: connect: connection refused
panic: failed to open initial database connection with DSN root1:openIM123@tcp(172.28.0.1:13306)/mysql?charset=utf8mb4&parseTime=true&loc=Local: dial tcp 172.28.0.1:13306: connect: connection refused
goroutine 1 [running]:
main.main()
github.com/OpenIMSDK/chat/cmd/rpc/admin-rpc/main.go:69 +0x59e
2024/01/03 16:13:44 github.com/OpenIMSDK/chat/pkg/common/dbconn/gorm.go:40
[error] failed to initialize database, got error dial tcp 172.28.0.1:13306: connect: connection refused
panic: failed to open initial database connection with DSN root1:openIM123@tcp(172.28.0.1:13306)/mysql?charset=utf8mb4&parseTime=true&loc=Local: dial tcp 172.28.0.1:13306: connect: connection refused
goroutine 1 [running]:
main.main()
github.com/OpenIMSDK/chat/cmd/rpc/chat-rpc/main.go:65 +0x53e
================> Architecture: x86_64
================> BIN_DIR: /openim/openim-chat/scripts/..//openim/openim-chat/scripts/../_output/bin/platforms/linux/amd64
================> Architecture: x86_64
================> BIN_DIR: /openim/openim-chat/scripts/..//openim/openim-chat/scripts/../_output/bin/platforms/linux/amd64
10008 port has been listening, belongs service is openImChatApiPort
openImAdminApiPort service does not start normally, not initiated port is 30200
please check /openim/openim-chat/scripts/../logs/openIM.log
10008 port has been listening, belongs service is openImChatApiPort
openImAdminApiPort service does not start normally, not initiated port is 30200
please check /openim/openim-chat/scripts/../logs/openIM.log
================> Architecture: x86_64
================> BIN_DIR: /openim/openim-chat/scripts/..//openim/openim-chat/scripts/../_output/bin/platforms/linux/amd64
10008 port has been listening, belongs service is openImChatApiPort
openImAdminApiPort service does not start normally, not initiated port is 30200
please check /openim/openim-chat/scripts/../logs/openIM.log
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
The Docker deployment plan has been fully upgraded. Please refer to the README for the new scheme. The new scheme is simpler to use and supports Linux, Windows, and Mac.
What happened?
I change the user name in .env file, then when I register user it has error
What did you expect to happen?
it shouldn't have error
How can we reproduce it (as minimally and precisely as possible)?
change the user name root to root1 in .env file, then register user at port 11001
Anything else we need to know?
No response
version
Cloud provider
OS version
Install tools