mysql数据迁移到es,使用logstash

作者 huangxian | 发布于2018年10月17日 | 阅读数:174

[2018-10-16T22:34:01,249][ERROR][logstash.inputs.jdbc ] Unable to connect to database. Tried 1 times {:error_message=>"Java::ComMysqlJdbcExceptionsJdbc4::CommunicationsException: Communications link failure\n\nThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server."}
{ 2010 rufus-scheduler intercepted an error:
2010 job:
2010 Rufus::Scheduler::CronJob "* * * * *" {}
2010 error:
2010 2010
2010 Sequel::DatabaseConnectionError
2010 Java::ComMysqlJdbcExceptionsJdbc4::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.
2010 java.lang.reflect.Constructor.newInstance(java/lang/reflect/Constructor.java:423)
2010 com.mysql.jdbc.Util.handleNewInstance(com/mysql/jdbc/Util.java:404)
2010 com.mysql.jdbc.SQLError.createCommunicationsException(com/mysql/jdbc/SQLError.java:988)
2010 com.mysql.jdbc.MysqlIO.<init>(com/mysql/jdbc/MysqlIO.java:341)
2010 com.mysql.jdbc.ConnectionImpl.coreConnect(com/mysql/jdbc/ConnectionImpl.java:2251)
2010 com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(com/mysql/jdbc/ConnectionImpl.java:2284)
2010 com.mysql.jdbc.ConnectionImpl.createNewIO(com/mysql/jdbc/ConnectionImpl.java:2083)
2010 com.mysql.jdbc.ConnectionImpl.<init>(com/mysql/jdbc/ConnectionImpl.java:806)
2010 com.mysql.jdbc.JDBC4Connection.<init>(com/mysql/jdbc/JDBC4Connection.java:47)
2010 java.lang.reflect.Constructor.newInstance(java/lang/reflect/Constructor.java:423)
2010 com.mysql.jdbc.Util.handleNewInstance(com/mysql/jdbc/Util.java:404)
2010 com.mysql.jdbc.ConnectionImpl.getInstance(com/mysql/jdbc/ConnectionImpl.java:410)
2010 com.mysql.jdbc.NonRegisteringDriver.connect(com/mysql/jdbc/NonRegisteringDriver.java:328)
2010 java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
2010 org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:423)
已邀请:

rochy - rochy_he@jointsky

赞同来自: huangxian

貌似是数据库连接问题:ERROR][logstash.inputs.jdbc ] Unable to connect to database
请首先检查数据库配置是否有误,在保证正确的情况下你可以参考下面的连接对连接参数进行调整:https://www.cnblogs.com/hafiz/p/5879432.html

要回复问题请先登录注册