Unable to get Postgres for Logstash input

I am using the following:
Logstash 5.5.1
postgresql-42.1.4.jar
Java version 1.8.0_141
Windows 10

The following is my logstash config file

input {
        jdbc {
                jdbc_driver_library     => "PATH\TO\postgresql-42.1.4.jar"
                jdbc_driver_class       => "org.postgresql.Driver"
                jdbc_connection_string  => "jdbc:postgresql://THESERVER:PORT/user=isra"
                jdbc_user               => "isra"
                jdbc_password           => "123conn"
                statement               => "SELECT * from table1"
        }
}

output {
        stdout { codec => json_lines }
}

Yet I am getting the following error when attempting to run logstash. Any idea why?

 Aug 06, 2017 11:26:31 PM org.postgresql.Driver connect
SEVERE: Connection error:
org.postgresql.util.PSQLException: The connection attempt failed.
        at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:275)
        at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
        at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:194)
        at org.postgresql.Driver.makeConnection(Driver.java:450)
        at org.postgresql.Driver.connect(Driver.java:252)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:481)
        at org.jruby.javasupport.JavaMethod.invokeStaticDirect(JavaMethod.java:373)
        at org.jruby.java.invokers.StaticMethodInvoker.call(StaticMethodInvoker.java:73)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:236)
        at org.jruby.ast.CallSpecialArgNode.interpret(CallSpecialArgNode.java:71)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)

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