Error in Logstash Output to PostgreSQL

Asked 1 years ago, Updated 1 years ago, 65 views

Logstash displays the following error when outputting to Postgresql:

[ERROR][org.logstash.Logstash]java.lang.IllegalAccessError: tried to access class org.postgresql.Driver$ConnectThread from class org.postgresql.Driver

I think there is a problem with output because it works when the output is set to standard output.
The output of the pipeline file is as follows:

output{
  US>jdbc{
    driver_jar_path=>"/usr/share/java/postgresql.jar"
    driver_class=>"org.postgresql.Driver"
    connection_string=>"jdbc:postgresql://localhost:5432/testdb"
    statement=>["INSERT INTO test(result1, result2) VALUES(?,?),
      "test1", "test2"
    ]
  }
  stdout {codec=>rubydebug}
}

What's wrong?

postgresql

2022-09-30 19:56

1 Answers

Input and filter seemed to fail when using the same DB JDBC


2022-09-30 19:56

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.