toughradius icon indicating copy to clipboard operation
toughradius copied to clipboard

docker部署,怎么初始化?

Open Gitman-sys opened this issue 1 year ago • 3 comments

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

Gitman-sys avatar Jul 30 '23 13:07 Gitman-sys

删除所有的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 登录了。

Gitman-sys avatar Jul 31 '23 01:07 Gitman-sys

依然不行,官网上肯定不对,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  |

charlescui avatar Jan 02 '24 05:01 charlescui

和 [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去了 ? 不解

chenlei9907 avatar Jun 20 '24 11:06 chenlei9907