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.
我只是不明白爲什麼會發生這種情況。 我試着添加更多的錯誤記錄,但沒有出現。
以前有過這個嗎?任何想法如何讓這個「粘滯」服務停止運行,即使在卸載後?
謝謝