rschmerb
(Rob_at_Optum)
January 14, 2022, 8:54pm
1
We are seeing the following error messages after starting our pipeline:
[2022-01-13T19:48:06,009][FATAL][org.logstash.Logstash ] Logstash stopped processing because of an error: (SyntaxError) (eval):1: syntax error, unexpected end-of-file
Java::
We did not have this issue in 7.6.2 but are seeing it after 7.16.2/3 upgrade. Full error scrape below:
2022-01-13T19:48:05,769][INFO ][logstash.agent ] Pipelines running {:count=>2, :running_pipelines=>[:p_sltdb_jdbc, :p_sltdb_jdbc_metrics], :non_running_pipelines=>[]}
[2022-01-13T19:48:06,009][FATAL][org.logstash.Logstash ] Logstash stopped processing because of an error: (SyntaxError) (eval):1: syntax error, unexpected end-of-file
Java::
^
org.jruby.exceptions.SyntaxError: (SyntaxError) (eval):1: syntax error, unexpected end-of-file
Java::
^
at org.jruby.RubyKernel.eval(org/jruby/RubyKernel.java:1048) ~[jruby-complete-9.2.20.1.jar:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_51_dot_0.lib.sequel.adapters.jdbc.load_driver(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/sequel-5.51.0/lib/sequel/adapters/jdbc.rb:55) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_integration_minus_jdbc_minus_5_dot_1_dot_8.lib.logstash.plugin_mixins.jdbc.common.load_driver(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.1.8/lib/logstash/plugin_mixins/jdbc/common.rb:33) ~[?:?]
at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.logstash_minus_integration_minus_jdbc_minus_5_dot_1_dot_8.lib.logstash.inputs.jdbc.run(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.1.8/lib/logstash/inputs/jdbc.rb:294) ~[?:?]
Badger
January 14, 2022, 9:16pm
2
unexpected end-of-file ... at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.sequel_minus_5_dot_51_dot_0.lib.sequel.adapters.jdbc.load_driver(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/sequel-5.51.0/lib/sequel/adapters/jdbc.rb:55)
That is here . If you are using a jdbc input then it is evaluating the jdbc_driver_class option string, expecting JRuby to auto-load it. I cannot tell you any more than that.
rschmerb
(Rob_at_Optum)
January 15, 2022, 2:12am
3
Any thoughts on why the same config file would work in 7.6.2 but fail in 7.16.2/3 ?
Your input is much appreciated of course,
Rob
rschmerb
(Rob_at_Optum)
January 15, 2022, 2:30am
4
Found a note attached to the jdbc_driver_class option here that specifies you may have to add Java:: to a jdbc_driver_class entry. I find it odd that it would start failing with a similar message after updating to new version.
Also, to validate, jdbc_driver_class => ""
is an acceptable entry in the config when jdbc_driver_library => "/etc/logstash/jtds-1.3.1.jar"
Thanks again,
Rob
Badger
January 15, 2022, 2:34am
5
7.6 did not bundle a JDK, but 7.16 does. That means you could be using a different Java version and conceivably even a different Java vendor.
I cannot speak to your other question.
rschmerb
(Rob_at_Optum)
January 26, 2022, 6:58pm
6
Hello,
We have performed the following:
Change the parameter in
/etc/logstash/startup.options
from: #JAVACMD=/usr/bin/java
to: JAVACMD=/bin/java
Where:
# which java
/bin/java
# ls -la /bin/java
lrwxrwxrwx 1 root root 22 Jan 8 05:37 /bin/java -> /etc/alternatives/java
# ls -la /etc/alternatives/java
lrwxrwxrwx 1 root root 73 Jan 8 05:37 /etc/alternatives/java -> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el7_7.x86_64/jre/bin/java
Then execute:
/usr/share/logstash/bin/system-install
and finally:
systemctl restart logstash
rschmerb
(Rob_at_Optum)
January 26, 2022, 7:09pm
7
After changing (a previously working):
jdbc_driver_class => ""
to:
jdbc_driver_class => "net.sourceforge.jtds.jdbc.Driver"
we seem to be working now.
We also tested this with the built in jdk and it worked correctly.
system
(system)
Closed
February 23, 2022, 7:10pm
8
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.