Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logstash plugin load error : 'cabin/metrics', 'cabin/log/logger', 'logstash::codecs::multiline::Grok' error #15988

Closed
LiYuzhuo2020 opened this issue Mar 11, 2024 · 11 comments

Comments

@LiYuzhuo2020
Copy link

LiYuzhuo2020 commented Mar 11, 2024

No description provided.

@andsel
Copy link
Contributor

andsel commented Mar 12, 2024

Hi @LiYuzhuo2020 thanks for reporting this and getting in touch about it.
However to investigate the root cause, we need your help and more information.
Could you provide a portion of your logs around the error, in particular the full stacktrace of the error and the message, please 🙏 ?

@LiYuzhuo2020
Copy link
Author

LiYuzhuo2020 commented Mar 12, 2024

and for the plugin load error 'logstash::codecs::multiline' GROK I think it's throwed here

logstash-codec-multiline:

def register
### when require grok-pure it will failed to require it and throw error unable to configure plugin : "grok-pure/discovery" (not happened each time when I restart it, it has certain probability of occurring. )
require "grok-pure" # rubygem 'jls-grok'
require 'logstash/patterns/core'

# Detect if we are running from a jarfile, pick the right path.
patterns_path = []
patterns_path += [LogStash::Patterns::Core.path]

@grok = Grok.new

@patterns_dir = patterns_path.to_a + @patterns_dir
@patterns_dir.each do |path|
  if ::File.directory?(path)
    path = ::File.join(path, "*")
  end

  Dir.glob(path).each do |file|
    @logger.debug("Grok loading patterns from file", :path => file)
    @grok.add_patterns_from_file(file)
  end
end

@andsel
Copy link
Contributor

andsel commented Mar 12, 2024

These are really strange errors, in Logstash 8.12.0 and 8.11.3 JRuby was switched from 9.4.2.0 to 9.4.5.0.
Maybe it's related to JRuby version.
To confirm that, would you try your configuration with Logstash 8.11.2

@andsel
Copy link
Contributor

andsel commented Mar 13, 2024

Hi @LiYuzhuo2020 thanks for confirming, maybe it's related to the fact that in JRuby patch doesn't change so much, maybe worthwhile to test also with a previous minor JRuby (9.3.10.0) which was shipped with Logstash 8.9.2.
However, I would like to be able to reproduce locally, could you share more on your environment, please?

  • jvm.options
  • pipelines definitions
  • first line of logs when you start Logstash (around Starting Logstash), where Logstash prints, JVM version, OS, CPU arch, set of startup flags etc.

@LiYuzhuo2020
Copy link
Author

Hi @andsel , how's your progress, is this a bug or just need myself to adjust the configuration file?

@LiYuzhuo2020
Copy link
Author

sometimes even cannot find the 'add_patterns_from_file' method ...

@andsel
Copy link
Contributor

andsel commented Mar 22, 2024

Hi @LiYuzhuo2020, no sorry no news, the information provided is not of much value. To try to understand what's happening the log (in textual form and not image) should be provided, and must cover from the start of Logstash till the reported error. Maybe better at debug level (start Logstash with --debug).

We have to figure out how to reproduce, so if you can isolate a minimal pipeline definition that manifest the problem with a certain probability would be great. Without that it's hard to share what's the problem.

@LiYuzhuo2020 LiYuzhuo2020 changed the title logstash 8.12.2 plugin load error : 'cabin/metrics', 'cabin/log/logger', 'logstash::codecs::multiline::Grok' error logstash plugin load error : 'cabin/metrics', 'cabin/log/logger', 'logstash::codecs::multiline::Grok' error Mar 22, 2024
@LiYuzhuo2020
Copy link
Author

I found this error log

illegal access of jruby

image

@LiYuzhuo2020
Copy link
Author

Hi @andsel thanks for your information, I followed your advice commented out other pipeline and investigate one by one finally found out the cause, it's due to one of my pipeline has timestamp convert error

@andsel
Copy link
Contributor

andsel commented Mar 25, 2024

Great @LiYuzhuo2020 ! Once it's fixed for you, please 🙏 close the issue.

@LiYuzhuo2020
Copy link
Author

LiYuzhuo2020 commented Mar 26, 2024

Hi @andsel , the issue looks like caused by the default geoIp database, I disabled it, it's much stable now.

but sometimes there has the probability of occurring the 'string index out of range -1 ' without any plugin load error message . I'm quiet confused about that why don't raise some more useful information when configure failed but raised the illegalStateException 囧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants