Hi,
This is a logstash (6.5.1) process that runs fine for months now, but in order to optimize its performance, I am trying to add the jdbc_static plugin, so I don't have to lookup in logstash a "domain table", since it will keep in the cache.
When I run it from systemctl, I get the below error:
[ERROR][logstash.pipeline ] Error registering plugin {:pipeline_id=>"main", :plugin=>"#<LogStash::FilterDelegator:0xbd2fd39 @metric_events_out=org.jruby.proxy.org.logstash.instrument.metrics.counter.LongCounter$Proxy2 - name: out value:0, @metric_events_in=org.jruby.proxy.org.logstash.instrument.metrics.counter.LongCounter$Proxy2 - name: in value:0, @metric_events_time=org.jruby.proxy.org.logstash.instrument.metrics.counter.LongCounter$Proxy2 - name: duration_in_millis value:0, @id=\"511111111111111111111111142ce947205b9953faa945d423d0096c68466405\", @klass=LogStash::Filters::JdbcStatic, @metric_events=#<LogStash::Instrument::NamespacedMetric:0x5e56b472>, @filter=<LogStash::Filters::JdbcStatic jdbc_user=>\"svc_eventlog_dev\", add_field=>{\"class_label\"=>\"%{[class][0][record_label]}\", \"source_label\"=>\"%{[source][0][record_label]}\"}, local_db_objects=>[{\"name\"=>\"local_class\", \"index_columns\"=>[\"record_id\"], \"columns\"=>[[\"record_id\", \"varchar(32)\"], [\"record_label\", \"varchar(128)\"], [\"base_record_id\", \"varchar(32)\"]]}, {\"name\"=>\"local_source\", \"index_columns\"=>[\"record_id\"], \"columns\"=>[[\"record_id\", \"varchar(32)\"], [\"record_label\", \"varchar(128)\"], [\"base_record_id\", \"varchar(32)\"]]}], remove_field=>[\"class\", \"source\"], loaders=>[{\"id\"=>\"remote-OL_CLASS\", \"query\"=>\"select record_id, record_label, base_record_id from IT.OL_CLASS order by record_label\", \"local_table\"=>\"local_class\"}, {\"id\"=>\"remote-OL_SOURCE\", \"query\"=>\"select record_id, record_label, base_record_id from ITA.OL_SOURCE order by record_label\", \"local_table\"=>\"local_source\"}], staging_directory=>\"/tmp/logstash/jdbc_static/import_data\", jdbc_password=><password>, jdbc_driver_library=>\"/opt/apps/oracle/ojdbc6.jar\", jdbc_connection_string=>\"jdbc:oracle:thin:@//database.otp.com:1521/OTP_DATABASE_DEFAULT.OTP.COM\", id=>\"511111111111111111111111142ce947205b9953faa945d423d0096c68466405\", loader_schedule=>\"* */2 * * *\", jdbc_driver_class=>\"Java::oracle.jdbc.driver.OracleDriver\", local_lookups=>[{\"id\"=>\"local-OL_CLASS\", \"query\"=>\"select record_label, base_record_id from local_class WHERE record_id = :record_id\", \"parameters\"=>{\"record_id\"=>\"[record_id]\"}, \"target\"=>\"class\"}, {\"id\"=>\"local-OL_SOURCE\", \"query\"=>\"select record_label, base_record_id from local_source WHERE record_id = :record_id\", \"parameters\"=>{\"record_id\"=>\"[record_id]\"}, \"target\"=>\"source\"}], enable_metric=>true, periodic_flush=>false, tag_on_failure=>[\"_jdbcstaticfailure\"], tag_on_default_use=>[\"_jdbcstaticdefaultsused\"]>>", :error=>"", :thread=>"#<Thread:0x4aa994ef run>"}
However, it works fine when running from the command line as the user configured (su). Therefore, I'm assuming that the code is fine.
Any idea where the problem could be? I didn't post more details to avoid too much information, but if you need any detail, please let me know.
Thanks,
Rob