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.

GitHub | cihanzengin | 2 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Re: sqoop import : communication links failure

    sqoop-user | 3 years ago | Wan Razali
    manager.SqlManager: Error executing > statement: 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)
  2. 0

    Re: sqoop import : communication links failure

    sqoop-user | 3 years ago | Wan Razali
    manager.SqlManager: Error executing > statement: 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)
  3. 0

    Re: sqoop import : communication links failure

    sqoop-user | 3 years ago | Wan Razali
    manager.SqlManager: Error executing >> statement: 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)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Re: sqoop import : communication links failure

    sqoop-user | 3 years ago | Wan Razali
    manager.SqlManager: Error executing >> statement: 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)
  6. 0

    Cannot connect to mysql server with jdbc

    Stack Overflow | 5 years ago | Timnit Gebru
    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.

  1. michallos 1 times, last 4 months ago
  2. linxiaolong 18 times, last 4 months ago
  3. QrCeric 17 times, last 1 day ago
  4. andyglick 56 times, last 2 months ago
  5. tomthomas 1 times, last 2 months ago
27 more registered users
65 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.ConnectException

    Connection refused (Connection refused)

    at java.net.PlainSocketImpl.socketConnect()
  2. Java RT
    Socket.<init>
    1. java.net.PlainSocketImpl.socketConnect(Native Method)
    2. java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    3. java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    4. java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    5. java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    6. java.net.Socket.connect(Socket.java:589)
    7. java.net.Socket.connect(Socket.java:538)
    8. java.net.Socket.<init>(Socket.java:434)
    9. java.net.Socket.<init>(Socket.java:244)
    9 frames
  3. MySQL jdbc
    JDBC4Connection.<init>
    1. com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)
    2. com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:308)
    3. com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2498)
    4. com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2535)
    5. com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2320)
    6. com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:834)
    7. com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
    7 frames
  4. Java RT
    Constructor.newInstance
    1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    4. java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    4 frames
  5. Springloaded
    ReflectiveInterceptor.jlrConstructorNewInstance
    1. org.springsource.loaded.ri.ReflectiveInterceptor.jlrConstructorNewInstance(ReflectiveInterceptor.java:1075)
    1 frame
  6. MySQL jdbc
    NonRegisteringDriver.connect
    1. com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
    2. com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416)
    3. com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:347)
    3 frames
  7. org.apache.tomcat
    DataSourceProxy.getConnection
    1. org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:310)
    2. org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:203)
    3. org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:718)
    4. org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:650)
    5. org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:468)
    6. org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:143)
    7. org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)
    8. org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107)
    9. org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:131)
    9 frames
  8. Spring Framework
    LazyConnectionDataSourceProxy$LazyConnectionInvocationHandler.invoke
    1. org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy$LazyConnectionInvocationHandler.getTargetConnection(LazyConnectionDataSourceProxy.java:403)
    2. org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy$LazyConnectionInvocationHandler.invoke(LazyConnectionDataSourceProxy.java:376)
    2 frames
  9. com.sun.proxy
    $Proxy83.getMetaData
    1. com.sun.proxy.$Proxy83.getMetaData(Unknown Source)
    1 frame
  10. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:498)
    4 frames
  11. Springloaded
    ReflectiveInterceptor.jlrMethodInvoke
    1. org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1426)
    1 frame
  12. Spring Framework
    TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke
    1. org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke(TransactionAwareDataSourceProxy.java:240)
    1 frame
  13. com.sun.proxy
    $Proxy83.getMetaData
    1. com.sun.proxy.$Proxy83.getMetaData(Unknown Source)
    1 frame
  14. org.hibernate.engine
    JdbcEnvironmentInitiator.initiateService
    1. org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:70)
    2. org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
    2 frames
  15. org.hibernate.boot
    StandardServiceRegistryImpl.initiateService
    1. org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88)
    1 frame
  16. Hibernate
    JdbcServicesImpl.configure
    1. org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:254)
    2. org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:228)
    3. org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:207)
    4. org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51)
    4 frames
  17. org.hibernate.boot
    StandardServiceRegistryImpl.configureService
    1. org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94)
    1 frame
  18. Hibernate
    AbstractServiceRegistryImpl.getService
    1. org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
    2. org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:207)
    2 frames
  19. org.hibernate.boot
    MetadataBuilderImpl.build
    1. org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:352)
    2. org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:111)
    3. org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:83)
    4. org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:418)
    5. org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:87)
    5 frames
  20. Hibernate
    Configuration.buildSessionFactory
    1. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:692)
    1 frame
  21. Grails GORM
    HibernateMappingContextConfiguration.buildSessionFactory
    1. org.grails.orm.hibernate.cfg.HibernateMappingContextConfiguration.buildSessionFactory(HibernateMappingContextConfiguration.java:259)
    1 frame
  22. org.grails.orm
    AbstractHibernateConnectionSourceFactory.create
    1. org.grails.orm.hibernate.connections.HibernateConnectionSourceFactory.create(HibernateConnectionSourceFactory.java:80)
    2. org.grails.orm.hibernate.connections.AbstractHibernateConnectionSourceFactory.create(AbstractHibernateConnectionSourceFactory.java:38)
    3. org.grails.orm.hibernate.connections.AbstractHibernateConnectionSourceFactory.create(AbstractHibernateConnectionSourceFactory.java:22)
    3 frames
  23. org.grails.datastore
    ConnectionSourcesInitializer.create
    1. org.grails.datastore.mapping.core.connections.AbstractConnectionSourceFactory.create(AbstractConnectionSourceFactory.java:64)
    2. org.grails.datastore.mapping.core.connections.AbstractConnectionSourceFactory.create(AbstractConnectionSourceFactory.java:52)
    3. org.grails.datastore.mapping.core.connections.ConnectionSourcesInitializer.create(ConnectionSourcesInitializer.groovy:24)
    3 frames
  24. Grails GORM
    HibernateDatastore.<init>
    1. org.grails.orm.hibernate.HibernateDatastore.<init>(HibernateDatastore.java:206)
    1 frame
  25. Java RT
    Constructor.newInstance
    1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    4. java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    4 frames
  26. Springloaded
    ReflectiveInterceptor.jlrConstructorNewInstance
    1. org.springsource.loaded.ri.ReflectiveInterceptor.jlrConstructorNewInstance(ReflectiveInterceptor.java:1075)
    1 frame
  27. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)
    2. org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:122)
    3. org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:271)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1148)
    5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1050)
    6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
    7. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    8. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    9. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    10. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    11. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    12. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
    13. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
    14. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1486)
    15. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1231)
    16. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
    17. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    18. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    19. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    20. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    21. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    22. org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:207)
    23. org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1289)
    24. org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1258)
    25. org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1144)
    26. org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1089)
    27. org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1059)
    28. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:663)
    29. org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    30. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:370)
    31. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1219)
    32. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
    33. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    34. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    35. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    36. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    37. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    38. org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:207)
    39. org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1131)
    40. org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1059)
    41. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:663)
    42. org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    43. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:370)
    44. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1219)
    45. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
    46. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    47. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:299)
    48. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:129)
    49. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1486)
    50. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1231)
    51. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
    52. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    53. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    54. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    55. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    56. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    56 frames
  28. org.springframework.boot
    ServletContextInitializerBeans.<init>
    1. org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:234)
    2. org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:215)
    3. org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:91)
    4. org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:79)
    4 frames
  29. Spring Boot
    TomcatStarter.onStartup
    1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getServletContextInitializerBeans(EmbeddedWebApplicationContext.java:241)
    2. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.selfInitialize(EmbeddedWebApplicationContext.java:228)
    3. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.access$000(EmbeddedWebApplicationContext.java:89)
    4. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:213)
    5. org.springframework.boot.context.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:55)
    5 frames
  30. Glassfish Core
    ContainerBase$StartChild.call
    1. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5178)
    2. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    3. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
    4. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
    4 frames
  31. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
    2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    4. java.lang.Thread.run(Thread.java:745)
    4 frames