Quartz.NET 3.0.6 Clustering the SQL Server 2014

424 views
Skip to first unread message

artl...@gmail.com

unread,
Aug 20, 2018, 4:56:29 AM8/20/18
to Quartz.NET
Hi everyone,

I recently started using Quartz.NET and I'm trying to add clustering support to the application I am working on.
I'm using SQL Server 2014 for the database.
When I set 'cluster = true' in the configuration and run the application, it immediately crashes with the following exception:
Quartz.Impl.AdoJobStore.LockException: Failure obtaining db row lock: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR. ---> System.Data.SqlClient.SqlException: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR.
With 'cluster=false' it works fine, so accessing the database is not the problem. 

Here is the configuration I have for Quartz.NET:
NameValueCollection props = new NameValueCollection
{
{ "quartz.serializer.type", "binary" },
{ "quartz.scheduler.instanceId", "AUTO" },
{ "quartz.jobStore.clustered", "true" },
{ "quartz.jobStore.type", "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz" },
{ "quartz.jobStore.driverDelegateType", "Quartz.Impl.AdoJobStore.StdAdoDelegate, Quartz" },
{ "quartz.jobStore.tablePrefix", "QRTZ_" },
{ "quartz.dataSource.myDS.connectionString", "[my connection string]" },
{ "quartz.dataSource.myDS.provider", "SqlServer" },
{ "quartz.jobStore.dataSource", "myDS" },
};

I'm probably missing something obvious, but I spent a few hours trying to find what I'm doing wrong without much success. 
Any help would be appreciated.

artl...@gmail.com

unread,
Aug 20, 2018, 10:20:40 AM8/20/18
to Quartz.NET
I've tested on SQL Server 2008, and I'm getting the same error.
Maybe it's something about the way the tables are setup?

Marko Lahma

unread,
Aug 20, 2018, 4:47:26 PM8/20/18
to quar...@googlegroups.com

 

Try switching to SqlServerDelegate, it should auto-configure quite well.

 

-Marko

--
You received this message because you are subscribed to the Google Groups "Quartz.NET" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quartznet+...@googlegroups.com.
To post to this group, send email to quar...@googlegroups.com.
Visit this group at https://groups.google.com/group/quartznet.
For more options, visit https://groups.google.com/d/optout.

 

artl...@gmail.com

unread,
Aug 21, 2018, 3:05:22 AM8/21/18
to Quartz.NET
Hi Marko,

Thanks! That has done it, and clustering now seems to be working - executing different jobs on two different machines.

- Arthur
Reply all
Reply to author
Forward
0 new messages