Logstash can not find plugin after i install it successfully

i would like to extend logstash-input-jdbc so i download it to my local directory. and then i do following things.

  1. rename the directory from logstash-input-jdbc to logstash-input-ias_person

  2. rename lib/logstash/inputs/jdbc.ruby to lib/logstash/inputs/ias_person.ruby

  3. rename class name from Jdbc to Ias_Person

  4. change config_name to "ias_person"

  5. change logstash-input-jdbc.gemspec to logstash-input-ias_person.gemspec

  6. gem build logstash-input-ias_person.gemspec then i get a logstash-input-ias_person-4.2.2.gem

  7. install this new plugin (yes, i just rename it for the first step) by command logstash-plugin install logstash-input-ias_person-4.2.2.gem. it shows validating, and installing and then succeed.

  8. run command logstash-plugin list, i can see my logstash-input-ias_person in output.

  9. open logstash/Gemfile, i see this line: gem "logstash-input-ias_person", "4.2.2", :path => "vendor/local_gems/89ca0712/logstash-input-ias_person-4.2.2"

  10. so far so good! BUT when i try to use it. (just by replace jdbc plugin to ias_person in a verified working logstash conf file). i get this error:
    [2017-08-18T15:26:16,713][ERROR][logstash.plugins.registry] Problems loading a plugin with {:type=>"input", :name=>"ias_person", :path=>"logstash/inputs/ias_person", :error_message=>"NameError", :error_class=>NameError, :error_backtrace=>["c:/ElastiscSearch/logstash/logstash-core/lib/logstash/plugins/registry.rb:226:in namespace_lookup'", "c:/ElastiscSearch/logstash/logstash-core/lib/logstash/plugins/registry.rb:162:inlegacy_lookup'", "c:/ElastiscSearch/logstash/logstash-core/lib/logstash/plugins/registry.rb:138:in lookup'", "c:/ElastiscSearch/logstash/logstash-core/lib/logstash/plugins/registry.rb:180:inlookup_pipeline_plugin'", "c:/ElastiscSearch/logstash/logstash-core/lib/logstash/plugin.rb:140:in lookup'", "c:/ElastiscSearch/logstash/logstash-core/lib/logstash/pipeline.rb:100:inplugin'", "(eval):8:in initialize'", "org/jruby/RubyKernel.java:1079:ineval'", "c:/ElastiscSearch/logstash/logstash-core/lib/logstash/pipeline.rb:72:in initialize'", "c:/ElastiscSearch/logstash/logstash-core/lib/logstash/pipeline.rb:156:ininitialize'", "c:/ElastiscSearch/logstash/logstash-core/lib/logstash/agent.rb:286:in create_pipeline'", "c:/ElastiscSearch/logstash/logstash-core/lib/logstash/agent.rb:95:inregister_pipeline'", "c:/ElastiscSearch/logstash/logstash-core/lib/logstash/runner.rb:314:in execute'", "c:/ElastiscSearch/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:inrun'", "c:/ElastiscSearch/logstash/logstash-core/lib/logstash/runner.rb:209:in run'", "c:/ElastiscSearch/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:inrun'", "c:\ElastiscSearch\logstash\lib\bootstrap\environment.rb:71:in `(root)'"]}
    [2017-08-18T15:26:16,729][ERROR][logstash.agent ] Cannot create pipeline {:reason=>"Couldn't find any input plugin named 'ias_person'. Are you sure this is correct? Trying to load the ias_person input plugin resulted in this error: Problems loading the requested plugin named ias_person of type input. Error: NameError NameError"}

I GUESS, it trys to load plugin from "logstash/inputs/ias_person"???
Doesn't logstash/Gemfile shows it is at "vendor/local_gems/89ca0712/logstash-input-ias_person-4.2.2"??

plus:
get error after i uninstall it and try to install it again...

c:\ElastiscSearch\logstash>bin\logstash-plugin install plugins\logstash-input-ias_person-4.2.2.gem
ERROR: Something went wrong when installing plugins\logstash-input-ias_person-4.2.2.gem, message: bad URI(is not URI?): https://artifacts.elastic.co/downloads/logstash-plugins/plugins\logstash-input-ias_person-4.2.2.gem/plugins\logstash-input-ias_person-4.2.2.gem-5.5.1.zip

for my first problem: it is my mistake. i made some changes and installed gem. then continue make other changes.and rebuild and reinstall the gem. but i didn't copy the new gem from source directory to my installation directory. so logstash still loads old gem which has something incosistent by itself.

for my second problem: i am still unsure what is happening. after tried about 7 or 8 times. i can install it now. i did nothing but just repeat executing bin\logstash-plugin install plugins\logstash-input-ias_person-4.2.2.gem. hopefully some experienced plugin developer could tell me what is happening in my computer.

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