Open original-brownbear opened 7 years ago
This diff based on (here) to onstomp.rb seems to fix:
-bash-4.2$ diff -Naur onstomp.rb_SAVE onstomp.rb
--- onstomp.rb_SAVE 2017-10-24 09:53:56.365580722 +0200
+++ onstomp.rb 2017-10-24 09:54:59.629782201 +0200
@@ -87,6 +87,7 @@
class StopReceiver < StandardError; end
class << self
+ SEMAPHORE = Mutex.new
# Creates a new connection and immediately connects it to the broker.
# @see #initialize
def connect(uri, options={})
@@ -118,7 +119,8 @@
# merely initializes an instance variable to 0 if it has not been set,
# then increments this value and returns its string representation.
def next_serial(prefix=nil)
- Thread.exclusive do
+ # Thread.exclusive do
+ SEMAPHORE.synchronize do
@next_serial_sequence ||= 0
@next_serial_sequence += 1
@next_serial_sequence.to_s
One user ran into the same issue here. Is this bug been worked on a fix?
Error message:
[2019-02-22T10:11:56,725][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
Thread.exclusive is deprecated, use Mutex
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp.rb:121:in `next_serial'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/components/scopes/transaction_scope.rb:189:in `next_transaction_id'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/components/scopes/transaction_scope.rb:47:in `begin_with_transaction'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/components/scopes/transaction_scope.rb:160:in `perform'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/components/scopes.rb:24:in `block in transaction'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/components/scopes.rb:23:in `tap'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/components/scopes.rb:23:in `transaction'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-stomp-3.0.9/lib/logstash/outputs/stomp.rb:77:in `multi_receive'
/CBGM/logstash-6.3.1/logstash-core/lib/logstash/pipeline.rb:475:in `multi_receive'
/CBGM/logstash-6.3.1/logstash-core/lib/logstash/pipeline.rb:475:in `block in output_batch'
/CBGM/logstash-6.3.1/logstash-core/lib/logstash/pipeline.rb:474:in `each'
/CBGM/logstash-6.3.1/logstash-core/lib/logstash/pipeline.rb:474:in `output_batch'
/CBGM/logstash-6.3.1/logstash-core/lib/logstash/pipeline.rb:426:in `worker_loop'
/CBGM/logstash-6.3.1/logstash-core/lib/logstash/pipeline.rb:384:in `block in start_workers'
Thread.exclusive is deprecated, use Mutex
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp.rb:121:in `next_serial'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/components/scopes/transaction_scope.rb:189:in `next_transaction_id'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/components/scopes/transaction_scope.rb:47:in `begin_with_transaction'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/components/scopes/transaction_scope.rb:160:in `perform'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/components/scopes.rb:24:in `block in transaction'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/components/scopes.rb:23:in `tap'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/components/scopes.rb:23:in `transaction'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-stomp-3.0.9/lib/logstash/outputs/stomp.rb:77:in `multi_receive'
/CBGM/logstash-6.3.1/logstash-core/lib/logstash/pipeline.rb:475:in `multi_receive'
/CBGM/logstash-6.3.1/logstash-core/lib/logstash/pipeline.rb:475:in `block in output_batch'
/CBGM/logstash-6.3.1/logstash-core/lib/logstash/pipeline.rb:474:in `each'
/CBGM/logstash-6.3.1/logstash-core/lib/logstash/pipeline.rb:474:in `output_batch'
/CBGM/logstash-6.3.1/logstash-core/lib/logstash/pipeline.rb:426:in `worker_loop'
/CBGM/logstash-6.3.1/logstash-core/lib/logstash/pipeline.rb:384:in `block in start_workers'
Thread.exclusive is deprecated, use Mutex
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp.rb:121:in `next_serial'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/components/scopes/transaction_scope.rb:189:in `next_transaction_id'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/components/scopes/transaction_scope.rb:47:in `begin_with_transaction'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/components/scopes/transaction_scope.rb:160:in `perform'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/components/scopes.rb:24:in `block in transaction'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/components/scopes.rb:23:in `tap'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/onstomp-1.0.10/lib/onstomp/components/scopes.rb:23:in `transaction'
/CBGM/logstash-6.3.1/vendor/bundle/jruby/2.3.0/gems/logstash-output-stomp-3.0.9/lib/logstash/outputs/stomp.rb:77:in `multi_receive'
I'm now getting this when starting up Logstash v7.2
Jul 1 23:53:32 pass logstash[12910]: Thread.exclusive is deprecated, use Thread::Mutex
Jul 1 23:53:35 pass logstash[12910]: Sending Logstash logs to /var/log/logstash which is now configured via log4j2.properties
Jul 1 23:53:35 pass logstash[12910]: [2019-07-01T23:53:35,645][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"7.2.0"}
getting the error in v7.3
.\bin\logstash.bat : Thread.exclusive is deprecated, use Thread::Mutex
At line:1 char:1
+ .\bin\logstash.bat
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Thread.exclusiv...e Thread::Mutex:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Also have it in 7.4.2 :
Thread.exclusive is deprecated, use Thread::Mutex
Running this plugin with LS
6.x
results in the following error being logged for seemingly every event:Looks like JRuby 9k changed/deprecated something that we should adjust for :)