Unable to run pipeline on logstash 8.13.4 version

Hi,

Getting below error while running the logstash pipe line with ing-bank cassandra jdbc driver.

[ERROR] 2024-05-14 05:16:54.776 [Converge PipelineAction::Create<main>] agent - Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineAction::Create<main>, action_result: false", :backtrace=>nil}
[FATAL] 2024-05-14 05:16:54.771 [[main]-pipeline-manager] Logstash - uncaught error (in thread [main]-pipeline-manager)
java.lang.NoClassDefFoundError: com/github/benmanes/caffeine/cache/CacheLoader
	at java.lang.Class.forName0(Native Method) ~[?:?]
	at java.lang.Class.forName(java/lang/Class.java:467) ~[?:?]
	at org.jruby.javasupport.JavaSupport.loadJavaClass(org/jruby/javasupport/JavaSupport.java:327) ~[jruby.jar:?]
	at org.jruby.javasupport.JavaSupport.loadJavaClass(org/jruby/javasupport/JavaSupport.java:315) ~[jruby.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(jdk/internal/reflect/NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(jdk/internal/reflect/DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:568) ~[?:?]
	at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:315) ~[jruby.jar:?]
	at org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:176) ~[jruby.jar:?]
	at RUBY.load_jdbc_driver_class(/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-integration-jdbc-5.4.9/lib/logstash/plugin_mixins/jdbc/common.rb:82) ~[?:?]
	at RUBY.load_driver(/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-integration-jdbc-5.4.9/lib/logstash/plugin_mixins/jdbc/common.rb:36) ~[?:?]
	at RUBY.register(/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-integration-jdbc-5.4.9/lib/logstash/inputs/jdbc.rb:307) ~[?:?]
	at RUBY.register(/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-mixin-ecs_compatibility_support-1.3.0-java/lib/logstash/plugin_mixins/ecs_compatibility_support/target_check.rb:48) ~[?:?]

That is blowing up here, when it tries to load the driver class.

What do the jdbc_driver_class and associated options look like on the jdbc input?

I have passed com.ing.data.cassandra.jdbc.CassandraDriver as per driver class documentation. (https://github.com/ing-bank/cassandra-jdbc-wrapper)

Read the notes related to jdbc_driver_class and jdbc_driver_library in the documentation. Decide whether it should be loading through jdbc_driver_library or the JVM classpath. Are the permissions correct? Is the name correct (see documentation again)?

I have passed both lib and driver class information.

    jdbc_driver_library => "/root/cassandra-certs/cassandra-jdbc-wrapper-4.12.0.jar"
    jdbc_driver_class => "com.ing.data.cassandra.jdbc.CassandraDriver"
    jdbc_connection_string => "jdbc:cassandra://${host}:${port}/${keyspace}?enablessl=true&localdatacenter=${dc}"
    jdbc_user => "${user}"
    jdbc_password => "${password}"
    jdbc_validate_connection => true
    lowercase_column_names => true
    statement => "${statement}"
    record_last_run => false
  }```

How are you running logstash? Only the root user would have access to this file and it is recommended to not run logstash as root.

OK, as described in the notes I linked to, you need to check permissions and whether the class needs the prefix.

To check permissions you could trace the startup using something like

strace -e status=!successful ...

or the equivalent on whatever OS you are using. Even a successful startup will include failed system calls, but if you see a permissions error related to opening the jar that will show you something you need to fix.