5

I've got a fresh installation of Tomcat 7.0.56. When I run startup.bat (As administrator or not), I got the following message:

    Using CATALINA_BASE:   "C:\uPortal_test\apache-tomcat-7.0.56"
    Using CATALINA_HOME:   "C:\uPortal_test\apache-tomcat-7.0.56"
    Using CATALINA_TMPDIR: "C:\uPortal_test\apache-tomcat-7.0.56\temp"
    Using JRE_HOME:        "C:\Program Files (x86)\Java\jdk1.7.0_71"
    Using CLASSPATH:       "C:\uPortal_test\apache-tomcat-7.0.56\bin\bootstrap.jar;C
    :\uPortal_test\apache-tomcat-7.0.56\bin\tomcat-juli.jar"

And that's it. The console closes instantly. I followed this Tutorial

I set CATALINA_HOME at the beginning of startup.bat, just in case, but it should not be necessary

bud-e
  • 1,401
  • 1
  • 19
  • 31
Grigory Kornilov
  • 256
  • 2
  • 4
  • 17
  • C:\uPortal_test\apache-tomcat-7.0.56 does this exists? – SMA Nov 07 '14 at 10:29
  • Yes, I've binded CATALINA_HOME by copying the address from file explorer. – Grigory Kornilov Nov 07 '14 at 10:34
  • Could it be a 64b-32b compatibility issue somewhere? – Grigory Kornilov Nov 07 '14 at 10:36
  • 1
    if you do click on windows button -> type cmd -> cd C:\uPortal_test\apache-tomcat-7.0.56\bin; startup.bat what's the output you see? – SMA Nov 07 '14 at 10:36
  • Written as you suggested, it tell that the specified path is not found. If I only execute cd C:\... in one command, and in a second I try startup.bat, I get the same output as with the batch file, described above. – Grigory Kornilov Nov 07 '14 at 10:46
  • so C:\uPortal_test\apache-tomcat-7.0.56\bin does not exists and that's the reason. now do this: click on windows button -> type cmd -> c: - > cd \ -> dir and paste the output basically you yourself can check if that folder exists and if you setted catalina_home correctly – SMA Nov 07 '14 at 10:50
  • It exists, actually. If I perform 'dir' while in C:\uPortal_test\apache-tomcat-7.0.56, it shows me that there is a folder called 'bin'. Then if I type -> cd bin and -> dir, I can see shutdown.bat file. – Grigory Kornilov Nov 07 '14 at 10:54
  • And the output I've mentionned in the question is generated by startup.bat, so execution actually works. But not completely. – Grigory Kornilov Nov 07 '14 at 10:55
  • 1
    Ok, that was a problem of memory allocation for JVM. My Xmx was set to 1024m, I've tried 64 and it worked. Thanj you for your time! – Grigory Kornilov Nov 07 '14 at 11:03
  • Ok i have made it as an answer so it would help others in future. – SMA Nov 07 '14 at 11:33

2 Answers2

2

Ok you need to get the error from command prompt. You will need to do the following:

click on windows button 
type cmd (followed by enter)
cd C:\uPortal_test\apache-tomcat-7.0.56\bin (followed by enter)
startup.bat (followed by enter)

If you run this batch file you some of the error will pop off the script which will give you hint what wrong you are doing and you can correct accordingly.

SMA
  • 33,915
  • 6
  • 43
  • 65
  • This usually works for me but not this time. See what @ykaganovich suggested https://stackoverflow.com/questions/5398654/tomcat-not-starting. It worked for me – user435421 Mar 27 '18 at 12:34
2

In my case, the error did not show up in the command prompt. This can happen if a config file (in my case, setenv.bat) has a syntax error. I was able to isolate the problem by adding rem in front of each setting line in the bat file to isolate the root cause.

I was missing double quotes around a file path that included spaces.

set JAVA_OPTS=%JAVA_OPTS% -Djuli-logback.configurationFile=%CATALINA_HOME%\conf\logback.xml

Should have been:

set JAVA_OPTS=%JAVA_OPTS% -Djuli-logback.configurationFile="%CATALINA_HOME%\conf\logback.xml"
RMorrisey
  • 7,239
  • 8
  • 49
  • 66