我在Windows上,使用linux容器。我正在尝试使用来自docker hub的opengts-devel
docker image。如果我
按照它的页面上的说明我得到与MySQL相关的错误
/usr/local/java/bin/java -Xmx300m -Dfile.encoding=UTF-8 -classpath '/usr/local/gts/build/lib/gtsdb.jar:/usr/local/gts/build/lib/gtsutils.jar:/usr/local/gts/build/lib/dmtpserv.jar' org.opengts.db.DBConfig -conf=/usr/local/gts/default.conf -log.file.enable=false -initTables -rootPass=
Version: 2.6.5
[WARN_|DBConnection.parseCommunicationsException:290] SQL(CommunicationsException) close/retry [0]: Connection Age 0 ms
[ERROR|DBAdmin.execCommands:1006] SQLException message: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
[ERROR|DBAdmin.execCommands:1007] ==> SQLException: DB create error [jdbc:mysql://:3306/]
[ERROR|DBAdmin.execCommands:1007] Message: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
[ERROR|DBAdmin.execCommands:1007] SQLState: 08S01
[ERROR|DBAdmin.execCommands:1007] ErrorCode: 0
[DBAdmin.execCommands:1007] com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:990)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:341)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2186)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2219)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2014)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:776)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:386)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.opengts.dbtools.DBConnection.getConnection(DBConnection.java:809)
at org.opengts.dbtools.DBConnection.createStatement(DBConnection.java:945)
at org.opengts.dbtools.DBConnection.createStatement(DBConnection.java:933)
at org.opengts.dbtools.DBConnection._executeUpdate(DBConnection.java:1188)
at org.opengts.dbtools.DBConnection.executeUpdate(DBConnection.java:1161)
at org.opengts.dbtools.DBConnection.executeUpdate(DBConnection.java:1124)
at org.opengts.dbtools.DBProvider.createDatabase(DBProvider.java:1702)
at org.opengts.dbtools.DBAdmin.execCommands(DBAdmin.java:995)
at org.opengts.db.DBConfig._main(DBConfig.java:2030)
at org.opengts.db.DBConfig.main(DBConfig.java:2174)
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:211)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:300)
... 24 more
Version: 2.6.5
[ERROR|DBAdmin.execCommands:1058] ==> SQLException: Connection error [jdbc:mysql://:3306/gts?characterEncoding=UTF-8&useUnicode=true&characterSetResults=utf8]
这似乎是包含MySQL以及Web应用程序的单个容器映像。是否需要更改才能使其正常工作?