Date_formatter plug-in issue

Can you please help on what is missing. I have got date_formatter.rb code and able to install the plug-in

./logstash-plugin install logstash-filter-date_formatter
Validating logstash-filter-date_formatter
Installing logstash-filter-date_formatter
Installation successful

when i run, logstash with the config, here is what i am getting. The samething worked if i install logstash manually. Getting below issue when installed logstash with puppet.

WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
Could not find log4j2 configuration at path /usr/share/logstash/config/ Using default config which logs errors to the console
[WARN ] 2018-07-20 16:05:44.655 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified
[INFO ] 2018-07-20 16:05:45.493 [LogStash::Runner] runner - Starting Logstash {"logstash.version"=>"6.3.1"}
[ERROR] 2018-07-20 16:05:54.274 [Converge PipelineAction::Create] registry - Tried to load a plugin's code, but failed. {:exception=>#<LoadError: no such file to load -- logstash/filters/date_formatter>, :path=>"logstash/filters/date_formatter", :type=>"filter", :name=>"date_formatter"}
[ERROR] 2018-07-20 16:05:54.324 [Converge PipelineAction::Create] agent - Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::PluginLoadingError", :message=>"Couldn't find any filter plugin named 'date_formatter'. Are you sure this is correct? Trying to load the date_formatter filter plugin resulted in this error: no such file to load -- logstash/filters/date_formatter", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/plugins/registry.rb:210:in lookup_pipeline_plugin'", "/usr/share/logstash/logstash-core/lib/logstash/plugin.rb:140:inlookup'", "/usr/share/logstash/logstash-core/lib/logstash/plugins/plugin_factory.rb:89:in plugin'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:110:inplugin'", "(eval):703:in <eval>'", "org/jruby/'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:82:in initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:167:ininitialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:40:in execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:305:inblock in converge_state'"]}

The version is 6.3.1. Can you please help if i am doing something wrong.

It looks like your puppet configuration is failing to install the plugin before starting Logstash. I'm not sure how else to be of help :pensive:

Actually i am installaling date_formatter manually after logstash is installed by puppet. I can even see date_formatter in the logstash plug-ins list but not working.

Any thoughts on this please?

My best guess here without the output of your commands is that the plugin was installed as a different user than the user that is running Logstash, and that a permission issue is keeping Logstash from being able to read the plugin.

The plugin is installed in the ${LOGSTASH_HOME}/vendor directory. Can you inspect permissions and ownership? What user is Logstash being run as under puppet? Does that user have permission to read and execute the files in the plugin's lib directory?

Thank you. You are correct. Its a permission issue. Able to fix the issue.

Thank you very much.

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