简体   繁体   中英

Quartz.net 2.2.3 - Unable to start windows service

I'm currently trying to run a newly created webservice with Quartz.net 2.2.3 on my windows server. But I'm getting the following error:

Topshelf.Hosts.StartHost Error: 0 : The service failed to start., System.Invalid
OperationException: Cannot start service QuartzTest on computer '.'. ---> System
.ComponentModel.Win32Exception: The service did not respond to the start or cont
rol request in a timely fashion
   --- End of inner exception stack trace ---
   at System.ServiceProcess.ServiceController.Start(String[] args)
   at Topshelf.Runtime.Windows.WindowsHostEnvironment.StartService(String servic
eName)
   at Topshelf.Hosts.StartHost.Run()

This is the configuration that I'm using:

quartz.scheduler.instanceName = ServerScheduler

quartz.jobStore.type = Quartz.Impl.AdoJobStore.JobStoreTX, Quartz
quartz.jobStore.useProperties = true
quartz.jobStore.dataSource = default
quartz.jobStore.driverDelegateType = Quartz.Impl.AdoJobStore.SqlServerDelegate, Quartz
quartz.jobStore.tablePrefix = QRTZ_
# if running MS SQL Server we need this
quartz.jobStore.lockHandler.type = Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz

quartz.dataSource.default.connectionString = {connectionstring}
quartz.dataSource.default.provider = SqlServer-20

# configure thread pool info
quartz.threadPool.type = Quartz.Simpl.SimpleThreadPool, Quartz
quartz.threadPool.threadCount = 1
quartz.threadPool.threadPriority = Normal

# job initialization plugin handles our xml reading, without it defaults are used -->
quartz.plugin.xml.type = Quartz.Plugin.Xml.JobInitializationPlugin, Quartz
quartz.plugin.xml.fileNames = ~/quartz_jobs.xml

# export this server to remoting context
quartz.scheduler.exporter.type = Quartz.Simpl.RemotingSchedulerExporter, Quartz
quartz.scheduler.exporter.port = 571
quartz.scheduler.exporter.bindName = QuartzServerTest
quartz.scheduler.exporter.channelType = tcp

I know that it's related to topshelf, but I don't know what to do.

Thanks.

Try Reinstalling the Quartz Server . You can uninstall it clear it from registry using How to delete a service manually

  1. Open Regedit

  2. Find the registry entry "HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services"

  3. Look for the service there and delete it. You can look at the keys to know what files the service was using and delete them as well (if necessary).

Then re-install the quartz server . Test it using the command quartz.service.exe in cmd admin mode . and then try Your stuff again . Hope this will help to some extent . Note : This may not be your final solution but will you figure out the error . as windows services has system dependencies.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM