logstash-plugins / logstash-input-jms

12 stars 27 forks source link

Plugin does not work with Logstash 5.0.2 #14

Open takearun opened 7 years ago

takearun commented 7 years ago

Please post all product and debugging questions on our forum. Your questions will reach our wider community members there, and if we confirm that there is a bug, then we can open a new issue here.

For all general issues, please provide the following details for fast resolution:

jms { yaml_file => "/opt/monitoring/logstash/conf/jmsConf.yml" yaml_section => "perf" include_header => true include_properties => true include_body => true use_jms_timestamp => false destination => "Company.WOR.Service.Public.Notify.Utility.Monitoring.ElasticSearch.1" interval => 3 runner => async }

  1. Start consuming the feed.
  2. Error received,

Attributes: {:jms_correlation_id=>"", :jms_delivery_mode_sym=>:persistent, :jms_destination=>"Queue[Company.BEL.Service.Public.Notify.Utility.Monitoring.ElasticSearch.1]", :jms_expiration=>0, :jms_message_id=>"ID:perf_instance_B_9602.7F285797493C1:13B734CB6", :jms_priority=>4, :jms_redelivered=>false, :jms_reply_to=>nil, :jms_timestamp=>1481899929616, :jms_type=>nil} Properties: {"JMSXDeliveryCount"=>1, "scaOperationName"=>"publishNotification", "JMS_TIBCO_COMPRESS"=>true, "messageId"=>"9975035464", "clientTransactionId"=>"6807135713"}, :exception=>#<NoMethodError: Direct event field references (i.e. event['field'] = 'value') have been disabled in favor of using event get and set methods (e.g. event.set('field', 'value')). Please consult the Logstash 5.0 breaking changes documentation for more details.>, :backtrace=>["/opt/monitoring/logstash/5.0.2/logstash-core-event-java/lib/logstash/event.rb:44:in `method_missing'", "/opt/monitoring/logstash/5.0.2/vendor/bundle/jruby/1.9/gems/logstash-input-jms-2.0.3-java/lib/logstash/inputs/jms.rb:160:

Appreciate your help.

Thanks, Arun

gjelu commented 7 years ago

Same problem here with LS 5.1.1 Created a fork and refactored it: https://github.com/gjelu/logstash-input-jms/commit/e8207dd898b3817827bc635ea90d061547c38ec2

clone gem build logstash-input-jms.gemspec logstash-plugin install logstash-input-jms-2.1.0-java.gem (changed the version to 2.1 in my fork)

AgentW4C commented 7 years ago

I have tested the newest release v3.0.0 of the plugin (includes the commit from @gjelu) installed in logstash 5.1.2 with the scenario from @takearun and didn't encounter issues anymore.

arun-a-nayagam commented 7 years ago

Hi, Apologies, I don't know how to upgrade my 2.0.3 plugin I tried installing the plugin,

bin/logstash-plugin install logstash-input-jms
Validating logstash-input-jms
Installing logstash-input-jms
Plugin not found, aborting
ERROR: Installation Aborted, message: Could not find gem 'logstash-input-jms-3.0.0 (>= 0) java' in any of the gem sources listed in your Gemfile or installed on this machine.

So I tried updating it, I get,

-bash-3.2$ bin/logstash-plugin update logstash-input-jms-3.0.0
Updating logstash-input-jms-3.0.0
Plugin not found, aborting
ERROR: Updated Aborted, message: Could not find gem 'logstash-input-jms-3.0.0'.

This doesn't work as well

-bash-3.2$ bin/logstash-plugin update logstash-input-jms      
Updating logstash-input-jms
Plugin not found, aborting
ERROR: Updated Aborted, message: Could not find gem 'logstash-input-jms-3.0.0 (>= 0) java' in any of the gem sources listed in your Gemfile or installed on this machine.

Can you please help me.

Thanks, Arun

acchen97 commented 7 years ago

@arun-a-nayagam what version of Logstash are you using? I just tried with 5.2.0 and it worked fine as well.

arun-a-nayagam commented 7 years ago

I installed a 2.0.3 before, on top of it I tried installing like this, bin/logstash-plugin install logstash-input-jms

And I am seeing errors I have listed above.

AgentW4C commented 7 years ago

@arun-a-nayagam The question was about the version of Logstash, not the logstash-input-jms plugin. This doesn't seem to be an issue with the plugin itself. Do you have internet access via proxy or directly? You can't update a plugin without an access to internet. See https://github.com/elastic/logstash/issues/6619 in case of proxy. If it doesn't help, try to use

bin/logstash-plugin list --verbose | grep logstash-input-jms

to check the plugin version,

bin/logstash-plugin remove logstash-input-jms

to start with clean table and then

bin/logstash-plugin install logstash-input-jms bin/logstash-plugin update logstash-input-jms