Hello,
I am currently developing a system to control the lights of our shop
floor. I'm using Quartz.NET as the scheduling engine.
Currently the scheduling host is a simple console application that
starts Quartz with Remoting enabled. When using the RAMJobStore
everything works great. I can remotely schedule the lights to turn on
and off at specific times/etc. However, now I tried to enable the
ADOJobStore and nothing seems to work correctly. I can connect to the
scheduler 3 times before it decides to shutdown. If I try to add a
trigger than the Quartz shutdowns immediately. Does anyone know how
to resolve these issues? If I revert back to the RAMJobStore
everything works.
The way I wrote the application is very simple (although maybe
incorrect). Basically our lights are broken down into 24 Areas. In
Quartz, for each area I create two jobs (AreaName_ON and
AreaName_OFF). When the Client application runs and the user wants to
look at an area for the schedule times, I check if those jobs are
created in Quartz; if not, then I create them (the jobs) on the fly).
Now, each time they want the light to turn on/off I create new
triggers and assign them to the job for that area (either AreaName_ON
or AreaName_OFF). Again, this works great in RAMJobStore, but in the
ADOJobStore, the scheduler shuts down as soon as I try to assign a
trigger.
Perhaps there are some limitations of Quartz.NET and ADOJobStore that
I am not aware of?
Below are some configurations I have:
Quartz Host:
-The Server is a Virtual Machine (Vmware ESXi 3.5)
-Physical Spec: Intel Xeon 2.4Ghz Quad, 16 GB RAM, Connected to a SAN)
Database Server (tried both):
-Microsoft SQL 2008 Standard (running on a 3.4 Ghz Intel Xeon, 8 GB
RAM, and 15k RPM Hard Drives)
-Microsoft SQL 2005 Express (running on the same machine as the Quartz
Service; Quartz is the only DB it runs)
**Both SQL Servers has the same affect**
Config File of Quartz Host:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="quartz"
type="System.Configuration.NameValueSectionHandler, System,
Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" /
>
<sectionGroup name="common">
<section name="logging"
type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
</sectionGroup>
</configSections>
<common>
<logging>
<factoryAdapter
type="Common.Logging.Simple.ConsoleOutLoggerFactoryAdapter,
Common.Logging">
<arg key="showLogName" value="true" />
<arg key="showDataTime" value="true" />
<arg key="level" value="DEBUG" />
<arg key="dateTimeFormat" value="HH:mm:ss:fff" />
</factoryAdapter>
</logging>
</common>
<quartz>
<add key="quartz.scheduler.exporter.type"
value="Quartz.Simpl.RemotingSchedulerExporter, Quartz" />
<add key="quartz.scheduler.exporter.port" value="555" />
<add key="quartz.scheduler.exporter.bindName"
value="QuartzScheduler" />
<add key="quartz.scheduler.exporter.channelType" value="tcp" />
<add key="quartz.scheduler.exporter.type"
value="Quartz.Simpl.RemotingSchedulerExporter, Quartz" />
<add key="quartz.scheduler.instanceName" value="FMSystem" />
<add key="quartz.threadPool.type"
value="Quartz.Simpl.SimpleThreadPool, Quartz" />
<add key="quartz.threadPool.threadCount" value="5" />
<add key="quartz.threadPool.threadPriority" value="2" />
<add key="quartz.jobStore.misfireThreshold" value="60000" />
<!--<<add key="quartz.jobStore.type"
value="Quartz.Simpl.RAMJobStore, Quartz" />-->
<add key="quartz.jobStore.type"
value="Quartz.Impl.AdoJobStore.JobStoreTX, Quartz" />
<add key="quartz.jobStore.driverDelegateType"
value="Quartz.Impl.AdoJobStore.StdAdoDelegate, Quartz" />
<add key="quartz.jobStore.tablePrefix" value="QRTZ_" />
<add key="quartz.jobStore.dataSource" value="myDS" />
<add key="quartz.dataSource.myDS.connectionString"
value="Server=localhost;Database=Quartz;integrated security=true;" />
<add key="quartz.dataSource.myDS.provider" value="SqlServer-20" /
>
</quartz>
<system.diagnostics>
<sources>
<!-- This section defines the logging configuration for
My.Application.Log -->
<source name="DefaultSource" switchName="DefaultSwitch">
<listeners>
<add name="FileLog"/>
<!-- Uncomment the below section to write to the Application
Event Log -->
<!--<add name="EventLog"/>-->
</listeners>
</source>
</sources>
<switches>
<add name="DefaultSwitch" value="Information" />
</switches>
<sharedListeners>
<add name="FileLog"
type="Microsoft.VisualBasic.Logging.FileLogTraceListener,
Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
initializeData="FileLogWriter"/>
<!-- Uncomment the below section and replace APPLICATION_NAME
with the name of your application to write to the Application Event
Log -->
<!--<add name="EventLog"
type="System.Diagnostics.EventLogTraceListener"
initializeData="APPLICATION_NAME"/> -->
</sharedListeners>
</system.diagnostics>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_FMDInterface"
closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00"
sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8"
transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192"
maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None"
proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName"
algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="
http://xxx.com:8080/FMDInterface"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_FMDInterface"
contract="FMDServer.FMDInterface"
name="BasicHttpBinding_FMDInterface" />
</client>
</system.serviceModel>
</configuration>
Quartz Host Console Messages:
C:\Test Programs\sched 2>FM.SchedulerHost_Console.exe
17:45:11:251 [INFO] Quartz.Util.DBConnectionManager - Registering
datasource 'm
yDS' with db provider: 'Quartz.Impl.AdoJobStore.Common.DbProvider'
17:45:11:329 [INFO] Quartz.Simpl.RemotingSchedulerExporter -
Registering remoti
ng channel of type 'System.Runtime.Remoting.Channels.Tcp.TcpChannel'
to port (55
5)
17:45:11:329 [INFO] Quartz.Simpl.RemotingSchedulerExporter - Remoting
channel r
egistered successfully
17:45:11:329 [INFO] Quartz.Simpl.RemotingSchedulerExporter -
Successfully marha
lled remotable scheduler under name 'QuartzScheduler'
17:45:11:329 [INFO] Quartz.Core.SchedulerSignalerImpl - Initialized
Scheduler S
ignaller of type: Quartz.Core.SchedulerSignalerImpl
17:45:11:329 [INFO] Quartz.Core.QuartzScheduler - Quartz Scheduler v.
1.0.0.3 cr
eated.
17:45:11:329 [INFO] Quartz.Impl.AdoJobStore.JobStoreTX - Using thread
monitor-b
ased data access locking (synchronization).
17:45:11:329 [INFO] Quartz.Impl.AdoJobStore.JobStoreTX - JobStoreTX
initialized
.
17:45:11:329 [INFO] Quartz.Impl.StdSchedulerFactory - Quartz
scheduler 'FMSyste
m' initialized
17:45:11:329 [INFO] Quartz.Impl.StdSchedulerFactory - Quartz
scheduler version:
1.0.0.3
17:45:11:329 [INFO] FM.SchedulerLibrary.Quartz - -------
Initialization Complet
e -----------
17:45:11:329 [INFO] FM.SchedulerLibrary.Quartz - ------- Starting
Scheduler ---
-------------
17:45:11:345 [DEBUG] Quartz.Impl.AdoJobStore.SimpleSemaphore - Lock
'TRIGGER_ACC
ESS' is desired by:
17:45:11:376 [DEBUG] Quartz.Impl.AdoJobStore.SimpleSemaphore - Lock
'TRIGGER_ACC
ESS' is being obtained:
17:45:11:376 [DEBUG] Quartz.Impl.AdoJobStore.SimpleSemaphore - Lock
'TRIGGER_ACC
ESS' given to:
17:45:11:501 [INFO] Quartz.Impl.AdoJobStore.JobStoreTX - Freed 0
triggers from
'acquired' / 'blocked' state.
17:45:11:501 [DEBUG] Quartz.Impl.AdoJobStore.JobStoreTX - Found 0
triggers that
missed their scheduled fire-time.
17:45:11:501 [INFO] Quartz.Impl.AdoJobStore.JobStoreTX - Recovering 0
jobs that
were in-progress at the time of the last shut-down.
17:45:11:501 [INFO] Quartz.Impl.AdoJobStore.JobStoreTX - Recovery
complete.
17:45:11:501 [INFO] Quartz.Impl.AdoJobStore.JobStoreTX - Removed 0
'complete' t
riggers.
17:45:11:517 [INFO] Quartz.Impl.AdoJobStore.JobStoreTX - Removed 0
stale fired
job entries.
17:45:11:517 [DEBUG] Quartz.Impl.AdoJobStore.SimpleSemaphore - Lock
'TRIGGER_ACC
ESS' retuned by:
17:45:11:517 [INFO] Quartz.Core.QuartzScheduler - Scheduler FMSystem_
$_NON_CLUS
TERED started.
17:45:11:517 [DEBUG] Quartz.Impl.AdoJobStore.SimpleSemaphore - Lock
'TRIGGER_ACC
ESS' is desired by: FMSystem_QuartzSchedulerThread
17:45:11:517 [DEBUG] Quartz.Impl.AdoJobStore.SimpleSemaphore - Lock
'TRIGGER_ACC
ESS' is being obtained: FMSystem_QuartzSchedulerThread
17:45:11:517 [DEBUG] Quartz.Impl.AdoJobStore.SimpleSemaphore - Lock
'TRIGGER_ACC
ESS' given to: FMSystem_QuartzSchedulerThread
17:45:11:517 [INFO] FM.SchedulerLibrary.Quartz - ------- Started
Scheduler ----
-------------
17:45:11:517 [DEBUG] Quartz.Impl.AdoJobStore.JobStoreTX -
MisfireHandler: scanni
ng for misfires...
17:45:11:532 [DEBUG] Quartz.Impl.AdoJobStore.SimpleSemaphore - Lock
'TRIGGER_ACC
ESS' retuned by: FMSystem_QuartzSchedulerThread
17:45:11:532 [DEBUG] Quartz.Impl.AdoJobStore.JobStoreTX - Found 0
triggers that
missed their scheduled fire-time.
17:45:20:845 [DEBUG] Quartz.Impl.AdoJobStore.SimpleSemaphore - Lock
'TRIGGER_ACC
ESS' is desired by:
17:45:20:845 [DEBUG] Quartz.Impl.AdoJobStore.SimpleSemaphore - Lock
'TRIGGER_ACC
ESS' is being obtained:
17:45:20:845 [DEBUG] Quartz.Impl.AdoJobStore.SimpleSemaphore - Lock
'TRIGGER_ACC
ESS' given to:
17:45:20:861 [DEBUG] Quartz.Impl.AdoJobStore.SimpleSemaphore - Lock
'TRIGGER_ACC
ESS' retuned by:
17:45:20:861 [DEBUG] Quartz.Impl.AdoJobStore.SimpleSemaphore - Lock
'TRIGGER_ACC
ESS' is desired by:
17:45:20:861 [DEBUG] Quartz.Impl.AdoJobStore.SimpleSemaphore - Lock
'TRIGGER_ACC
ESS' is being obtained:
17:45:20:861 [DEBUG] Quartz.Impl.AdoJobStore.SimpleSemaphore - Lock
'TRIGGER_ACC
ESS' given to:
17:45:20:861 [DEBUG] Quartz.Impl.AdoJobStore.SimpleSemaphore - Lock
'TRIGGER_ACC
ESS' retuned by:
17:45:26:517 [INFO] Quartz.Core.QuartzScheduler - Scheduler FMSystem_
$_NON_CLUS
TERED shutting down.
17:45:26:533 [INFO] Quartz.Core.QuartzScheduler - Scheduler FMSystem_
$_NON_CLUS
TERED paused.
17:45:26:533 [INFO] Quartz.Simpl.RemotingSchedulerExporter -
Successfully disco
nnected remotable sceduler
17:45:26:533 [INFO] Quartz.Core.QuartzScheduler - Scheduler FMSystem_
$_NON_CLUS
TERED Shutdown complete.
17:45:26:767 [DEBUG] Quartz.Simpl.SimpleThreadPool - WorkerThread is
shutting do
wn
17:45:26:767 [DEBUG] Quartz.Simpl.SimpleThreadPool - WorkerThread is
shutting do
wn
17:45:26:767 [DEBUG] Quartz.Simpl.SimpleThreadPool - WorkerThread is
shutting do
wn
17:45:26:767 [DEBUG] Quartz.Simpl.SimpleThreadPool - WorkerThread is
shutting do
wn
17:45:26:767 [DEBUG] Quartz.Simpl.SimpleThreadPool - WorkerThread is
shutting do
wn
17:45:26:767 [DEBUG] Quartz.Simpl.SimpleThreadPool - WorkerThread is
shutting do
wn
17:45:26:767 [DEBUG] Quartz.Simpl.SimpleThreadPool - WorkerThread is
shutting do
wn
17:45:26:767 [DEBUG] Quartz.Simpl.SimpleThreadPool - WorkerThread is
shutting do
wn
17:45:26:767 [DEBUG] Quartz.Simpl.SimpleThreadPool - WorkerThread is
shutting do
wn
17:45:26:767 [DEBUG] Quartz.Simpl.SimpleThreadPool - WorkerThread is
shutting do
wn
Thanks in Advance!!