logstash is issue

/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/java_thread_pool_executor.rb:13: warning: method redefined; discarding old to_int
/usr/share/logstash/vendor/bundle/jruby/3.1.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/java_thread_pool_executor.rb:13: warning: method redefined; discarding old to_f
Sending Logstash logs to /var/log/logstash which is now configured via log4j2.properties
2025-04-16 11:05:17,637 main ERROR The parameter is null: policy
2025-04-16 11:05:17,641 main ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile org.apache.logging.log4j.core.config.ConfigurationException : Arguments given for element RollingFile are invalid: field 'policy' has invalid value 'null'
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.injectFields(PluginBuilder.java:210)
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:121)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1120)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1045)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1037)
at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:651)
at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:247)
at org.logstash.log.LogstashConfigurationFactory.getConfiguration(LogstashConfigurationFactory.java:68)
at org.logstash.log.LogstashConfigurationFactory.getConfiguration(LogstashConfigurationFactory.java:40)
at org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:302)
at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:465)
at org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:323)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:695)
at org.apache.logging.log4j.core.LoggerContext.setConfigLocation(LoggerContext.java:684)
at org.logstash.log.LoggerExt.reconfigure(LoggerExt.java:184)
at org.logstash.log.LoggerExt$INVOKER$s$1$0$reconfigure.call(LoggerExt$INVOKER$s$1$0$reconfigure.gen)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:466)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:244)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:318)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)
at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)
at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:66)
at org.jruby.runtime.Block.call(Block.java:148)
at org.jruby.RubyProc.call(RubyProc.java:328)
at org.jruby.RubyProc$INVOKER$i$call.call(RubyProc$INVOKER$i$call.gen)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrNBlock.call(JavaMethod.java:355)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:466)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:244)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:318)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)
at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)
at org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)
at org.jruby.runtime.IRBlockBody.doYield(IRBlockBody.java:170)
at org.jruby.runtime.BlockBody.yield(BlockBody.java:108)
at org.jruby.runtime.Block.yield(Block.java:189)
at org.jruby.RubyArray.each(RubyArray.java:1989)
at org.jruby.RubyArray$INVOKER$i$0$0$each.call(RubyArray$INVOKER$i$0$0$each.gen)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:561)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:446)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:92)
at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:103)
at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:545)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:367)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:76)
at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164)
at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:212)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:456)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:195)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:350)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:76)
at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164)
at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:212)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:456)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:195)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:350)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:76)
at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:164)
at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:151)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:212)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:456)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:195)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:350)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)
at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
at org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuper(IRRuntimeHelpers.java:1319)
at org.jruby.ir.instructions.InstanceSuperInstr.interpret(InstanceSuperInstr.java:139)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:367)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)
at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:82)
at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:201)
at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:188)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:220)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:466)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:244)
at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:318)
at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)
at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)
at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)
at org.jruby.ir.targets.indy.InvokeSite.performIndirectCall(InvokeSite.java:735)
at org.jruby.ir.targets.indy.InvokeSite.invoke(InvokeSite.java:657)
at usr.share.logstash.lib.bootstrap.environment.RUBY$script(/usr/share/logstash/lib/bootstrap/environment.rb:89)
at usr.share.logstash.lib.bootstrap.environment.run(/usr/share/logstash/lib/bootstrap/environment.rb)
at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:732)
at org.jruby.ir.Compiler$1.load(Compiler.java:114)
at org.jruby.Ruby.runScript(Ruby.java:1286)
at org.jruby.Ruby.runNormally(Ruby.java:1203)
at org.jruby.Ruby.runNormally(Ruby.java:1185)
at org.jruby.Ruby.runNormally(Ruby.java:1221)
at org.jruby.Ruby.runFromMain(Ruby.java:999)
at org.logstash.Logstash.run(Logstash.java:163)
at org.logstash.Logstash.main(Logstash.java:73)

2025-04-16 11:05:17,647 main ERROR Null object returned for RollingFile in Appenders.
11:05:17.660 [main] WARN deprecation.logstash.runner - NOTICE: Running Logstash as superuser is not recommended and won't be allowed in the future. Set 'allow_superuser' to 'false' to avoid startup errors in future releases.
11:05:17.672 [main] INFO logstash.runner - Log4j configuration path used is: /etc/logstash/log4j2.properties
11:05:17.678 [main] WARN logstash.runner - The use of JAVA_HOME has been deprecated. Logstash 8.0 and later ignores JAVA_HOME and uses the bundled JDK. Running Logstash with the bundled JDK is recommended. The bund led JDK has been verified to work with each specific version of Logstash, and generally provides best performance and reliability. If you have compelling reasons for using your own JDK (organizational-specific compl iance requirements, for example), you can configure LS_JAVA_HOME to use that version instead.
11:05:17.679 [main] INFO logstash.runner - Starting Logstash {"logstash.version"=>"8.12.0", "jruby.version"=>"jruby 9.4.5.0 (3.1.4) 2023-11-02 1abae2700f OpenJDK 64-Bit Server VM 17.0.9+9 on 17.0.9+9 +indy +jit [x8 6_64-linux]"}
11:05:17.681 [main] INFO logstash.runner - JVM bootstrap flags: [-Xms2g, -Xmx2g, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djruby.compile.invokedynamic=true, -XX:+HeapDumpOnOutOfMemoryError, -Djava.security .egd=file:/dev/urandom, -Dlog4j2.isThreadContextMapInheritable=true, -Dlogstash.jackson.stream-read-constraints.max-string-length=200000000, -Dlogstash.jackson.stream-read-constraints.max-number-length=10000, -Djrub y.regexp.interruptible=true, -Djdk.io.File.enableADS=true, --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED, --add-exports=jdk.compiler/ com.sun.tools.javac.parser=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED, --add-opens=java.base/java.security=ALL-UNNAM ED, --add-opens=java.base/java.io=ALL-UNNAMED, --add-opens=java.base/java.nio.channels=ALL-UNNAMED, --add-opens=java.base/sun.nio.ch=ALL-UNNAMED, --add-opens=java.management/sun.management=ALL-UNNAMED]
11:05:17.683 [main] INFO logstash.runner - Jackson default value override logstash.jackson.stream-read-constraints.max-string-length configured to 200000000
11:05:17.684 [main] INFO logstash.runner - Jackson default value override logstash.jackson.stream-read-constraints.max-number-length configured to 10000
11:05:17.885 [LogStash::Runner] WARN logstash.config.source.multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified
11:05:17.916 [LogStash::Runner] FATAL logstash.runner - The given configuration is invalid. Reason: Expected one of [ \t\r\n], "#", "input", "filter", "output" at line 2, column 1 (byte 2) after
11:05:17.919 [LogStash::Runner] FATAL org.logstash.Logstash - Logstash stopped processing because of an error: (SystemExit) exit
org.jruby.exceptions.SystemExit: (SystemExit) exit
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:808) ~[jruby.jar:?]
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:767) ~[jruby.jar:?]
at usr.share.logstash.lib.bootstrap.environment.(/usr/share/logstash/lib/bootstrap/environment.rb:90) ~[?:?]

Something is not OK in your .conf, the line 2.

Like @Rios said, likely missing Input {} in .conf seeing as it's occurred on line 2. check your structure, should look something like this:

input {
  ...
}
filter {
  ...
}
output {
  ...
}