XNAT 1.8.10 not start

41 views
Skip to first unread message

Shaji Markose

unread,
Jun 7, 2024, 1:09:42 PMJun 7
to xnat_di...@googlegroups.com
I am trying to setup 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 not comming up in the browser. Getting 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
# SM commented JAVA_HOME="/usr/lib/jvm/jre"
JAVA_HOME="/usr/bin/java"

# Where your tomcat installation lives
CATALINA_HOME="/usr/share/tomcat"

# System-wide tmp
CATALINA_TMPDIR="/var/cache/tomcat/temp"

# SM added on May 2024
# XNAT.Home Folder
CATALINA_OPTS="${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 look 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

Rick Herrick

unread,
Jun 10, 2024, 4:18:52 PMJun 10
to xnat_di...@googlegroups.com

The memory leak warnings are of no concern. They only appear when Tomcat is shutting down. Since the process completely terminates before restart, any potential memory leaks at the end are essentially killed before the application restarts.

 

The URL you mention is http://hhvrixnat/xnat, which would go to the default HTTP port 80. However, Tomcat runs on port 8080 by default. You don’t mention having a front-end proxy like nginx or similar, so could it just be the port? Try using http://hhvrixnat:8080/xnat instead and see if that works.

 

Another possible factor is how you’ve installed XNAT into your Tomcat. Did you rename the war file to be xnat.war? In that case, the URL for XNAT would be http://whatever/xnat. However, if you renamed it to ROOT.war, then the URL would be http://whatever. If you kept it named xnat-web-1.8.10.1.war, then the URL would be http://whatever/xnat-web-1.8.10.1. Basically that first token after the server address is called the “application context”. Unless explicitly mapped in a Tomcat configuration file (which we don’t recommend), the context for each application is:

 

  • The name of the folder under Tomcat’s webapps folder containing the app
  • The name of the war file under Tomcat’s webapps folder, minus the .war extension, unless
  • No application context, i.e. /, if the war file is named ROOT.war

 

If changing to port 8080 and getting the correct application context in the URL doesn’t get you to your app, then have a look at catalina.out in the Tomcat logs, as well as any non-empty log files in XNAT’s home logs folder.

 

I recommend shutting Tomcat down, deleting all the Tomcat and XNAT logs, then starting the application again. This gets rid of any errors (like those memory leaks) that may confound determining if/why XNAT isn’t starting properly.

 

From: xnat_di...@googlegroups.com <xnat_di...@googlegroups.com> on behalf of Shaji Markose <markos...@gmail.com>
Date: Friday, June 7, 2024 at 12:09
PM
To: xnat_di...@googlegroups.com <xnat_di...@googlegroups.com>
Subject: [XNAT Discussion] XNAT 1.8.10 not start

You don't often get email from markos...@gmail.com. Learn why this is important

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/CAO5Ybe2XbHOPvKz8WrujFTeRmNjeEG0su3G%2Bbt1HEh1Z_djJTQ%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages