Open anyejunwang1 opened 1 week ago
看下scdb的运行日志:docker logs scdb-container
运行日志重复显示如下两段信息,难道root用户还有密码吗,但是也没有任何输入密码的框架呀。另外,我使用的是windows电脑的docker,在git bash命令行中运行的。 wxp@LAPTOP-VL7ROF3P MINGW64 /d/wxp/research/scql (main) $ docker logs scdb-tutorial-scdb-1 2024-11-18 17:06:03.11185 INFO main.go:92 Starting to read config file: /home/admin/configs/config.yml 2024-11-18 17:06:03.11185 INFO main.go:110 Starting to connect to database and do bootstrap if necessary... 2024-11-18 17:06:03.11185 INFO logger.go:148 /root/project/pkg/scdb/server/server.go:119 [error] failed to initialize database, got error dial tcp 172.18.0.4:3306: connect: connection refused 2024-11-18 17:06:03.11185 FATAL main.go:114 Failed to connect to database and bootstrap it: dial tcp 172.18.0.4:3306: connect: connection refused 2024-11-18 17:06:19.11185 INFO main.go:132 Starting to serve request with http... 2024-11-18 17:47:40.11185 WARNING server.go:164 |GIN|status=404|method=GET|path=/|ip=172.18.0.1|latency=1.926366ms| 2024-11-18 17:47:40.11185 WARNING server.go:164 |GIN|status=404|method=GET|path=/favicon.ico|ip=172.18.0.1|latency=11.715µs| 2024-11-18 17:47:47.11185 WARNING server.go:164 |GIN|status=404|method=GET|path=/|ip=172.18.0.1|latency=9.591µs| 2024-11-18 17:47:48.11185 WARNING server.go:164 |GIN|status=404|method=GET|path=/|ip=172.18.0.1|latency=12.571µs| 2024-11-18 17:47:48.11185 WARNING server.go:164 |GIN|status=404|method=GET|path=/|ip=172.18.0.1|latency=13.702µs| 2024-11-18 17:47:48.11185 WARNING server.go:164 |GIN|status=404|method=GET|path=/|ip=172.18.0.1|latency=8.953µs| 2024-11-19 15:30:20.11193 INFO main.go:92 Starting to read config file: /home/admin/configs/config.yml 2024-11-19 15:30:20.11193 INFO main.go:110 Starting to connect to database and do bootstrap if necessary... 2024-11-19 15:30:21.11193 INFO logger.go:148 /root/project/pkg/scdb/server/server.go:119 [error] failed to initialize database, got error dial tcp 172.18.0.2:3306: connect: connection refused 2024-11-19 15:30:21.11193 FATAL main.go:114 Failed to connect to database and bootstrap it: dial tcp 172.18.0.2:3306: connect: connection refused 2024-11-19 15:30:23.11193 INFO main.go:92 Starting to read config file: /home/admin/configs/config.yml 2024-11-19 15:30:23.11193 INFO main.go:110 Starting to connect to database and do bootstrap if necessary... 2024-11-19 15:30:23.11193 INFO logger.go:148 /root/project/pkg/scdb/server/server.go:119 [error] failed to initialize database, got error Error 1045: Access denied for user 'root'@'172.18.0.3' (using password: YES) 2024-11-19 15:30:23.11193 FATAL main.go:114 Failed to connect to database and bootstrap it: Error 1045: Access denied for user 'root'@'172.18.0.3' (using password: YES)
我删除了镜像重新部署然后查看日志,目前日志显示这样的内容: wxp@LAPTOP-VL7ROF3P MINGW64 /d/wxp/research/scql (main) $ docker logs scdb-tutorial-scdb-1 2024-11-19 17:15:44.11195 INFO main.go:92 Starting to read config file: /home/admin/configs/config.yml 2024-11-19 17:15:44.11195 INFO main.go:110 Starting to connect to database and do bootstrap if necessary... 2024-11-19 17:15:44.11195 INFO logger.go:148 /root/project/pkg/scdb/server/server.go:119 [error] failed to initialize database, got error dial tcp 172.18.0.2:3306: connect: connection refused 2024-11-19 17:15:44.11195 FATAL main.go:114 Failed to connect to database and bootstrap it: dial tcp 172.18.0.2:3306: connect: connection refused 2024-11-19 17:15:45.11195 INFO main.go:92 Starting to read config file: /home/admin/configs/config.yml 2024-11-19 17:15:45.11195 INFO main.go:110 Starting to connect to database and do bootstrap if necessary... 2024-11-19 17:15:45.11195 INFO logger.go:148 /root/project/pkg/scdb/server/server.go:119 [error] failed to initialize database, got error dial tcp 172.18.0.2:3306: connect: connection refused 2024-11-19 17:15:45.11195 FATAL main.go:114 Failed to connect to database and bootstrap it: dial tcp 172.18.0.2:3306: connect: connection refused 2024-11-19 17:15:46.11195 INFO main.go:92 Starting to read config file: /home/admin/configs/config.yml 2024-11-19 17:15:46.11195 INFO main.go:110 Starting to connect to database and do bootstrap if necessary... 2024-11-19 17:15:46.11195 INFO logger.go:148 /root/project/pkg/scdb/server/server.go:119 [error] failed to initialize database, got error dial tcp 172.18.0.2:3306: connect: connection refused 2024-11-19 17:15:46.11195 FATAL main.go:114 Failed to connect to database and bootstrap it: dial tcp 172.18.0.2:3306: connect: connection refused 2024-11-19 17:15:47.11195 INFO main.go:92 Starting to read config file: /home/admin/configs/config.yml 2024-11-19 17:15:47.11195 INFO main.go:110 Starting to connect to database and do bootstrap if necessary... 2024-11-19 17:15:47.11195 INFO logger.go:148 /root/project/pkg/scdb/server/server.go:119 [error] failed to initialize database, got error dial tcp 172.18.0.2:3306: connect: connection refused 2024-11-19 17:15:47.11195 FATAL main.go:114 Failed to connect to database and bootstrap it: dial tcp 172.18.0.2:3306: connect: connection refused 2024-11-19 17:15:48.11195 INFO main.go:92 Starting to read config file: /home/admin/configs/config.yml 2024-11-19 17:15:48.11195 INFO main.go:110 Starting to connect to database and do bootstrap if necessary... 2024-11-19 17:15:48.11195 INFO logger.go:148 /root/project/pkg/scdb/server/server.go:119 [error] failed to initialize database, got error dial tcp 172.18.0.2:3306: connect: connection refused 2024-11-19 17:15:48.11195 FATAL main.go:114 Failed to connect to database and bootstrap it: dial tcp 172.18.0.2:3306: connect: connection refused 2024-11-19 17:15:50.11195 INFO main.go:92 Starting to read config file: /home/admin/configs/config.yml 2024-11-19 17:15:50.11195 INFO main.go:110 Starting to connect to database and do bootstrap if necessary... 2024-11-19 17:15:50.11195 INFO logger.go:148 /root/project/pkg/scdb/server/server.go:119 [error] failed to initialize database, got error dial tcp 172.18.0.2:3306: connect: connection refused 2024-11-19 17:15:50.11195 FATAL main.go:114 Failed to connect to database and bootstrap it: dial tcp 172.18.0.2:3306: connect: connection refused 2024-11-19 17:15:54.11195 INFO main.go:92 Starting to read config file: /home/admin/configs/config.yml 2024-11-19 17:15:54.11195 INFO main.go:110 Starting to connect to database and do bootstrap if necessary... 2024-11-19 17:15:54.11195 INFO logger.go:148 /root/project/pkg/scdb/server/server.go:119 [error] failed to initialize database, got error dial tcp 172.18.0.2:3306: connect: connection refused 2024-11-19 17:15:54.11195 FATAL main.go:114 Failed to connect to database and bootstrap it: dial tcp 172.18.0.2:3306: connect: connection refused 2024-11-19 17:16:00.11195 INFO main.go:92 Starting to read config file: /home/admin/configs/config.yml 2024-11-19 17:16:00.11195 INFO main.go:110 Starting to connect to database and do bootstrap if necessary... 2024-11-19 17:16:00.11195 INFO main.go:132 Starting to serve request with http...
从Starting to serve request with http...
来看scdb启动是正常的,可以尝试重新运行下;如果仍然无法正常执行,可以贴下实时的scdb日志信息;
root用户的密码是在初始化scdb容器时设置的,可以参考scdb_init.sql,另外我们推荐在Linux环境中部署使用;
Issue Type
Others
Have you searched for existing issues?
Yes
Link to Relevant Documentation
No response
Question Details