Windows服务无法自动启动(尝试自动延迟和两种类型的登录)

时间:2015-02-13 10:03:01

标签: c# .net windows-services

我有一个Windows服务,当我们手动启动它时启动正常,但当我们将其设置为automaticautomatic (delayed start)时,它(大部分时间)拒绝自行启动。

登录通常是我拥有的域帐户(myname@mycompany.com),但即使我将登录类型设置为Local System account,服务也无法自行启动。

该服务是Quartz.NET作业调度服务,但我不确定当我可以手动启动它时应该如何相关。该服务使用.NET framework 4.5以C#编写。

更新:我意识到我的服务正在记录以下代码,因为它无法自行重启:

2015-02-13 15:09:15,674 [1] ERROR Quartz.Server.QuartzServer [(null)] - Server initialization failed:Unable to bind scheduler to remoting.
Quartz.SchedulerException: Unable to bind scheduler to remoting. ---> System.Net.Sockets.SocketException: No such host is known
   at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
   at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
   at System.Runtime.Remoting.Channels.CoreChannel.GetMachineIp()
   at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.SetupMachineName()
   at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor(IDictionary properties, IServerChannelSinkProvider sinkProvider, IAuthorizeRemotingConnection authorizeCallback)
   at System.Runtime.Remoting.Channels.Tcp.TcpChannel..ctor(IDictionary properties, IClientChannelSinkProvider clientSinkProvider, IServerChannelSinkProvider serverSinkProvider)
   at Quartz.Simpl.RemotingSchedulerExporter.RegisterRemotingChannelIfNeeded()
   at Quartz.Simpl.RemotingSchedulerExporter.Bind(IRemotableQuartzScheduler scheduler)
   at Quartz.Core.QuartzScheduler.Bind()
   at Quartz.Core.QuartzScheduler.Initialize()
   --- End of inner exception stack trace ---
   at Quartz.Core.QuartzScheduler.Initialize()
   at Quartz.Impl.StdSchedulerFactory.Instantiate()
   at Quartz.Impl.StdSchedulerFactory.GetScheduler()
   at Quartz.Server.QuartzServer.Initialize() [See nested exception: System.Net.Sockets.SocketException (0x80004005): No such host is known
   at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
   at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
   at System.Runtime.Remoting.Channels.CoreChannel.GetMachineIp()
   at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.SetupMachineName()
   at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor(IDictionary properties, IServerChannelSinkProvider sinkProvider, IAuthorizeRemotingConnection authorizeCallback)
   at System.Runtime.Remoting.Channels.Tcp.TcpChannel..ctor(IDictionary properties, IClientChannelSinkProvider clientSinkProvider, IServerChannelSinkProvider serverSinkProvider)
   at Quartz.Simpl.RemotingSchedulerExporter.RegisterRemotingChannelIfNeeded()
   at Quartz.Simpl.RemotingSchedulerExporter.Bind(IRemotableQuartzScheduler scheduler)
   at Quartz.Core.QuartzScheduler.Bind()
   at Quartz.Core.QuartzScheduler.Initialize()]

0 个答案:

没有答案