2015-09-08 102 views
1
服务

我试图安装Tomcat作为Windows Server 2008中不能安装Tomcat 7作为Windows

我搜索在计算器并不能找到任何回答这个问题,我可以服务看到其他所有相关问题都不一样(与代码错误0有关,我的代码错误是1)或者没有有效答案,所以我决定创建这个问题。

我用它来创建服务:

https://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html#Installing_services

tomcat7 //IS//Tomcat7 --DisplayName="Apache Tomcat 7" \ 

的命令后,我可以看到在我的服务列出的Apache Tomcat 7的服务,问题是,它已停止,如果我尝试启动它,我可以看到这个错误:

Windows could not start the Apache Tomcat 7 on Local Computer. For 
more information, review the System Event Log. If this is a 
non-Microsoft service, contact the service vendor, and refer to 
service-specific error code 1. 

在系统事件查看器,我可以看到该日志此错误:

The Apache Tomcat 7 service terminated with service-specific error Incorrect function.. 

我使用的是Java 64位,我同时测试了tomcat 32和64位,两者都有同样的问题。我也tryed打开cmd.exe的具有管理员权限和我有同样的问题...

感谢您的帮助

FYI:如果我开始的startup.bat手动tomcat的,它开始正确

+0

你能否在'HKLM \ SYSTEM \ CurrentControlSet \ Services \ Apache Tomcat 7'上检查你的注册表?有没有子密钥? –

+0

它被称为Services \ Tomcat7不是Apache Tomcat 7,它有很多子项 – NullPointerException

+0

是的,抱歉的名称。是否有'Parameters'子键? –

回答

1

我解决它只要安装与其他方法的服务:

service.bat install 

此命令将卸载服务:

service.bat uninstall 

还要启动它并启用自动启动,您必须进入Windows的服务管理器(西班牙语版的Servicios)并启动该服务并启用自动启动。

如果C和发现的tomcat/bin目录service.bat文件,阅读本:

apache-tomcat-[version].zip or .tar.gz 
     Base distribution. These distributions do not include the Windows service wrapper nor the compiled APR/native library for Windows. 

apache-tomcat-[version]-windows-x86.zip 
     32-bit Windows specific distribution that includes the Windows service wrapper and the compiled APR/native library for use with 32-bit JVMs on both 32 and 64 bit Windows platforms. 

apache-tomcat-[version]-windows-x64.zip 
     64-bit Windows specific distribution that includes the Windows service wrapper and the compiled APR/native library for use with 64-bit JVMs on x64 Windows platforms. 
0

我不能让的Apache Tomcat安装中是Windows 10或Windows 2012服务在运行Service.bat install命令例程会找到JDK,但总是失败,如下所示:Service Install Failed。

我的解决方案:创建一个Windows任务计划任务指向

C:\tomcat7\bin\startup.bat 

,并作出这样的任务,而无需登录系统时系​​统开始启动。在两个操作系统中都很有魅力。

HTH。

-2

打开tomcat7w.exe申请并验证通知。

enter image description here

+0

不完整的答案。 –

0

这是因为你的JDK/Java运行时环境和Tomcat安装不配套。两者必须是32位或64位。

第1步:卸载您的Apache Tomcat。第2步:卸载你的java和jdk。

第2步:下载相同的架构安装。

第3步:重新安装两者。

这将解决您的问题。