0

UPDATE: I've tried starting TomCat from commandline. During the startup messages I get this:

15-Mar-2019 09:05:08.603 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [C:\Program Files\ASF\Tomcat9\webapps\thredds.war]
15-Mar-2019 09:05:15.900 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
15-Mar-2019 09:05:18.286 INFO [main] org.hibernate.validator.internal.util.Version.<clinit> HV000001: Hibernate Validator 4.3.2.Final
15-Mar-2019 09:05:19.382 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
15-Mar-2019 09:05:19.383 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/thredds] startup failed due to previous errors
15-Mar-2019 09:05:19.460 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [thredds] appears to have started a thread named [Log4j2-TF-12-Scheduled-2] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
 java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 java.lang.Thread.run(Thread.java:748)
15-Mar-2019 09:05:19.469 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [C:\Program Files\ASF\Tomcat9\webapps\thredds.war] has finished in [10,866] ms

I'm starting to believe that Gerhard is right that it is not a batch issue?


I'm trying to deploy the THREDDS server (version 4.6.13) for Windows using Tomcat 9. However, when I try to start the server I get:

FAIL - Application at context path [/thredds] could not be started

I've tried creating setenv.bat from a working setenv.sh on a Linux-machine, but my batch-scripting is more than rusty, but I certainly believe it's down to wrong syntax.

My script file is as follows:

@ECHO OFF

set "CATALINA_HOME=%ProgramFiles%/ASF/Tomcat9"
set "CATALINA_BASE=%ProgramFiles%/ASF/Tomcat9"
set "JAVA_HOME=%ProgramFiles%/AdoptOpenJDK/jdk8u202-b08-jre"

:: TDS specific ENVARS
::
:: Define where the TDS content directory will live
::
set "CONTENT_ROOT=-Dtds.content.root.path=%ProgramFiles%/ASF/Tomcat9/content"

:: set java prefs related variables (used by the wms service, for example)
set "JAVA_PREFS_ROOTS=-Djava.util.prefs.systemRoot=%CATALINA_HOME%/content/thredds/javaUtilPrefs -Djava.util.prefs.userRoot=%CATALINA_HOME%/content/thredds/javaUtilPrefs"


:: Some commonl used JAVA_OPTS settings:
set NORMAL="-d64 -Xmx4096m -Xms512m -server -ea"
set HEAP_DUMP="-XX:+HeapDumpOnOutOfMemoryError"
set HEADLESS="-Djava.awt.headless=true"

Where did I mess up?

  • That is not a batch error you experience there.. How do you launch the application? – Gerhard Mar 15 '19 at 07:42
  • I have uploaded thredds.war through TomCat and deployed it this way, and I then try to start it from TomCat's interface. My reasoning for suspecting a batch error is, that I know the error message shown will come if you have not specified content-root in setenv.bat (setenv.sh in *nix). – Asbjørn Hoffskov Mar 15 '19 at 08:18
  • well, not sure if this might help, as I cannot test as I do not have the same environment. but try this `set "CONTENT_ROOT=-Dtds.content.root.path=\"%ProgramFiles%\ASFTomcat9\content\""` – Gerhard Mar 15 '19 at 08:21
  • I'll give it at shot, @GerhardBarnard - I've added some new information btw. – Asbjørn Hoffskov Mar 15 '19 at 08:27
  • So seems your tomcat is having some issues. Search google for relating errors perhaps. – Gerhard Mar 15 '19 at 08:39

0 Answers0