简体   繁体   English

Quartz.net 2.2.3-无法启动Windows服务

[英]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. 我目前正在尝试在Windows服务器上使用Quartz.net 2.2.3运行新创建的Web服务。 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. 我知道这与topshelf有关,但我不知道该怎么办。

Thanks. 谢谢。

Try Reinstalling the Quartz Server . 尝试重新安装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" 查找注册表项“ HKEY_LOCAL_MACHINE / SYSTEM / CurrentControlSet /服务”

  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 . 在cmd admin模式下使用命令quartz.service.exe对其进行测试。 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. Windows服务具有系统依赖性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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