Logstash doesn't work in Windows correctly Please help!

Hi, I try to run logstash in windows with the command:
.\bin\logstash.bat -f D:\Elastic\logstash-8.6.0\config\conf.d\bo_firmas_electronicas.conf

But I have this message:

[2023-01-13T16:01:57,544][ERROR][logstash.agent           ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"Java::JavaLang::IllegalStateException", :message=>"Unable to configure plugins: (ArgumentError) Cannot determine timezone from nil\n(secs:1673643708.771,utc~:\"2023-01-13 21:01:48.7709999084472656\",ltz~:nil)\n(etz:nil,tnz:\"PET\",tziv:\"2.0.5\",tzidv:\"1.2022.6\",rv:\"2.6.8\",rp:\"java\",win:true,rorv:nil,astz:nil,eov:\"1.2.7\",eotnz:\"???\",eotnfz:\"???\",eotlzn:\"???\",\ndebian:nil,centos:nil,osx:nil)\nTry setting `ENV['TZ'] = 'Continent/City'` in your script (see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)", :backtrace=>["org.logstash.config.ir.CompiledPipeline.<init>(CompiledPipeline.java:120)", "org.logstash.execution.AbstractPipelineExt.initialize(AbstractPipelineExt.java:181)", "org.logstash.execution.AbstractPipelineExt$INVOKER$i$initialize.call(AbstractPipelineExt$INVOKER$i$initialize.gen)", "org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:846)", "org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuper(IRRuntimeHelpers.java:1229)", "org.jruby.ir.instructions.InstanceSuperInstr.interpret(InstanceSuperInstr.java:131)", "org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)", "org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)", "org.jruby.RubyClass.newInstance(RubyClass.java:911)", "org.jruby.RubyClass$INVOKER$i$newInstance.call(RubyClass$INVOKER$i$newInstance.gen)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:87)", "org.jruby.ir.instructions.CallBase.interpret(CallBase.java:549)", "org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:361)", "org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)", "org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:92)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225)", "org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:226)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:393)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:206)", "org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:325)", "org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)", "org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)", "org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)", "org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:66)", "org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:58)", "org.jruby.runtime.Block.call(Block.java:143)", "org.jruby.RubyProc.call(RubyProc.java:309)", "org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:107)", "java.base/java.lang.Thread.run(Thread.java:1589)"]}
[2023-01-13T16:01:57,566][DEBUG][logstash.agent           ] Shutting down all pipelines {:pipelines_count=>0}
[2023-01-13T16:01:57,567][DEBUG][logstash.agent           ] Converging pipelines state {:actions_count=>0}
[2023-01-13T16:01:57,568][DEBUG][logstash.instrument.periodicpoller.os] Stopping
[2023-01-13T16:01:57,569][DEBUG][logstash.instrument.periodicpoller.jvm] Stopping
[2023-01-13T16:01:57,569][DEBUG][logstash.instrument.periodicpoller.persistentqueue] Stopping
[2023-01-13T16:01:57,570][DEBUG][logstash.instrument.periodicpoller.deadletterqueue] Stopping
[2023-01-13T16:01:57,570][DEBUG][logstash.instrument.periodicpoller.flowrate] Stopping
[2023-01-13T16:01:57,577][DEBUG][logstash.agent           ] API WebServer has stopped running
[2023-01-13T16:01:57,577][INFO ][logstash.runner          ] Logstash shut down.
[2023-01-13T16:01:57,585][FATAL][org.logstash.Logstash    ] Logstash stopped processing because of an error: (SystemExit) exit

My bo_firmas_electronicas.conf:

input {
   jdbc {
      jdbc_driver_library => "D:\Elastic\logstash-8.6.0\lib\ojdbc8.jar"
      jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
      jdbc_connection_string => "jdbc:oracle:thin:@//10.100.152.36:1521/SID"
	  jdbc_user => "*****"
      jdbc_password => "******"
      jdbc_validate_connection => true
      statement_filepath => "D:\Elastic\logstash-8.6.0\config\conf.d\bigStatements\bo_firmas_electronicas_v2.sql"
      #tracking_column => "dhora_solicitud"
      #use_column_value => true
      #tracking_column_type => "timestamp"
      #last_run_metadata_path => "D:\Elastic\logstash-8.6.0\config\conf.d\tracking_column\.last_value_bo_firmas_electronicas"
   }
}

output {
  elasticsearch {
    hosts => ["http://localhost:9200"]
	index => "bo_firmas_electronicas-104666"
    user => "elastic"
    password => "******"
  }
}

It's something related with a time zone. According to your .conf you are not using the date plugin.
Can you add one more param in input:
jdbc_default_timezone => "Europe/Berlin"

Another format is:
jdbc_default_timezone => "America/Denver[dst_enabled_on_overlap:true]"

Change with your timezone to your from here

If that wouldn't work, try to start with path param
.\bin\logstash.bat -f D:\Elastic\logstash-8.6.0\config\conf.d\bo_firmas_electronicas.conf --path.settings D:\Elastic\logstash-8.6.0\config

1 Like

thanks Rios

1 Like

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