【问题标题】:The specified service does not exist as an installed service指定的服务不作为已安装的服务存在
【发布时间】:2017-10-09 13:15:33
【问题描述】:

我从 tomcat 收到此错误:

The specified service does not exist as an installed service.
Unable to open the service “tomcat8”

那么应用程序根本不会启动,

所以我打开命令行并安装了服务:

    tomcat8.exe //IS//tomcat_8_ServiceName    

但仍然面临同样的问题
假设我在同一个盒子上有多个 tomcat,
exe文件tomcat8w.exe从哪里获取服务名?

【问题讨论】:

标签: tomcat


【解决方案1】:

请注意,使用位于 bin 目录中的 service.bat 脚本更容易将 Tomcat 安装为服务(JVM 参数等是自动添加的,而不是使用 tomcat7.exe //IS//xx 完成的)。如果你使用它,至少对于 Tomcat 7,就像我的情况一样,你使用命令

service.bat install myService

创建的服务名为“Apache Tomcat myService”,然后可以使用 tomcat7w 进行编辑,如下所示:

tomcat7w.exe //ES//myService

即以下将不起作用并产生上述错误:

tomcat7w.exe //ES//"Apache Tomcat myService"

【讨论】:

    【解决方案2】:

    经过几个小时的努力,我使用服务安装程序安装了新的 tomcat,只是为了看看它在做什么,显然安装程序更改了可执行 .exe 文件的名称以匹配服务名称。

    所以如果你运行

     tomcat8w.exe  
    

    它将寻找服务名称:tomcat8

    所以我回到了旧的 tomcat 目录,并在使用命令安装服务后:

     tomcat8.exe //IS//tomcat_8_ServiceName  
    

    我将可执行文件从 tomcat8w.exe 重命名为 tomcat_8_ServiceNamew.exe

    现在它就像一个魅力!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-11-16
      • 1970-01-01
      • 1970-01-01
      • 2016-11-08
      • 2011-11-26
      • 2016-12-30
      • 1970-01-01
      • 2011-05-13
      相关资源
      最近更新 更多