Problems installing XNAT 1.7.2 in environment without internet access.

364 views
Skip to first unread message

Benjamin Sørlie Ormset

unread,
Feb 2, 2017, 8:50:57 AM2/2/17
to xnat_discussion
Hi!

I'm trying to install XNAT 1.7.2 on a machine in a system with no connections to the outside world.
The user running tomcat7 is tomcat.
Following the instructions point by point, I'm getting the following errors.

# java -version
java version "1.7.0_121"
OpenJDK Runtime Environment (rhel-2.6.8.1.el6_8-x86_64 u121-b00)
OpenJDK 64-Bit Server VM (build 24.121-b00, mixed mode)

data/xnat/home/logs/spring.log:
2017-02-02 13:10:18,420 [localhost-startStop-1] WARN  org.springframework.web.context.support.AnnotationConfigWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'properties' defined in org.nrg.xnat.initialization.PropertiesConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.context.support.PropertySourcesPlaceholderConfigurer]: Factory method 'properties' threw exception; nested exception is java.lang.RuntimeException: No XNAT home specified in any of the accepted locations: ${xnat.config}/, ${xnat.config.home}/xnat-conf.properties, ${xnat.home}/config/xnat-conf.properties, ${XNAT_HOME}/config/xnat-conf.properties, ${HOME}/xnat/config/xnat-conf.properties, ${HOME}/config/xnat-conf.properties
2017-02-02 13:10:18,431 [localhost-startStop-1] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org
.springframework.beans.factory.BeanCreationException: Error creating bean with name 'properties' defined in org.nrg.xnat.initialization.PropertiesConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.context.support.PropertySourcesPlaceholderConfigurer]: Factory method 'properties' threw exception; nested exception is java.lang.RuntimeException: No XNAT home specified in any of the accepted locations: ${xnat.config}/, ${xnat.config.home}/xnat-conf.properties, ${xnat.home}/config/xnat-conf.properties, ${XNAT_HOME}/config/xnat-conf.properties, ${HOME}/xnat/config/xnat-conf.properties, ${HOME}/config/xnat-conf.properties
        at org
.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
        at org
.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1128)
        at org
.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1022)
        at org
.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
        at org
.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
        at org
.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
        at org
.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org
.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
        at org
.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org
.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:154)
        at org
.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:682)
        at org
.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:523)
        at org
.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
        at org
.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
        at org
.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
        at org
.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5116)
        at org
.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5634)
        at org
.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
        at org
.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
        at org
.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
        at org
.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
        at org
.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1092)
        at org
.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1984)
        at java
.util.concurrent.Executors$RunnableAdapter.call(Executors.java:522)
        at java
.util.concurrent.FutureTask.run(FutureTask.java:277)
        at java
.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
        at java
.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java
.lang.Thread.run(Thread.java:785)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.context.support.PropertySourcesPlaceholderConfigurer]: Factory method 'properties' threw exception; nested exception is java.lang.RuntimeException: No XNAT home specified in any of the accepted locations: ${xnat.config}/, ${xnat.config.home}/xnat-conf.properties, ${xnat.home}/config/xnat-conf.properties, ${XNAT_HOME}/config/xnat-conf.properties, ${HOME}/xnat/config/xnat-conf.properties, ${HOME}/config/xnat-conf.properties
        at org
.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
        at org
.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
       
... 27 more
Caused by: java.lang.RuntimeException: No XNAT home specified in any of the accepted locations: ${xnat.config}/, ${xnat.config.home}/xnat-conf.properties, ${xnat.home}/config/xnat-conf.properties, ${XNAT_HOME}/config/xnat-conf.properties, ${HOME}/xnat/config/xnat-conf.properties, ${HOME}/config/xnat-conf.properties
        at org
.nrg.xnat.initialization.PropertiesConfig.getConfigFolderPaths(PropertiesConfig.java:188)
        at org
.nrg.xnat.initialization.PropertiesConfig.findConfigurationFile(PropertiesConfig.java:152)
        at org
.nrg.xnat.initialization.PropertiesConfig.getXnatConfigurationFile(PropertiesConfig.java:148)
        at org
.nrg.xnat.initialization.PropertiesConfig.properties(PropertiesConfig.java:67)
        at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
        at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java
.lang.reflect.Method.invoke(Method.java:508)
        at org
.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
       
... 28 more


This is my tomcat.conf:
# System-wide configuration file for tomcat services
# This will be sourced by tomcat and any secondary service
# Values will be overridden by service-specific configuration
# files in /etc/sysconfig
#
# Use this one to change default values for all services
# Change the service specific ones to affect only one service
# (see, for instance, /etc/sysconfig/tomcat)
#

# This variable is used to figure out if config is loaded or not.
TOMCAT_CFG_LOADED
="1"

# Where your java installation lives
JAVA_HOME
="/usr/lib/jvm/jre"

# Where your tomcat installation lives
CATALINA_BASE
="/usr/share/tomcat"
CATALINA_HOME
="/usr/share/tomcat"
JASPER_HOME
="/usr/share/tomcat"
CATALINA_TMPDIR
="/var/cache/tomcat/temp"
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/lib64"

# What user should run tomcat
TOMCAT_USER
="tomcat"

# You can change your tomcat locale here
#LANG="en_US"

# Run tomcat under the Java Security Manager
SECURITY_MANAGER
="false"

# Time to wait in seconds, before killing process
SHUTDOWN_WAIT
="30"

# Whether to annoy the user with "attempting to shut down" messages or not
SHUTDOWN_VERBOSE
="false"

# Set the TOMCAT_PID location
CATALINA_PID
="/var/run/tomcat.pid"

# Connector port is 8080 for this tomcat instance
#CONNECTOR_PORT="8080"

# If you wish to further customize your tomcat environment,
# put your own definitions here
# (i.e. LD_LIBRARY_PATH for some jdbc drivers)

And here is my catalina.out:
Feb 02, 2017 2:14:20 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING
: Problem with JAR file [/usr/share/java/tomcat/log4j.jar], exists: [false], canRead: [false]
Feb 02, 2017 2:14:20 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING
: Problem with JAR file [/usr/share/java/tomcat/log4j.jar], exists: [false], canRead: [false]
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO
: Server version:        Apache Tomcat/7.0.73
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO
: Server built:          Nov 30 2016 16:00:18 UTC
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO
: Server number:         7.0.73.0
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO
: OS Name:               Linux
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO
: OS Version:            2.6.32-642.13.1.el6.x86_64
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO
: Architecture:          amd64
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO
: Java Home:             /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.121.x86_64/jre
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO
: JVM Version:           1.7.0_121-mockbuild_2016_11_01_00_38-b00
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO
: JVM Vendor:            Oracle Corporation
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO
: CATALINA_BASE:         /usr/share/tomcat
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO
: CATALINA_HOME:         /usr/share/tomcat
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO
: Command line argument: -Dxnat.home=/data/xnat/home
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO
: Command line argument: -Dcatalina.base=/usr/share/tomcat
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO
: Command line argument: -Dcatalina.home=/usr/share/tomcat
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO
: Command line argument: -Djava.endorsed.dirs=
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO
: Command line argument: -Djava.io.tmpdir=/var/cache/tomcat/temp
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO
: Command line argument: -Djava.util.logging.config.file=/usr/share/tomcat/conf/logging.properties
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO
: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Feb 02, 2017 2:14:21 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO
: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Feb 02, 2017 2:14:21 PM org.apache.coyote.AbstractProtocol init
INFO
: Initializing ProtocolHandler ["http-bio-8080"]
Feb 02, 2017 2:14:21 PM org.apache.coyote.AbstractProtocol init
INFO
: Initializing ProtocolHandler ["ajp-bio-8009"]
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.Catalina load
INFO
: Initialization processed in 1070 ms
Feb 02, 2017 2:14:21 PM org.apache.catalina.core.StandardService startInternal
INFO
: Starting service Catalina
Feb 02, 2017 2:14:21 PM org.apache.catalina.core.StandardEngine startInternal
INFO
: Starting Servlet Engine: Apache Tomcat/7.0.73
Feb 02, 2017 2:14:21 PM org.apache.catalina.startup.HostConfig deployWAR
INFO
: Deploying web application archive /var/lib/tomcat/webapps/ROOT.war
Feb 02, 2017 2:14:36 PM org.apache.catalina.startup.TldConfig execute
INFO
: 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.
Feb 02, 2017 2:14:43 PM org.apache.catalina.core.StandardContext startInternal
SEVERE
: One or more listeners failed to start. Full details will be found in the appropriate container log file
Feb 02, 2017 2:14:53 PM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
INFO
: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [9,874] milliseconds.
Feb 02, 2017 2:14:53 PM org.apache.catalina.core.StandardContext startInternal
SEVERE
: Context [] startup failed due to previous errors
Feb 02, 2017 2:14:53 PM org.apache.catalina.startup.HostConfig deployWAR
INFO
: Deployment of web application archive /var/lib/tomcat/webapps/ROOT.war has finished in 31,338 ms
Feb 02, 2017 2:14:53 PM org.apache.coyote.AbstractProtocol start
INFO
: Starting ProtocolHandler ["http-bio-8080"]
Feb 02, 2017 2:14:53 PM org.apache.coyote.AbstractProtocol start
INFO
: Starting ProtocolHandler ["ajp-bio-8009"]
Feb 02, 2017 2:14:53 PM org.apache.catalina.startup.Catalina start
INFO
: Server startup in 31443 ms



Any suggestions as to where I might have gone wrong?

--
Best regards,
Benjamin

Herrick, Rick

unread,
Feb 2, 2017, 10:41:06 AM2/2/17
to xnat_di...@googlegroups.com

Do you have the file /data/xnat/home/config/xnat-conf.properties? Tomcat is getting the value for xnat.home that’s set in your tomcat.conf, because it’s writing the logs to /data/xnat/home/logs, and that’s coming from the expression ${xnat.home}/logs in the file log4j.properties. If you do have that file, make sure that it’s readable by the configured TOMCAT_USER, which in your configuration is “tomcat”. In fact, make sure the entire folder/file structure under /data/xnat is readable and writable by that user.

 

-- 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

 

Voice: (314) 273-1645

Web: http://www.xnat.org

Twitter: @NrgXnat

--
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 post to this group, send email to xnat_di...@googlegroups.com.
Visit this group at https://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/d/optout.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Benjamin Sørlie Ormset

unread,
Feb 2, 2017, 12:25:12 PM2/2/17
to xnat_di...@googlegroups.com
Oh, yes. Forgot to mention that. I have that file as well, as shown by the example file. All files owned by tomcat:tomcat.

--
Benjamin
You received this message because you are subscribed to a topic in the Google Groups "xnat_discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xnat_discussion/YIrWNXcWf08/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xnat_discussi...@googlegroups.com.

Herrick, Rick

unread,
Feb 6, 2017, 12:40:55 PM2/6/17
to xnat_di...@googlegroups.com

Have you worked this issue out? If so, what was the cause? We just saw a similar issue due to a change in our Vagrant provisioning scripts, but one of our developers just pushed a change for it. Basically, xnat-conf.properties and its config folder weren’t created, but that doesn’t seem like the issue in your case.

 

If you haven’t managed to fix it, can you try this? On the VM as yourself or some user with sudo access, run this command:

 

$ sudo su -l -c "cat /data/xnat/home/config/xnat-conf.properties" tomcat

 

If this doesn’t display the contents of the file, then it’s a permissions issue. If it does… we’ll have to go from there J

 

-- 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

 

Benjamin Sørlie Ormset

unread,
Feb 7, 2017, 9:12:35 AM2/7/17
to xnat_discussion
Hi, Rick!

I deleted the VM and started over, and this time it worked.
So, I'm guessing I did something silly along one of the steps.

Thanks so much for your help, and apologies for wasting your time!

-- 
Best regards,
Benjamin

Herrick, Rick

unread,
Feb 7, 2017, 9:56:57 AM2/7/17
to xnat_di...@googlegroups.com

No problem, I’m happy to hear it’s working for you now.

Reply all
Reply to author
Forward
0 new messages