2

How can I solve this error in logstash run?

Multiple multi-tables succeeded before xpack functionality was set.

But the moment you use the xpack feature, When running logstash, infinite loading occurs, and the following error occurs. Below is the conf file that I set.

my conf.file

 input {
        jdbc {
            clean_run => true
            jdbc_driver_library => "/usr/share/java/mysql-connector-java-8.0.23.jar"
            jdbc_driver_class => "com.mysql.jdbc.Driver"
            jdbc_connection_string => "jdbc:mysql:localhost:3306/db_name?useSSL=false&user=root&password=1234"
            jdbc_user => "root"
            jdbc_password => "1234"
            schedule => "* * * * * Asia/Seoul"
            statement => "select * from access_token"
            type => "access_token"
            tracking_column => "table_1"
            use_column_value => true
            }
    
    
        jdbc {
            clean_run => true
            jdbc_driver_library => "/usr/share/java/mysql-connector-java-8.0.23.jar"
            jdbc_driver_class => "com.mysql.jdbc.Driver"
            jdbc_connection_string => "jdbc:mysql://localhost:3306/db_name?useSSL=false&user=root&password=1234"
            jdbc_user => "root"
            jdbc_password => "1234"
            schedule => "* * * * * Asia/Seoul"
            statement => "select * from activity"
            type => "activity"
            tracking_column => "table_2"
            use_column_value => true
            }
    }
    
    
    output {
        if[type] == "access_token"  {
            elasticsearch {
                hosts => "20.194.48.93:9200"
                index => "0601_test"
                user => "test12"
                password => "test12"
                }
        }
        if[type] == "activity"  {
            elasticsearch {
                hosts => "20.194.48.93:9200"
                index => "0601_test"
                user => "test12"
                password => "test12"
                }
        }
        stdout {
            #codec => rubydebug
            codec => dots {}
        }
    }

i try method

1. /etc/mysql/my.cnf 
--> bind-address : 0.0.0.0

Solving a "communications link failure" with JDBC and MySQL

run error message1

[2021-06-01T03:26:11,050][ERROR][logstash.inputs.jdbc     ][main][142fbace6ae65011ebe067271d245f5f1dc5f6f9a443f157c6fa6dfae765ea4b] Unable to connect to database. Tried 1 times {:message=>"Java::ComMysqlCjJdbcExceptions::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.", :exception=>Sequel::DatabaseConnectionError, :cause=>com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

run error message2

{ 2066 rufus-scheduler intercepted an error:
  2066   job:
  2066     Rufus::Scheduler::CronJob "* * * * * Asia/Seoul" {}
  2066   error:
  2066     2066
  2066     Sequel::DatabaseConnectionError
  2066     Java::ComMysqlCjJdbcExceptions::CommunicationsException: Communications link failure

run error message3

[2021-06-01T03:26:11,011][ERROR][logstash.inputs.jdbc     ][main][0616737e1371528e603f2505cd0592b90ebecf4b855d15d987de4e71e468e748]
com.mysql.cj.jdbc.exceptions.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.

I have set the xpack function on elk. By using the xpack feature,

How can I solve this error in logstash run?

help me plz.

Python-97
  • 288
  • 2
  • 13

0 Answers0