Alligatoras
Administrator
- Mar 31, 2016
- 2,570
- 12
- 2,855
- 381
I had an issue with the database too in the past. Try bind ip to: 0.0.0.0 (all)I changed the MySQL settings, and now I get the following error in the logs:
Code:2017-09-23 21:27:37 START_MANAGER JTS3ServerMod 5.5.7 Hosting Edition (28.12.2015) Instance Manager started... 2017-09-23 21:27:37 CONFIG Bot chat command !exec is disabled! 2017-09-23 21:27:37 CONFIG Multi IP Mode disabled! 2017-09-23 21:27:38 LOGGER_SQL_ERROR Critical: Cannot connect to MySQL server for logging! 2017-09-23 21:27:38 JTS3ServerMod 5.5.7 Hosting Edition (28.12.2015): EXCEPTION 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:400) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1038) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:339) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2247) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2280) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2079) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794) at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44) 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:400) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at de.stefan1200.util.MySQLConnect.connect(MySQLConnect.java:55) at de.stefan1200.jts3servermod.MyLogger.initDB(MyLogger.java:49) at de.stefan1200.jts3servermod.MyLogger.<init>(MyLogger.java:33) at de.stefan1200.jts3servermod.InstanceManager.loadConfig(InstanceManager.java:1073) at de.stefan1200.jts3servermod.InstanceManager.<init>(InstanceManager.java:155) at de.stefan1200.jts3servermod.JTS3ServerMod.main(JTS3ServerMod.java:249) 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:214) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:298) ... 20 more 2017-09-23 21:27:38 CONFIG MySQL mode enabled! 2017-09-23 21:27:38 MYSQL_ERROR Error while connecting to database: 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. 2017-09-23 21:27:38 JTS3ServerMod 5.5.7 Hosting Edition (28.12.2015): EXCEPTION 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:400) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1038) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:339) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2247) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2280) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2079) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794) at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44) 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:400) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at de.stefan1200.util.MySQLConnect.connect(MySQLConnect.java:55) at de.stefan1200.jts3servermod.InstanceManager.loadInstanceListMySQL(InstanceManager.java:1207) at de.stefan1200.jts3servermod.InstanceManager.loadConfig(InstanceManager.java:1109) at de.stefan1200.jts3servermod.InstanceManager.<init>(InstanceManager.java:155) at de.stefan1200.jts3servermod.JTS3ServerMod.main(JTS3ServerMod.java:249) 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:214) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:298) ... 19 more 2017-09-23 21:27:38 QUIT_MANAGER InstanceManager config file does not exists or is not readable, quitting now...
I noticed the errors that I colored red, but the strange thing is that the database can be connected from both internal and external. Anything I missed in the log?..
Except the database make sure to give the appropriate file permissions - i see there is an error there too. (or the file doesn't exists as it says)