Java errors when running Logstash with database configuration

I added the below jdbc config to my conf.d/logstash-simple.conf file.

jdbc {
    add_field => { "[index_name]" => "pglogdb" }
    add_field => { "[@metadata][beat]" => "jdbc" }
    add_field => { "[@metadata][version]" => "1.1" }
    tags => ["pglogdb_data"]
    #jdbc_driver_library => ""
    jdbc_driver_class => "Java::org.postgresql.Driver"
    jdbc_connection_string => "jdbc:postgresql://1.6.2.13:5432/pgmessagesuat"
    jdbc_user => "pguat"
    jdbc_password => "password"
    last_run_metadata_path => "/etc/logstash/conf.d/lastrun/.logstash_jdbc_pgmessagesuat_last_run"
    schedule => "0,10,20,30,40,50 * * * *"
    statement => "SELECT QUERY"
    use_column_value => true
    tracking_column => "a.transaction_timestamp"
    tracking_column_type => "timestamp"
}

When I run logstash I see the below in the logs. I'm not sure how to resolve it though. I suspect I'm missing a cert though. Do I need a cert for the db server on my logstash server?

May 15 17:11:29 iou6767 logstash[24031]: javax.net.ssl|WARNING|22|[main]>worker3|2023-05-15 17:11:29.384 IST|SSLSocketImpl.java:1550|handling exception ( May 15 17:11:29 iou6767 logstash[24031]: "throwable" : { May 15 17:11:29 iou6767 logstash[24031]: java.net.SocketTimeoutException: Read timed out May 15 17:11:29 iou6767 logstash[24031]: at java.base/java.net.SocketInputStream.socketRead0(Native Method) May 15 17:11:29 iou6767 logstash[24031]: at java.base/java.net.SocketInputStream.socketRead(SocketInputStream.java:115) May 15 17:11:29 iou6767 logstash[24031]: at java.base/java.net.SocketInputStream.read(SocketInputStream.java:168) May 15 17:11:29 iou6767 logstash[24031]: at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140) May 15 17:11:29 iou6767 logstash[24031]: at java.base/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:467) May 15 17:11:29 iou6767 logstash[24031]: at java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:461) May 15 17:11:29 iou6767 logstash[24031]: at java.base/sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(SSLSocketInputRecord.java:70) May 15 17:11:29 iou6767 logstash[24031]: at java.base/sun.security.ssl.SSLSocketImpl.readApplicationRecord(SSLSocketImpl.java:1349) May 15 17:11:29 iou6767 logstash[24031]: at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:958) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:155) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.impl.BHttpConnectionBase.fillInputBuffer(BHttpConnectionBase.java:346) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.impl.BHttpConnectionBase.isStale(BHttpConnectionBase.java:366) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.impl.conn.CPool.validate(CPool.java:69) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.impl.conn.CPool.validate(CPool.java:43) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.pool.AbstractConnPool.getPoolEntryBlocking(AbstractConnPool.java:247) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.pool.AbstractConnPool.access$000(AbstractConnPool.java:64) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.pool.AbstractConnPool$2.getPoolEntry(AbstractConnPool.java:192) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.pool.AbstractConnPool$2.getPoolEntry(AbstractConnPool.java:185) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.pool.PoolEntryFuture.get(PoolEntryFuture.java:107) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.leaseConnection(PoolingHttpClientConnectionManager.java:276) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.impl.conn.PoolingHttpClientConnectionManager$1.get(PoolingHttpClientConnectionManager.java:263) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:190) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:220) May 15 17:11:29 iou6767 logstash[24031]: at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:164) May 15 17:11:29 iou6767 logstash[24031]: at jdk.internal.reflect.GeneratedMethodAccessor65.invoke(Unknown Source) May 15 17:11:29 iou6767 logstash[24031]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) May 15 17:11:29 iou6767 logstash[24031]: at java.base/java.lang.reflect.Method.invoke(Method.java:566) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:486) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:341) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:65) May 15 17:11:29 iou6767 logstash[24031]: at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.manticore_minus_0_dot_7_dot_0_minus_java.lib.manticore.response.RUBY$method$call$0(/usr/share/logstash/vendor/bundle/jruby May 15 17:11:29 iou6767 logstash[24031]: at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_output_minus_elasticsearch_minus_10_dot_7_dot_3_minus_java.lib.logstash.outputs.elasticsearch.http_client.m May 15 17:11:29 iou6767 logstash[24031]: at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_output_minus_elasticsearch_minus_10_dot_7_dot_3_minus_java.lib.logstash.outputs.elasticsearch.http_client.p May 15 17:11:29 iou6767 logstash[24031]: at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_output_minus_elasticsearch_minus_10_dot_7_dot_3_minus_java.lib.logstash.outputs.elasticsearch.http_client.p May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.runtime.CompiledIRBlockBody.yieldDirect(CompiledIRBlockBody.java:148) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.runtime.BlockBody.yield(BlockBody.java:114) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.runtime.Block.yieldValues(Block.java:200) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.ir.targets.YieldSite.yieldValues(YieldSite.java:166) May 15 17:11:29 iou6767 logstash[24031]: at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_output_minus_elasticsearch_minus_10_dot_7_dot_3_minus_java.lib.logstash.outputs.elasticsearch.http_client.p May 15 17:11:29 iou6767 logstash[24031]: at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_output_minus_elasticsearch_minus_10_dot_7_dot_3_minus_java.lib.logstash.outputs.elasticsearch.http_client.p May 15 17:11:29 iou6767 logstash[24031]: at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_output_minus_elasticsearch_minus_10_dot_7_dot_3_minus_java.lib.logstash.outputs.elasticsearch.http_client.p May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.runtime.CompiledIRBlockBody.callDirect(CompiledIRBlockBody.java:138) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:58) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.runtime.Block.call(Block.java:143) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.RubyProc.call(RubyProc.java:339) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.internal.runtime.methods.ProcMethod.call(ProcMethod.java:64) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:220) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:216) May 15 17:11:29 iou6767 logstash[24031]: at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_output_minus_elasticsearch_minus_10_dot_7_dot_3_minus_java.lib.logstash.outputs.elasticsearch.http_client.R May 15 17:11:29 iou6767 logstash[24031]: at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_output_minus_elasticsearch_minus_10_dot_7_dot_3_minus_java.lib.logstash.outputs.elasticsearch.http_client.R May 15 17:11:29 iou6767 logstash[24031]: at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_output_minus_elasticsearch_minus_10_dot_7_dot_3_minus_java.lib.logstash.outputs.elasticsearch.common.RUBY$m May 15 17:11:29 iou6767 logstash[24031]: at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_output_minus_elasticsearch_minus_10_dot_7_dot_3_minus_java.lib.logstash.outputs.elasticsearch.common.RUBY$m May 15 17:11:29 iou6767 logstash[24031]: at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_output_minus_elasticsearch_minus_10_dot_7_dot_3_minus_java.lib.logstash.outputs.elasticsearch.common.RUBY$m May 15 17:11:29 iou6767 logstash[24031]: at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_output_minus_elasticsearch_minus_10_dot_7_dot_3_minus_java.lib.logstash.outputs.elasticsearch.common.RUBY$m May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:106) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:140) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:200) May 15 17:11:29 iou6767 logstash[24031]: at org.logstash.config.ir.compiler.OutputStrategyExt$AbstractOutputStrategyExt.invokeOutput(OutputStrategyExt.java:153) May 15 17:11:29 iou6767 logstash[24031]: at org.logstash.config.ir.compiler.OutputStrategyExt$SimpleAbstractOutputStrategyExt.doOutput(OutputStrategyExt.java:279) May 15 17:11:29 iou6767 logstash[24031]: at org.logstash.config.ir.compiler.OutputStrategyExt$SharedOutputStrategyExt.output(OutputStrategyExt.java:312) May 15 17:11:29 iou6767 logstash[24031]: at org.logstash.config.ir.compiler.OutputStrategyExt$AbstractOutputStrategyExt.multiReceive(OutputStrategyExt.java:143) May 15 17:11:29 iou6767 logstash[24031]: at org.logstash.config.ir.compiler.OutputDelegatorExt.doOutput(OutputDelegatorExt.java:102) May 15 17:11:29 iou6767 logstash[24031]: at org.logstash.config.ir.compiler.AbstractOutputDelegatorExt.multiReceive(AbstractOutputDelegatorExt.java:121) May 15 17:11:29 iou6767 logstash[24031]: at org.logstash.generated.CompiledDataset8.compute(Unknown Source) May 15 17:11:29 iou6767 logstash[24031]: at org.logstash.generated.CompiledDataset9.compute(Unknown Source) May 15 17:11:29 iou6767 logstash[24031]: at org.logstash.config.ir.CompiledPipeline$CompiledUnorderedExecution.compute(CompiledPipeline.java:333) May 15 17:11:29 iou6767 logstash[24031]: at org.logstash.config.ir.CompiledPipeline$CompiledUnorderedExecution.compute(CompiledPipeline.java:323) May 15 17:11:29 iou6767 logstash[24031]: at org.logstash.execution.WorkerLoop.run(WorkerLoop.java:83) May 15 17:11:29 iou6767 logstash[24031]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) May 15 17:11:29 iou6767 logstash[24031]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) May 15 17:11:29 iou6767 logstash[24031]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) May 15 17:11:29 iou6767 logstash[24031]: at java.base/java.lang.reflect.Method.invoke(Method.java:566) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:441) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:305) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:32) May 15 17:11:29 iou6767 logstash[24031]: at usr.share.logstash.logstash_minus_core.lib.logstash.java_pipeline.RUBY$block$start_workers$5(/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:295) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.runtime.CompiledIRBlockBody.callDirect(CompiledIRBlockBody.java:138) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:58) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:52) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.runtime.Block.call(Block.java:139) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.RubyProc.call(RubyProc.java:318) May 15 17:11:29 iou6767 logstash[24031]: at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:105) May 15 17:11:29 iou6767 logstash[24031]: at java.base/java.lang.Thread.run(Thread.java:834)}

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