Hi,
I am using jdbc input plugin (version : 1.0.0) to push the data from postgres to elastic. But I get an error as:
Java::OrgPostgresqlUtil::PSQLException: The server requested password-based authentication, but no password was provided.
Logstash conf details:
# file: simple-out.conf
input {
jdbc {
jdbc_connection_string => "jdbc:postgresql://localhost:5432/postgres"
jdbc_user => "postgres"
jdbc_password => "admin"
jdbc_driver_library => "/PATH/TO/jdbc/postgresql-9.4-1202.jdbc41.jar"
jdbc_driver_class => "org.postgresql.Driver"
statement => "SELECT * from contacts"
}
}
output {
stdout { codec => json_lines }
}
In postgres, I have a db called as postgres, with a user as 'postgres' and changed the password to 'admin'
SQL statement:
alter user postgres password 'admin'
Java version on my mac is:
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
And postgres version
> PostgreSQL 9.4.4 on x86_64-apple-darwin, compiled by i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00), 64-bit
Am I missing something?
Thanks
K