Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker部署,怎么初始化? #153

Open
Gitman-sys opened this issue Jul 30, 2023 · 3 comments
Open

docker部署,怎么初始化? #153

Gitman-sys opened this issue Jul 30, 2023 · 3 comments

Comments

@Gitman-sys
Copy link

wiki和网站上的docker-compose.yml 不一致。哪个是正确的?
另外,试了几个版本都是能打开页面,不能登录。显示没有用户名。
进入数据库docker下能正确看到数据库表,但是表的内容为空,所以显示没有用户名。
应该是缺少初始化用户,该如何操作?

@Gitman-sys
Copy link
Author

删除所有的image后,
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker rmi -f $(docker images -qa)
用下面的docker-compose.yml 重新安装成功了。

https://github.com/talkincode/toughradius/blob/main/docker-compose.yml

docker-compose up -d

然后用admin/toughradius
登录了。

@charlescui
Copy link

依然不行,官网上肯定不对,git代码中的compose文件运行后,报错如下:

toughradius  | 2024-01-02 05:37:24.030 ERROR 1 --- [eate-1465346452] com.alibaba.druid.pool.DruidDataSource   : create connection SQLException, url: jdbc:mysql://127.0.0.1:3306/toughradius?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true, errorCode 0, state 08S01
toughradius  |
toughradius  | com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
toughradius  |
toughradius  | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
toughradius  | 	at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
toughradius  | 	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
toughradius  | 	at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:835)
toughradius  | 	at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:455)
toughradius  | 	at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240)
toughradius  | 	at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:207)
toughradius  | 	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1513)
toughradius  | 	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1578)
toughradius  | 	at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2466)
toughradius  | Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
toughradius  |
toughradius  | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
toughradius  | 	at sun.reflect.GeneratedConstructorAccessor64.newInstance(Unknown Source)
toughradius  | 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
toughradius  | 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
toughradius  | 	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
toughradius  | 	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
toughradius  | 	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
toughradius  | 	at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
toughradius  | 	at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:91)
toughradius  | 	at com.mysql.cj.NativeSession.connect(NativeSession.java:152)
toughradius  | 	at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:955)
toughradius  | 	at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:825)
toughradius  | 	... 6 common frames omitted
toughradius  | Caused by: java.net.ConnectException: Connection refused (Connection refused)
toughradius  | 	at java.net.PlainSocketImpl.socketConnect(Native Method)
toughradius  | 	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
toughradius  | 	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
toughradius  | 	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
toughradius  | 	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
toughradius  | 	at java.net.Socket.connect(Socket.java:607)
toughradius  | 	at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:155)
toughradius  | 	at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:65)
toughradius  | 	... 9 common frames omitted
toughradius  |

@chenlei9907
Copy link

和 [charlescui] 一样的错误。

toughradius | 2024-06-20 11:38:03.235 ERROR 1 --- [eate-1664598529] com.alibaba.druid.pool.DruidDataSource : create connection SQLException, url: jdbc:mysql://127.0.0.1:3306/toughradius?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true, errorCode 0, state 08S01

为啥配置了PG ,但是docker 却连接3306 MySQL去了 ? 不解

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants