我在将 Jenkins 安装为 Windows 服务时遇到问题: 这是错误日志:
Error
Installing a service
[.jenkins] $ C:\Users\Lenovo-I7\.jenkins\jenkins.exe install
2019-08-17 15:43:47,662 INFO - Installing the service with id 'jenkins'
Service with id 'jenkins' already exists
To install the service, delete the existing one or change service Id in the configuration file
2019-08-17 15:43:47,667 FATAL - Unhandled exception
System.Exception: Installation failure: Service with id 'jenkins' already exists
at winsw.WrapperService.Run(String[] _args, ServiceDescriptor descriptor)
at winsw.WrapperService.Main(String[] args)
System.Exception: Installation failure: Service with id 'jenkins' already exists
at winsw.WrapperService.Run(String[] _args, ServiceDescriptor descriptor)
at winsw.WrapperService.Main(String[] args)
我之前也曾在我的系统中安装过 Jenkins,但我遇到了一些问题,所以我卸载了它并重新安装了它。现在我遇到了这个问题。 任何帮助,将不胜感激。 谢谢
最佳答案
正如错误所示,必须有一些名为 jenkins
的现有服务。要删除它,请使用提升的权限(即以管理员身份运行)打开命令提示符,然后键入命令:sc delete jenkins
有关sc
命令的更多详细信息,您可以引用this页。
关于java - 将 Jenkins 安装为 Windows 服务时出现错误 "Service with id ' jenkins' 已存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57535390/