2017-03-06 20 views
0

我有一个包含顶部服务的项目,部署脚本卸载并重新安装服务器上的较新版本。拒绝终止的粘性顶部服务

这个很好的工作很长一段时间,直到上周它开始行为不端的原因不明。

现在会发生什么命令:

D:/Deploy/current/net40/MyService.exe uninstall 

打印出这些结果:

The uninstall is beginning. 
2017-03-06T11:21:07 [1] INFO Topshelf.Runtime.Windows.HostInstaller - Uninstalling MyService service 
Removing EventLog source MyService. 
Service MyService is being removed from the system... 
Service MyService was successfully removed from the system. 
Attempt to stop service Halcyon. 
The uninstall has completed. 

但MyService.exe仍然在任务管理器运行。

结果

此命令:

D:/Deploy/current/net40/MyService.exe install --manual 

给出了这样的(预期的)错误:

ERROR Topshelf.Hosts.InstallHost - The MyService service is already installed. 

我试图更新Topshelf到最新版本。 由于另一个奇怪的错误,无法在部署服务器上手动卸载和查杀服务。

Beginning the Install phase of the installation. 
2017-03-06T11:40:08 [1] INFO Topshelf.Runtime.Windows.HostInstaller - Installing MyService service 
Installing service MyService... 
Service MyService has been successfully installed. 

The Install phase completed successfully, and the Commit phase is beginning. 

The Commit phase completed successfully. 

The transacted install has completed. 
INFO MyService.Program - Exiting Main() - exitCode:Ok 
INFO Dozo::Applications::Topshelf - Starting MyService 
INFO Dozo::Applications::Topshelf - Changing MyService to start automatically 
INFO Dozo::Dozo - sc config "MyService" start= auto 
[SC] ChangeServiceConfig SUCCESS 
INFO Dozo::Applications::Topshelf - Starting MyService 
INFO Dozo::Dozo - net start "MyService" 
The MyService service is starting........ 
The MyService service could not be started. 

我只是不明白为什么会发生这种情况。 我试着添加更多的错误记录,但没有出现。

以前有过这个吗?任何想法如何让这个“粘滞”服务停止运行,即使在卸载后?

谢谢

回答

1

您好,您是否尝试删除Windows命令的服务?

打开命令提示符,然后输入

sc delete <service-name>