Java Tomcat 6.0.18 服务不会在 Windows 服务器上启动
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/141411/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Tomcat 6.0.18 service will not start on a windows server
提问by ScArcher2
I installed Tomcat 6.0.18 on a windows server 2003 box and it will not start as a service. I'm running it with jdk 1.6.0_07.
我在 Windows Server 2003 机器上安装了 Tomcat 6.0.18,但它不会作为服务启动。我用 jdk 1.6.0_07 运行它。
It runs when I start it with tomcat6.exe.
当我用 tomcat6.exe 启动它时它会运行。
I got a vague error in the System Event Log on Windows.
我在 Windows 上的系统事件日志中有一个模糊的错误。
The Apache Tomcat 6 service terminated with service-specific error 0 (0x0).
Apache Tomcat 6 服务因特定于服务的错误 0 (0x0) 而终止。
采纳答案by anjanb
I'll bite it :-)
我会咬它:-)
Tomcat Service on windows is dependent on the MS C Runtime library msvcr71.dll. As long as it is in the path, the service will start just fine.
Windows 上的 Tomcat 服务依赖于 MS C 运行时库 msvcr71.dll。只要它在路径中,服务就会正常启动。
Just to prevent your other windows to be forced to use this version of the runtime library, you might want to copy the DLL to just the tomcat bin path instead of windows\system32.
只是为了防止您的其他窗口被迫使用此版本的运行时库,您可能希望将 DLL 复制到 tomcat bin 路径而不是 windows\system32。
回答by ScArcher2
From gobaco.wordpress.com
Tomcat 6 couldn't find a file called msvcr71.dll.
I just copied it over from
c:\windows\microsoft.net\framework\v1.1.4322
to
c:\windows\system32
Tomcat 6 找不到名为 msvcr71.dll 的文件。
我只是将它从 c:\windows\microsoft.net\framework\v1.1.4322 复制到 c:\windows\system32
and was able to start tomcat.
并且能够启动tomcat。
I thought this was very strange, so I wanted to post it on SO in case anyone else runs into this problem. If someone wants to post the same answer I'll accept it.
我觉得这很奇怪,所以我想把它张贴在 SO 上,以防其他人遇到这个问题。如果有人想发布相同的答案,我会接受。
回答by cometta
i follow the above guide but still the same, error 0, my process monitor log at http://www.sendspace.com/file/t0tahr
我遵循上述指南但仍然相同,错误 0,我的进程监视器日志位于 http://www.sendspace.com/file/t0tahr
回答by Marty
I copied the msvcr71.dll from the java home directory to the bin directory of the apache-tomcat install, and the service started after that.
我把java home目录下的msvcr71.dll复制到apache-tomcat安装的bin目录下,然后服务就启动了。
回答by lrkwz
I solved the same problem enabling the default java virtual machine in the configuration app.
我解决了在配置应用程序中启用默认 java 虚拟机的相同问题。
Assuming you have installed tomcat using:
假设您已经使用以下命令安装了 tomcat:
service install tomcat-6.0.35
execute:
执行:
tomcat6w //ES/tomcat-6.0.35
a window pops up, select the java tab and click on "Use default" checkbox.
弹出一个窗口,选择java选项卡并单击“使用默认”复选框。
The service install script (I immagine) selected C:\Program Files(x86)\Java\jre\bin\client\jvm.dll
instead.
C:\Program Files(x86)\Java\jre\bin\client\jvm.dll
而是选择了服务安装脚本(我想象)。
Environment:
环境:
- Windows Server standard SP2 64-bin
- Java 1.6.0_23-b05 (Java hotspot 64-bit server vm 19.0-b09 mixed mode)
- Apache tomcat 6.35 (you guessed this didn't you?)
- Windows Server 标准 SP2 64-bin
- Java 1.6.0_23-b05(Java 热点 64 位服务器 vm 19.0-b09 混合模式)
- Apache tomcat 6.35(你猜对了吗?)
回答by army
Even though it's an older post, I thought I'd share the knowledge about the very same issue I had, but the workaround was different.
尽管这是一篇较旧的帖子,但我认为我会分享有关我遇到的相同问题的知识,但解决方法有所不同。
The Apache Tomcat 7 service terminated with service-specific error 0 (0x0).
Apache Tomcat 7 服务因特定于服务的错误 0 (0x0) 而终止。
As there was no more information regarding the problem I went back to the Tomcat Control Panel and had a look at the Java path, which was pointed to an earlier installation of Java Virtual Machine:
由于没有关于该问题的更多信息,我返回到 Tomcat 控制面板并查看了 Java 路径,该路径指向 Java 虚拟机的早期安装:
C:\Program Files\Java\jre6\bin\client\jvm.dll, which no longer existed, so I had to change the JRE version to jre7.
C:\Program Files\Java\jre6\bin\client\jvm.dll,已经不存在了,只好将JRE版本改为jre7。
Having done that, the service started up and all running now.
完成后,该服务启动并全部运行。
Hope it'll help some of you out there.
希望它会帮助你们中的一些人。