高峰只对攀登它而不是仰望它的人来说才有真正意义。

logstash jdbc导入mysql报错

Logstash | 作者 mesee | 发布于2017年11月17日 | 阅读数:8262

我的logstash配置文件:

无标题.png

 
但启动logstash报错:
[2017-11-17T14:39:00,273][WARN ][logstash.inputs.jdbc     ] Failed test_connection.
[2017-11-17T14:39:00,274][WARN ][logstash.inputs.jdbc     ] Exception when executing JDBC query {:exception=>#<Sequel::DatabaseConnectionError: 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.>}
[2017-11-17T14:39:00,274][WARN ][logstash.inputs.jdbc     ] Attempt reconnection.
[2017-11-17T14:39:00,287][WARN ][logstash.inputs.jdbc     ] Failed test_connection
 
实在找不出是什么原因,请大神给指点下
已邀请:

wyntergreg

赞同来自:

jdbc_connection_string里的库名写对了么

Marquezzzz

赞同来自:

logstash所在的server,可以telnet上mysql的3306端口么?

NovemberRain_Jack

赞同来自:

这是在logstash和mysql通讯时出的错。
我记得useUnicode=true    而不是useUnicode=yes

要回复问题请先登录注册