# Lock held by this virtual machine on lock path

**URL:** <https://discuss.elastic.co/t/lock-held-by-this-virtual-machine-on-lock-path/145804>\
**Category:** Logstash\
**Created:** [August 23, 2018, 8:45pm UTC](https://discuss.elastic.co/t/lock-held-by-this-virtual-machine-on-lock-path/145804 "2018-08-23T20:45:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hixian](https://avatars.discourse-cdn.com/v4/letter/h/f04885/32.png) [@hixian](https://discuss.elastic.co/u/hixian)\
**Post date:** [August 23, 2018, 8:45pm UTC](https://discuss.elastic.co/t/lock-held-by-this-virtual-machine-on-lock-path/145804/1 "2018-08-23T20:45:57Z")

</div>

Hi. I have the following error on Logstash:

[2018-08-23T20:07:28,324][DEBUG][logstash.agent] Executing action {:action=\>LogStash::PipelineAction::Create/pipeline\_id:heartbeat-infinite-analytics}  
[2018-08-23T20:07:28,331][ERROR][org.logstash.execution.AbstractPipelineExt] Logstash failed to create queue.  
org.logstash.LockException: The queue failed to obtain exclusive access, cause: Lock held by this virtual machine on lock path: /srv/elk-data/lib/logstash/queue/heartbeat-infinite-analytics/.lock  
at org.logstash.ackedqueue.Queue.open(Queue.java:262) ~[logstash-core.jar:?]  
at org.logstash.ackedqueue.ext.JRubyAckedQueueExt.open(JRubyAckedQueueExt.java:97) ~[logstash-core.jar:?]  
at org.logstash.ackedqueue.ext.JRubyWrappedAckedQueueExt.initialize(JRubyWrappedAckedQueueExt.java:39) ~[logstash-core.jar:?]  
at org.logstash.ackedqueue.QueueFactoryExt.create(QueueFactoryExt.java:37) ~[logstash-core.jar:?]  
at org.logstash.execution.AbstractPipelineExt.initialize(AbstractPipelineExt.java:130) [logstash-core.jar:?]  
at org.logstash.execution.AbstractPipelineExt$INVOKER$i$3$0$initialize.call(AbstractPipelineExt$INVOKER$i$3$0$initialize.gen) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodThree.call(JavaMethod.java:1186) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:743) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuper(IRRuntimeHelpers.java:983) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuperSplatArgs(IRRuntimeHelpers.java:974) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.ir.targets.InstanceSuperInvokeSite.invoke(InstanceSuperInvokeSite.java:39) [jruby-complete-9.1.13.0.jar:?]  
at usr.share.logstash.logstash\_minus\_core.lib.logstash.pipeline.RUBY$method$initialize$0(/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:22) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:77) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:93) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuper(IRRuntimeHelpers.java:983) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuperSplatArgs(IRRuntimeHelpers.java:974) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.ir.targets.InstanceSuperInvokeSite.invoke(InstanceSuperInvokeSite.java:39) [jruby-complete-9.1.13.0.jar:?]  
at usr.share.logstash.logstash\_minus\_core.lib.logstash.pipeline.RUBY$method$initialize$0(/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:90) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:77) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:93) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:298) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:79) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:83) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.RubyClass.newInstance(RubyClass.java:1022) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.RubyClass$INVOKER$i$newInstance.call(RubyClass$INVOKER$i$newInstance.gen) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:145) [jruby-complete-9.1.13.0.jar:?]  
at usr.share.logstash.logstash\_minus\_core.lib.logstash.pipeline\_action.create.RUBY$method$execute$0(/usr/share/logstash/logstash-core/lib/logstash/pipeline\_action/create.rb:38) [jruby-complete-9.1.13.0.jar:?]  
at usr.share.logstash.logstash\_minus\_core.lib.logstash.pipeline\_action.create.RUBY$method$execute$0$ **VARARGS** (/usr/share/logstash/logstash-core/lib/logstash/pipeline\_action/create.rb) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.internal.runtime.methods.CompiledIRMethod.call(CompiledIRMethod.java:77) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:93) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:145) [jruby-complete-9.1.13.0.jar:?]  
at usr.share.logstash.logstash\_minus\_core.lib.logstash.agent.RUBY$block$converge\_state$2(/usr/share/logstash/logstash-core/lib/logstash/agent.rb:309) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.runtime.CompiledIRBlockBody.callDirect(CompiledIRBlockBody.java:145) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:71) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.runtime.Block.call(Block.java:124) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.RubyProc.call(RubyProc.java:289) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.RubyProc.call(RubyProc.java:246) [jruby-complete-9.1.13.0.jar:?]  
at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:104) [jruby-complete-9.1.13.0.jar:?]  
at java.lang.Thread.run(Thread.java:748) [?:1.8.0\_181]

I researched and did not find the solution. How can I solve? Thx

Elasticsearch: 6.4.0  
Logstash: 6.4.0  
Kibana: 6.4.0

---

<div class="post-metadata">

**Author:** ![panaman](https://avatars.discourse-cdn.com/v4/letter/p/3da27b/32.png) [@panaman](https://discuss.elastic.co/u/panaman)\
**Post date:** [September 18, 2018, 8:59pm UTC](https://discuss.elastic.co/t/lock-held-by-this-virtual-machine-on-lock-path/145804/2 "2018-09-18T20:59:49Z")

</div>

i am seeing the same behavior, looks like a bug in 6.4.0

> <https://github.com/elastic/logstash/issues/9978>

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 16, 2018, 8:59pm UTC](https://discuss.elastic.co/t/lock-held-by-this-virtual-machine-on-lock-path/145804/3 "2018-10-16T20:59:53Z")

</div>

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