com.mysql.jdbc.exceptions.jdbc4.CommunicationsException

tip

Check if your MongoDB is available.


rp
tip

host port isnt set

tip

To restart the Selenium Webdriver mock browser in a testcase, first use 'driver.close()' and then reinstantiate the driver.

tip

Firewall might be blocking your connection, or MySQL it's not running on your server machine.


rafael
tip

Check if you have started your server, or if your server is set to listen to the port you're trying to connect and is waiting to accept connections and check if the firewall isn't blocking your connection.


rafael
tip

Check if ip adress is correct, if the port is correct, and if the server is up and running and waiting for connections. Also, check if there's no firewall blocking you and if your internet connection is working.


rafael
tip

spring-data-redis requires redis 2.6+ to work properly.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • CentOs 7 - Java SQL error
    via Stack Overflow by Menno van Hout
    ,
  • GitHub comment 474#197864188
    via GitHub by neocite
    ,
  • JDBC + MYSQL Communications link failure
    via by Unknown author,
  • JDBC - cannot connect with a localhost
    via by Unknown author,
  • Remote Database
    via Stack Overflow by master
    ,
  • Communications link failure
    via Stack Overflow by RoboticR
    ,
  • Error Using JPA to Connect to MySQL
    via Stack Overflow by Vimzy
    ,
    • 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:404) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:983) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:339) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2252) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2285) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2084) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:795) 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:404) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:327) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at com.huskehhh.mysql.mysql.MySQL.openConnection(MySQL.java:76) at me.spigot.UGxSynteX.islands.Island.onEnable(Island.java:50) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:292) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) at org.bukkit.craftbukkit.v1_10_R1.CraftServer.loadPlugin(CraftServer.java:362) at org.bukkit.craftbukkit.v1_10_R1.CraftServer.enablePlugins(CraftServer.java:322) at net.minecraft.server.v1_10_R1.MinecraftServer.t(MinecraftServer.java:412) at net.minecraft.server.v1_10_R1.MinecraftServer.l(MinecraftServer.java:377) at net.minecraft.server.v1_10_R1.MinecraftServer.a(MinecraftServer.java:332) at net.minecraft.server.v1_10_R1.DedicatedServer.init(DedicatedServer.java:271) at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:535) at java.lang.Thread.run(Thread.java:745) Caused by: java.net.ConnectException: Connection timed out 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) ... 27 more

    Users with the same issue

    jf-ast
    1 times, last one,
    Unknown visitor1 times, last one,
    ivanszkypeter
    17 times, last one,
    pulse00
    2 times, last one,
    adrik77
    3 times, last one,
    479 more bugmates