Can not start logstash with jdbc to postgresql9.5.5,except an error"role 'greg' does not exist"

This is the first time I use logstash.I installed logstash5.2.0 by downloading logstash-5.2.0.tar.gz.
The input is:

input {
  jdbc {
    jdbc_driver_library => "jdbc-drivers/postgresql-9.4.1212.jar"
    jdbc_driver_class => "org.postgresql.Driver"
    jdbc_connection_string => "jdbc:postgresql://192.168.5.16:5432/AUDIT"
    jdbc_user => "postgres"
    schedule => "* * * * *"
    statement => "SELECT id, username, depname, srcpath, dstpath FROM pulic.tfilemonex WHERE id > :sql_last_value"
    use_column_value => true
    tracking_column => id
  }
}

The error:

[ERROR][logstash.agent           ] Pipeline aborted due to error {:exception=>#<Sequel::DatabaseConnectionError: Java::OrgPostgresqlUtil::PSQLException: FATAL: role "greg" does not exist>, :backtrace=>["org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(org/postgresql/core/v3/QueryExecutorImpl.java:2455)",
...

And the "greg" is the user of my os--CentOS6.5.
How can I fix it?

Anybody help?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.