org.pentaho.di.core.exception.KettleDatabaseException: Error occured while trying to connect to the database Error connecting to database: (using class org.gjt.mm.mysql.Driver) 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.


Samebug tips1

Signals that an error occurred while attempting to connect a socket to a remote address and port. Typically, the remote host cannot be reached because of an intervening firewall, or if an intermediate router is down.


7 months ago
Expert tip

Solutions on the web84

Solution icon of web
via pentaho.com by Unknown author, 7 months ago
Error occured while trying to connect to the database Error connecting to database: (using class org.gjt.mm.mysql.Driver) 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.

Solution icon of web
via pentaho.com by Unknown author, 1 year ago
Error occured while trying to connect to the database Error connecting to database: (using class net.sourceforge.jtds.jdbc.Driver) Unknown server host name '10.1.144.11\OOIDATA001'.

Solution icon of pentaho
via Pentaho BI Platform Tracking by Omm, 1 year ago
Error occured while trying to connect to the database Error connecting to database: (using class sun.jdbc.odbc.JdbcOdbcDriver) No data found

Solution icon of pentaho
via Pentaho BI Platform Tracking by Omm, 10 months ago
Error occured while trying to connect to the database Error connecting to database: (using class sun.jdbc.odbc.JdbcOdbcDriver) No data found

Solution icon of pentaho
via Pentaho BI Platform Tracking by mark warner, 1 year ago
Error occured while trying to connect to the database Error connecting to database: (using class sun.jdbc.odbc.JdbcOdbcDriver) [Microsoft][ODBC Driver Manager] Invalid string or buffer length

Solution icon of pentaho
via Pentaho BI Platform Tracking by mark warner, 10 months ago
Error occured while trying to connect to the database Error connecting to database: (using class sun.jdbc.odbc.JdbcOdbcDriver) [Microsoft][ODBC Driver Manager] Invalid string or buffer length

Solution icon of stackoverflow
Error occurred while trying to connect to the database Error connecting to database: (using class org.gjt.mm.mysql.Driver) 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.

Solution icon of pentaho
via Pentaho BI Platform Tracking by Raghavendra J, 10 months ago
Error occured while trying to connect to the database Error connecting to database: (using class org.gjt.mm.mysql.Driver) Unknown database 'fruit_veg'

Solution icon of pentaho
via Pentaho BI Platform Tracking by Raghavendra J, 1 year ago
Error occured while trying to connect to the database Error connecting to database: (using class org.gjt.mm.mysql.Driver) Unknown database 'fruit_veg'

Solution icon of stackoverflow
Error occured while trying to connect to the database Error connecting to database: (using class org.gjt.mm.mysql.Driver) The statement (1) has no open cursor.

Stack trace

org.pentaho.di.core.exception.KettleDatabaseException: Error occured while trying to connect to the database

Error connecting to database: (using class org.gjt.mm.mysql.Driver)

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 org.pentaho.di.core.database.Database.normalConnect(Database.java:374)
	at org.pentaho.di.core.database.Database.connect(Database.java:323)
	at org.pentaho.di.core.database.Database.connect(Database.java:285)
	at org.pentaho.di.core.database.Database.connect(Database.java:275)
	at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:76)
	at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2455)
	at org.pentaho.di.ui.core.database.dialog.DatabaseDialog.test(DatabaseDialog.java:109)
	at org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizardPage2.test(CreateDatabaseWizardPage2.java:157)
	at org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizardPage2$3.widgetSelected(CreateDatabaseWizardPage2.java:146)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
	at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
	at org.eclipse.jface.window.Window.open(Window.java:796)
	at org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizard.createAndRunDatabaseWizard(CreateDatabaseWizard.java:113)
	at org.pentaho.di.ui.spoon.Spoon.createDatabaseWizard(Spoon.java:6611)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:329)
	at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:139)
	at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:123)
	at org.pentaho.ui.xul.swt.tags.SwtMenuitem.access$100(SwtMenuitem.java:27)
	at org.pentaho.ui.xul.swt.tags.SwtMenuitem$1.widgetSelected(SwtMenuitem.java:77)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
	at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
	at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1169)
	at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:6945)
	at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:553)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.pentaho.commons.launcher.Launcher.main(Launcher.java:134)
Caused by: org.pentaho.di.core.exception.KettleDatabaseException: Error connecting to database: (using class org.gjt.mm.mysql.Driver)

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 org.pentaho.di.core.database.Database.connectUsingClass(Database.java:510)
	at org.pentaho.di.core.database.Database.normalConnect(Database.java:358)
	... 39 more
Caused by: 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:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:344)
	at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2333)
	at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2370)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2154)
	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:792)
	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
	at java.sql.DriverManager.getConnection(DriverManager.java:582)
	at java.sql.DriverManager.getConnection(DriverManager.java:185)
	at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:490)
	... 40 more
Caused by: java.net.NoRouteToHostException: No route to host: connect
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
	at java.net.Socket.connect(Socket.java:519)
	at java.net.Socket.connect(Socket.java:469)
	at java.net.Socket.<init>(Socket.java:366)
	at java.net.Socket.<init>(Socket.java:209)
	at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:257)
	at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:294)
	... 55 more

Write tip

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

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
15 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
3 times, 5 days ago
20 more bugmates