0

I have Tomcat7 installed on a Server 2008 R2 server as a service. When I start the service, there were no failures, but I got a 404 when I navigate to Localhost:8080.

I opened up cmd and tried running Tomcat7.exe, but I receive the following errors:

[warn] the system cannot find the Registry key for service 'tomcat7'
[error] Load configuration failed
[error] The system cannot find the file specified.
[error] Commons Daemon procrun failed with exit value: 2 (Failed to load configuration)
{error] the system cannot find the file specified

I install Tomcat for clients by unzipping a folder that includes apache-tomcat, the JDK and the JRE and then adding the paths to the environment variables. I have verified that this zip will successfully install and run Tomcat on many servers with the same OS.

I tried troubleshooting by copying the MSVCR71.DLL file to the Tomcat\bin folder and the JDK\bin folder, but I still get the same error. Is there another place I should be copying that file? (Note: I copied this MSVCR71.DLL from a windows folder- it was not included in Tomcat.)

This server is a newly created server, which I'm told never had another instance of Tomcat on it.

Any help/ leads in the right direction are appreciated.

ETL
  • 6,513
  • 1
  • 28
  • 48
OrangeGrover
  • 595
  • 3
  • 10
  • 25
  • If you get a 404 when browsing to localhost:8080 then either Tomcat or another server is running and processing requests on that port. Check the logs directory under your tomcat install for more details. – ETL Feb 22 '13 at 19:17
  • When I get the 404 error, it is the Tomcat generated 404 error. Is there anything specific I should be looking for in the log files? I did notice that whenever I run Tomcat, the stderr file says that it's started on 8080 and then 1 second later, it's stopping on 8080 – OrangeGrover Feb 22 '13 at 19:35
  • Anything in between the started and stopping lines? Check catalina.out (or any other files in the logs directory). – ETL Feb 22 '13 at 19:40
  • I found out that the Tomcat stop mentioned above was actually user initiated. I deleted the logs and then reran the tomcat7.exe and the logs don't seem to indicate that anything is going wrong.. besides for the cmd output and the 404 – OrangeGrover Feb 22 '13 at 20:52
  • OK so do you have a web app in the webapps director? The log file would show if it is deploying it or if it runs into error deploying it. To have something show up at http://localhost:8080 you must have a ROOT webapp. – ETL Feb 22 '13 at 21:48

3 Answers3

1

First on env.: name: JAVA_HOME and valuer: C:\Program Files\java\jdk-15.0.1

After that:

C:\WINDOWS\system32>cd C:\ApacheTomcat\apache-tomcat-10.0.8\bin

C:\ApacheTomcat\apache-tomcat-10.0.8\bin>service.bat install
Installing the service 'Tomcat10' ...
Using CATALINA_HOME:    "C:\ApacheTomcat\apache-tomcat-10.0.8"
Using CATALINA_BASE:    "C:\ApacheTomcat\apache-tomcat-10.0.8"
Using JAVA_HOME:        "C:\Program Files\java\jdk-15.0.1"
Using JRE_HOME:         "C:\Program Files\java\jdk-15.0.1"
Using JVM:              "C:\Program Files\java\jdk-15.0.1\bin\server\jvm.dll"
The service 'Tomcat10' has been installed.

And finally:

 Directorio de C:\ApacheTomcat\apache-tomcat-10.0.8\bin

[.]                  [..]                 bootstrap.jar        catalina-tasks.xml   catalina.bat
catalina.sh          ciphers.bat          ciphers.sh           commons-daemon.jar   configtest.bat
configtest.sh        daemon.sh            digest.bat           digest.sh            makebase.bat
makebase.sh          migrate.bat          migrate.sh           service.bat          setclasspath.bat
setclasspath.sh      shutdown.bat         shutdown.sh          startup.bat          startup.sh
tcnative-1.dll       tomcat-juli.jar      tomcat10.exe         tomcat10w.exe        tool-wrapper.bat
tool-wrapper.sh      version.bat          version.sh
              31 archivos      3,078,000 bytes
               2 dirs  54,736,601,088 bytes libres

C:\ApacheTomcat\apache-tomcat-10.0.8\bin>tomacat10.exe
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
IngFerTV
  • 11
  • 1
1

run this in your command prompt "service.bat install" pointing to bin and this will install the tomcat7 service.

Now if you run tomcat7.exe, server should be starting fine without errors.

lazydev
  • 111
  • 2
0

I have faced the similar issue, this is happening because you might have forgot to add the environmental variables for JRE_HOME or JAVA_HOME

When you tried to click on startup.bat file in bin folder - it closes in a blink of an eye.
Saying like environmental properties are not set.

Hopefully this solve your problem too.

MichelZ
  • 11,068
  • 4
  • 32
  • 59
Sireesh
  • 101
  • 2