michaelklishin / quartz-mongodb

A MongoDB-based store for the Quartz scheduler. This fork strives to be as feature complete as possible. Originally by MuleSoft.
Other
249 stars 203 forks source link

Failed to acquire trigger due to a lock, reason: WriteError #108

Closed emk888 closed 8 years ago

emk888 commented 8 years ago

Does somebody have an idea or a hint why this is happening? It is only one job and one trigger which is executed every 15 sec.

Tested with mongo:3.2.1 and mongo:3.2.6

Log: c.n.quartz.mongodb.MongoDBJobStore: Found 1 triggers which are eligible to be run. c.n.quartz.mongodb.MongoDBJobStore: Inserting lock for trigger TriggerGroup.TriggerName c.n.quartz.mongodb.MongoDBJobStore: Failed to acquire trigger TriggerGroup.TriggerName due to a lock, reason: WriteError{code=11000, message='E11000 duplicate key error collection: morphia.qrtz_locks index: keyGroup_1_keyName_1 dup key: { : "TriggerGroup", : "TriggerName" }', details={ }} c.n.quartz.mongodb.MongoDBJobStore: Removing trigger lock TriggerGroup.TriggerName.NON_CLUSTERED c.n.quartz.mongodb.MongoDBJobStore: Trigger lock TriggerGroup.TriggerName.NON_CLUSTERED removed.

michaelklishin commented 8 years ago

There was a duplicate key in a collection. It's really hard to tell why that might be. If you find a way to reproduce this, please reopen.