Zip Tomcat (6, 7) cannot be registered as a Windows service or cannot be started after registration.

Source: Internet
Author: User
Tags typing net

Tomcat is often used in daily development. Generally, you only need to download the zip version of Tomcat and configure it in IDE. You do not need to register Tomcat as a service. However, if you need to deploy Tomcat on your machine during deployment, some problems may occur.

In general, if you want to deploy it as a service, you need to download a dedicated Windows Installation version (an EXE Installation File) and install it in windows. Such installation
The default service name is tomcat6 or tomcat7, but cannot be modified manually. If you need to install multiple Tomcat servers, you cannot use the installation version. In
In this case, we generally download the zip version of Tomcat and use service. BAT to register Tomcat as a service.
Generally, Tomcat registered as a service cannot be started. There are many problems. I listed the problems I found in the actual process one by one to help the students who encountered the problem solve the problem together.

A service specific error occurred: 0.More help is available by typing NET HELPMSG 3547.

 

First, check whether the commands used by the Registration Service can detect the installed Java. This check only needs to check whether the following words appear in the command line:

Installing the service 'Tomcat6' ...Using CATALINA_HOME:    E:/javaServer/tomcat6utf8Using CATALINA_BASE:    E:/javaServer/tomcat6utf8Using JAVA_HOME:        C:/jdk1.6.0_24Using JVM:              C:/jdk1.6.0_24/jre/bin/server/jvm.dllThe service 'Tomcat6' has been installed.

If the following words appear, Java has been detected.

Second question: msvcr71.dll and msvcp71.dll, which are frequently mentioned on the Internet. These two DLL files only need to be placed in a place where the path environment variable of windows can be found, and do not need to be placed in a special place.
A simple method to check whether the file can be found is to enter the two files in the command line, such:

E:/javaServer/tomcat6utf8/bin>msvcr71.dll

If this file is found in windows, a dialog box is displayed asking you to open the file. This indicates that the file has been found in windows.
Of course, if you copy both files to the bin directory of Tomcat, it is also a solution (not tested)

Third problem: Java and tomcat versions.
The version mentioned here is not simply a problem of jre5 and jre6. Generally, jre5 is required for installing Tomcat 6 and jre6 is required for installing Tomcat 7. This is common sense.
The special problem is:Your tomcat version must be the same as the JVM version.


When I encountered this problem, I could not find a solution to the problem. Finally, I found that
Tomcat.exefile copyto the zipversion of the bindirectory, and overwrite the original tomcat.exe file, the service can be started normally, but its built-in zip version
Tomcat.exe cannot be started. Check the differences between the two EXE files. Except for different sizes, all other configurations are the same. One problem I noticed was the official installation of Tomcat,
It can be used in Win32 or 64-bit systems, which is the key to the problem.
The Java version on my machine is 64-bit, And the downloaded zip version of Tomcat is 32-bit. When Tomcat is started, the following content appears in the jakata-service.log file under the logs directory:

[2011-03-31 12:00:45] [174  javajni.c] [error] %1 is not a valid Win32 application.[2011-03-31 12:00:45] [994  prunsrv.c] [error] Failed creating java C:/jdk1.6.0_24/jre/bin/server/jvm.dll[2011-03-31 12:00:45] [1269 prunsrv.c] [error] ServiceStart returned 1

Indicates that the JVM cannot be started. When I change the service registry to a 32-bit JVM for use, the service starts. This indicates that
Tomcat needs to download Different ZIP files based on JVM. In the official download, we can see that the zip version of Tomcat contains 32-bit and 64-bit.
After the service is registered, Tomcat is started successfully. It seems that the version of the applicable JVM system is inconsistent with that of the applicable Tomcat System.

Of course, during the development process, we use startup. BAT to start Tomcat, which does not involve the issue of exe. In fact, we call Java to start Tomcat.
Tomcat, so this problem does not occur. The differences between the 32-bit Tomcat and 64-bit Tomcat are different from those of the local tomcat.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.