I am trying to set up XNAT 1.8.10.1 on Red Hat Enterprise Linux release 8.9 (Ootpa), but I cannot get the web app to start. I have Tomcat 9.0.62, PostgreSQL 12.18, and openjdk version "1.8.0_402" with OpenJDK Runtime Environment (build 1.8.0_402-b06)
OpenJDK 64-Bit Server VM (build 25.402-b06, mixed mode). When I try
http://hhvrixnat/xnat the application is not coming up in the browser. Getting the site can't be reached message.
.
I created a PostgreSQL user xnat, assigned a password, and created the database xnat owned by user xnat. PostgreSQL and XNAT are located on the same server. I configured /var/lib/pgsql/data/pg_hba.conf as following:
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all
127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all trust
host replication all
127.0.0.1/32 trust
host replication all ::1/128 trust
/var/lib/pgsql/data/postgresql.conf is
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------
# - Connection Settings -
#listen_addresses = 'localhost' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost'; use '*' for all
# (change requires restart)
#port = 5432 # (change requires restart)
max_connections = 100 # (change requires restart)
#superuser_reserved_connections = 3 # (change requires restart)
#unix_socket_directories = '/var/run/postgresql, /tmp' # comma-separated list of directories
# (change requires restart)
#unix_socket_group = '' # (change requires restart)
#unix_socket_permissions = 0777 # begin with 0 to use octal notation
# (change requires restart)
#bonjour = off # advertise server via Bonjour
# (change requires restart)
#bonjour_name = '' # defaults to the computer name
# (change requires restart)
#------------------------------------------------------------------------------
# RESOURCE USAGE (except WAL)
#------------------------------------------------------------------------------
shared_buffers = 128MB
dynamic_shared_memory_type = posix
#------------------------------------------------------------------------------
# WRITE-AHEAD LOG
#------------------------------------------------------------------------------
max_wal_size = 1GB
min_wal_size = 80MB
#------------------------------------------------------------------------------
# REPORTING AND LOGGING
#------------------------------------------------------------------------------
logging_collector = on
log_filename = 'postgresql-%a.log'
log_truncate_on_rotation = on
log_rotation_age = 1d
log_rotation_size = 0
log_timezone = 'America/Chicago'
/data/xnat/home/config/xnat-conf.properties file contains the appropriate username and password.
d#
# xnat-conf.properties
# XNAT
http://www.xnat.org# Copyright (c) 2016, Washington University School of Medicine
# All Rights Reserved
#
# Released under the Simplified BSD.
#
datasource.driver=org.postgresql.Driver
datasource.url=jdbc:postgresql://localhost/d04xnat1_8
datasource.username=xxxxxxxxx
datasource.password=xxxxxxxxxx
hibernate.dialect=org.hibernate.dialect.PostgreSQL9Dialect
hibernate.hbm2ddl.auto=update
hibernate.show_sql=false
hibernate.cache.use_second_level_cache=true
hibernate.cache.use_query_cache=true
/usr/share/tomcat/conf/tomcat.conf fileas follows:
# This variable is used to figure out if config is loaded or not.
TOMCAT_CFG_LOADED="1"
# In new-style instances, if CATALINA_BASE isn't specified, it will
# be constructed by joining TOMCATS_BASE and NAME.
TOMCATS_BASE="/var/lib/tomcats/"
# Where your java installation lives
JAVA_HOME="/usr/bin/java"
# Where your tomcat installation lives
CATALINA_HOME="/usr/share/tomcat"
# System-wide tmp
CATALINA_TMPDIR="/var/cache/tomcat/temp"
# XNAT.Home Folder
CATALINA_OPTS="-Dxnat.home=/data/xnat/home/"
# You can pass some parameters to java here if you wish to
#JAVA_OPTS="-Xminf0.1 -Xmaxf0.3"
# Use JAVA_OPTS to set java.library.path for libtcnative.so
#JAVA_OPTS="-Djava.library.path=/usr/lib"
# Set default javax.sql.DataSource factory to apache commons one. See rhbz#1214381
JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory"
# You can change your tomcat locale here
#LANG="en_US"
# Run tomcat under the Java Security Manager
SECURITY_MANAGER="false"
# SHUTDOWN_WAIT has been deprecated. To change the shutdown wait time, set
# TimeoutStopSec in tomcat.service.
# If you wish to further customize your tomcat environment,
# put your own definitions here
# (i.e. LD_LIBRARY_PATH for some jdbc drivers)
CATALINA_OPTS="${CATALINA_OPTS} -Dxnat.home=/xnatdata/home2"
I am seeing some memory leak warning in the log file: Log file looks like
07-Jun-2024 11:06:52.197 INFO [Thread-40] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
07-Jun-2024 11:06:52.204 INFO [Thread-40] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
07-Jun-2024 11:06:54.076 WARNING [Thread-40] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xnat] appears to have started a thread named [DefaultQuartzScheduler_Worker-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
07-Jun-2024 11:06:54.077 WARNING [Thread-40] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xnat] appears to have started a thread named [DefaultQuartzScheduler_Worker-2] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
07-Jun-2024 11:06:54.077 WARNING [Thread-40] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xnat] appears to have started a thread named [DefaultQuartzScheduler_Worker-3] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
07-Jun-2024 11:06:54.077 WARNING [Thread-40] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xnat] appears to have started a thread named [DefaultQuartzScheduler_Worker-4] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
07-Jun-2024 11:06:54.077 WARNING [Thread-40] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xnat] appears to have started a thread named [DefaultQuartzScheduler_Worker-5] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
07-Jun-2024 11:06:54.078 WARNING [Thread-40] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xnat] appears to have started a thread named [DefaultQuartzScheduler_Worker-6] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
07-Jun-2024 11:06:54.078 WARNING [Thread-40] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xnat] appears to have started a thread named [DefaultQuartzScheduler_Worker-7] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
07-Jun-2024 11:06:54.078 WARNING [Thread-40] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xnat] appears to have started a thread named [DefaultQuartzScheduler_Worker-8] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
07-Jun-2024 11:06:54.078 WARNING [Thread-40] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xnat] appears to have started a thread named [DefaultQuartzScheduler_Worker-9] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
07-Jun-2024 11:06:54.078 WARNING [Thread-40] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xnat] appears to have started a thread named [DefaultQuartzScheduler_Worker-10] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
07-Jun-2024 11:06:54.079 WARNING [Thread-40] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xnat] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.util.TimerThread.mainLoop(Timer.java:552)
java.util.TimerThread.run(Timer.java:505)
07-Jun-2024 11:06:54.079 WARNING [Thread-40] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xnat] appears to have started a thread named [ActiveMQ BrokerService[activeMQBroker] Task-2693] 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.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:362)
java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:941)
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1073)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:750)
07-Jun-2024 11:06:54.079 WARNING [Thread-40] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xnat] appears to have started a thread named [DefaultQuartzScheduler_QuartzSchedulerThread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:253)
07-Jun-2024 11:06:54.080 SEVERE [Thread-40] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [xnat] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@327e9ee8]) and a value of type [org.restlet.data.Response] (value [org.restlet.data.Response@1dcd0346]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
07-Jun-2024 11:06:54.080 SEVERE [Thread-40] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [xnat] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@53bf9669]) and a value of type [org.restlet.Context] (value [org.restlet.Context@70efe143]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
07-Jun-2024 11:06:54.088 INFO [Thread-40] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
07-Jun-2024 11:06:54.098 INFO [Thread-40] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
Appreciate your help.
Shaji Markose