Not able to setup xnat server

518 views
Skip to first unread message

Faidon

unread,
Apr 16, 2019, 12:02:40 PM4/16/19
to xnat_discussion
Good afternoon,

Please bear with me as I am a new user in the XNAT and I am trying to setup an XNAT 1.7 on RedHat Server 7.6. After following the documentation provided on XNAT, I deployed the war file as ROOT.war, but I get the following errors on tomcat log files. Any help would be really appreciated, as I am unfamiliar with the XNAT installation process.
Thanks in advance!


[xnat@xnat-server logs]$ cat localhost.2019-04-16.log
Apr 16, 2019 4:15:22 PM org.apache.catalina.core.ApplicationContext log
INFO: 2 Spring WebApplicationInitializers detected on classpath
Apr 16, 2019 4:15:22 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Apr 16, 2019 4:15:28 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
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:1181)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1075)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:151)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:525)
        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5179)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5704)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1018)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:994)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1127)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:2021)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
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.getConfigPaths(PropertiesConfig.java:212)
        at org.nrg.xnat.initialization.PropertiesConfig.findConfigurationFile(PropertiesConfig.java:184)
        at org.nrg.xnat.initialization.PropertiesConfig.getXnatConfigurationFile(PropertiesConfig.java:180)
        at org.nrg.xnat.initialization.PropertiesConfig.properties(PropertiesConfig.java:72)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
        ... 28 more

Apr 16, 2019 4:15:28 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.nrg.xnat.security.XnatSessionEventPublisher
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:1181)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1075)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:151)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:525)
        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5179)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5704)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1018)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:994)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1127)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:2021)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
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.getConfigPaths(PropertiesConfig.java:212)
        at org.nrg.xnat.initialization.PropertiesConfig.findConfigurationFile(PropertiesConfig.java:184)
        at org.nrg.xnat.initialization.PropertiesConfig.getXnatConfigurationFile(PropertiesConfig.java:180)
        at org.nrg.xnat.initialization.PropertiesConfig.properties(PropertiesConfig.java:72)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
        ... 28 more

Apr 16, 2019 4:15:28 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
Apr 16, 2019 4:15:28 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Apr 16, 2019 4:15:28 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Apr 16, 2019 4:15:28 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('StockTicker', 'async.Stockticker@7456d10f')
Apr 16, 2019 4:15:28 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@464e99f0')

McKay, Mike

unread,
Apr 16, 2019, 12:28:35 PM4/16/19
to xnat_discussion

The discussion here might help fix your issue: https://groups.google.com/d/msg/xnat_discussion/YIrWNXcWf08/bhGhdQgiBwAJ


Hope that helps!


-Mike


From: xnat_di...@googlegroups.com <xnat_di...@googlegroups.com> on behalf of Faidon <phner...@gmail.com>
Sent: Tuesday, April 16, 2019 10:24:16 AM
To: xnat_discussion
Subject: [XNAT Discussion] Not able to setup xnat server
 
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/705b810f-6d49-4368-8b3b-6fa9d8134998%40googlegroups.com.
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.

Faidon

unread,
Apr 17, 2019, 10:58:57 AM4/17/19
to xnat_discussion
Dear Mike,

Thank you very much for your reply. For tomcat I downloaded the zip folder from tomcat webpage and unzipped it to /opt/tomcat. Because I didn't install tomcat using yum install, there is no tomcat.conf file. All the changes I have done, are in the setenv.sh file I have created and the file has the following configuration:

CATALINA_OPTS="$CATALINA_OPTS -Xms512m -Xmx1024m -XX:MaxPermSize=1024m"

As I was reading the documentation provided by XNAT, got little confused and so I followed the guide provided by the following URL for installing Java, Tomcat and PostgreSQL.

Afterwards, I deployed the war file inside tomcat and got the error I described.

As I understand that I should have followed the instructions provided by XNAT documentation, I built a new VM and installed java-1.8.0-openjdk-1.8.0.201 and Tomcat 1.7. After installing these two, I understand that I need to perform modifications on tomcat.conf file and more specifically to add the following line:

CATALINA_OPTS="$CATALINA_OPTS -Dxnat.home=/data/xnat/home"

Kindly advise if this is correct.

Best regards,
Faidon
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_di...@googlegroups.com.

McKay, Mike

unread,
Apr 17, 2019, 11:27:12 AM4/17/19
to xnat_discussion

Yes, that should be what you want.


-Mike


Sent: Wednesday, April 17, 2019 9:58:57 AM
To: xnat_discussion
Subject: Re: [XNAT Discussion] Not able to setup xnat server
 
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.

Faidon

unread,
Apr 17, 2019, 11:36:12 AM4/17/19
to xnat_discussion
I added the line to tomcat.conf and started tomcat service. The following error came up.

[root@xnatserver-01 bin]# service tomcat status
Redirecting to /bin/systemctl status tomcat.service
● tomcat.service - Apache Tomcat Web Application Container
   Loaded: loaded (/usr/lib/systemd/system/tomcat.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2019-04-17 16:01:20 BST; 4s ago
  Process: 6120 ExecStart=/usr/libexec/tomcat/server start (code=exited, status=1/FAILURE)
 Main PID: 6120 (code=exited, status=1/FAILURE)

Apr 17 16:01:20 xnatserver-01 server[6120]: Java virtual machine used: /usr/lib/jvm/jre/bin/java
Apr 17 16:01:20 xnatserver-01 server[6120]: classpath used: /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar
Apr 17 16:01:20 xnatserver-01 server[6120]: main class used: org.apache.catalina.startup.Bootstrap
Apr 17 16:01:20 xnatserver-01 server[6120]: flags used:  $CATALINA_OPTS -Dxnat.home=/data/xnat/home
Apr 17 16:01:20 xnatserver-01 server[6120]: options used: -Dcatalina.base=/usr/share/tomcat -Dcatalina.home=/usr/share/tomcat -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat/temp -Djava.util.logging.config.fi...sLoaderLogManager
Apr 17 16:01:20 xnatserver-01 server[6120]: arguments used: start
Apr 17 16:01:20 xnatserver-01 server[6120]: Error: Could not find or load main class $CATALINA_OPTS
Apr 17 16:01:20 xnatserver-01 systemd[1]: tomcat.service: main process exited, code=exited, status=1/FAILURE
Apr 17 16:01:20 xnatserver-01 systemd[1]: Unit tomcat.service entered failed state.
Apr 17 16:01:20 xnatserver-01 systemd[1]: tomcat.service failed.
Hint: Some lines were ellipsized, use -l to show in full.



What is it that am I doing wrong and I am not able to make it to work?

Herrick, Rick

unread,
Apr 17, 2019, 3:09:13 PM4/17/19
to xnat_di...@googlegroups.com

Is there any reason you can’t install using yum? We can’t debug a configuration based on someone’s old post, especially since tomcat.conf isn’t referenced in either Tomcat itself (i.e. no references in any scripts) or on the old post you referenced, so I’m not sure how that would ever get pulled in. If you install with a standard package manager, it’s much easier to figure out what’s going on. In this case, clearly something’s messed up in the service configuration or script somehow.

 

That said, I downloaded and extracted Tomcat 7, added setenv.sh to the bin folder, and just added this to it:

 

#!/bin/sh

CATALINA_OPTS="${CATALINA_OPTS} -Dxnat.home=/data/xnat/home"

 

That launched Tomcat with xnat.home set properly:

 

75316 s001  S      0:03.05 /home/user/.sdkman/candidates/java/current/bin/java -Djava.util.logging.config.file=/home/user/Downloads/apache-tomcat-7.0.94/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Dxnat.home=/data/xnat/home -Dignore.endorsed.dirs= -classpath /home/user/Downloads/apache-tomcat-7.0.94/bin/bootstrap.jar:/home/user/Downloads/apache-tomcat-7.0.94/bin/tomcat-juli.jar -Dcatalina.base=/home/user/Downloads/apache-tomcat-7.0.94 -Dcatalina.home=/home/user/Downloads/apache-tomcat-7.0.94 -Djava.io.tmpdir=/home/user/Downloads/apache-tomcat-7.0.94/temp org.apache.catalina.startup.Bootstrap start

 

You can try to revert to that or try installing Tomcat with yum, but we can’t figure out what’s going on given that your setup isn’t standard.

 

-- 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

Phone: +1 (314) 273-1645

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.

Φαιδων Νερουτσος

unread,
Apr 17, 2019, 4:11:32 PM4/17/19
to xnat_di...@googlegroups.com
Thank you very much Rick for your response. I will try to do this change and I will let you know.
Unfortunately I will try this next Thursday.

Faidon

unread,
Apr 25, 2019, 12:28:59 PM4/25/19
to xnat_discussion
Dear Rick,

Hope you are well and had a nice Easter break! I have created the xnat user in postgresql as the instructions specify, next in the xnat-conf.properties file, I have the following lines:

datasource.driver=org.postgresql.Driver
datasource.url=jdbc:postgresql://localhost/xnat
datasource.username=xnat
datasource.password= Password_for_xnat_user_here

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


Moreover, as you advised I creted the setnv.sh file in the tomcat/bin folder and have the lines you mentioned above. Downloaded the war file on my server and copied the file to /tomcat/webapps/ and renamed it to xnat.war. I have made tomcat the owner of the war file and the extracted ones.
When I am typing in the browser: http://server_ip:8080/ I get Tomcat's default webpage. When I try to browse to http://server_ip:8080/xnat (supposedly this is the page I should navigate) I get a HTTP 404 error.

From the localhost_access_log, I get the output pasted below. Probably I don't set properly the path for xnat home.

 cat localhost.2019-04-25.log
Apr 25, 2019 3:27:58 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Apr 25, 2019 3:27:58 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Apr 25, 2019 3:28:20 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Apr 25, 2019 3:28:20 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Apr 25, 2019 3:28:20 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('StockTicker', 'async.Stockticker@5ba71c51')
Apr 25, 2019 3:28:20 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@4f301aff')
Apr 25, 2019 3:29:41 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Apr 25, 2019 3:29:41 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Apr 25, 2019 3:48:53 PM org.apache.catalina.core.ApplicationContext log

INFO: 2 Spring WebApplicationInitializers detected on classpath
Apr 25, 2019 3:48:54 PM org.apache.catalina.core.ApplicationContext log

INFO: Initializing Spring root WebApplicationContext
Apr 25, 2019 3:49:00 PM org.apache.catalina.core.StandardContext listenerStart
Apr 25, 2019 3:49:00 PM org.apache.catalina.core.StandardContext listenerStart
Apr 25, 2019 3:49:00 PM org.apache.catalina.core.ApplicationContext log

INFO: Closing Spring root WebApplicationContext
Apr 25, 2019 3:49:00 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Apr 25, 2019 3:49:00 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Apr 25, 2019 3:49:00 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('StockTicker', 'async.Stockticker@57cc5c16')
Apr 25, 2019 3:49:00 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@705b29a4')
Apr 25, 2019 3:55:50 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Apr 25, 2019 3:55:50 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Apr 25, 2019 5:16:51 PM org.apache.catalina.core.ApplicationContext log

INFO: 2 Spring WebApplicationInitializers detected on classpath
Apr 25, 2019 5:16:52 PM org.apache.catalina.core.ApplicationContext log

INFO: Initializing Spring root WebApplicationContext
Apr 25, 2019 5:16:58 PM org.apache.catalina.core.StandardContext listenerStart
Apr 25, 2019 5:16:58 PM org.apache.catalina.core.StandardContext listenerStart
Apr 25, 2019 5:16:58 PM org.apache.catalina.core.ApplicationContext log

INFO: Closing Spring root WebApplicationContext
Apr 25, 2019 5:16:58 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Apr 25, 2019 5:16:58 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Apr 25, 2019 5:16:58 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('StockTicker', 'async.Stockticker@7524c27')
Apr 25, 2019 5:16:58 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@35a74ca5')
Apr 25, 2019 5:18:47 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Apr 25, 2019 5:18:47 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Apr 25, 2019 5:20:28 PM org.apache.catalina.core.ApplicationContext log

INFO: 2 Spring WebApplicationInitializers detected on classpath
Apr 25, 2019 5:20:28 PM org.apache.catalina.core.ApplicationContext log

INFO: Initializing Spring root WebApplicationContext
Apr 25, 2019 5:20:34 PM org.apache.catalina.core.StandardContext listenerStart
Apr 25, 2019 5:20:34 PM org.apache.catalina.core.StandardContext listenerStart
Apr 25, 2019 5:20:34 PM org.apache.catalina.core.ApplicationContext log

INFO: Closing Spring root WebApplicationContext
Apr 25, 2019 5:20:35 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Apr 25, 2019 5:20:35 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Apr 25, 2019 5:20:35 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('StockTicker', 'async.Stockticker@384f04b0')
Apr 25, 2019 5:20:35 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@63dd3cb6')

Φαιδων Νερουτσος

unread,
May 13, 2019, 6:45:20 PM5/13/19
to xnat_discussion
Good afternoon all,

Hope you are all well! Aas continuing to try to resolve this issue, I built a new CentOS 7.4 and fully updated it.
The commands I have performed to install XNAT server and deploy the war file are the following:


Opening tomcat conf file, find the lines below and add the extra line

# Where your tomcat installation lives
CATALINA_HOME="/usr/share/tomcat"
CATALINA_OPTS="-Dxnat.home=/data/xnat/home -Xms512m -Xmx2048m -XX:MaxPermSize=512m"

chown -RL --dereference tomcat.tomcat /usr/share/tomcat
chown --no-dereference tomcat.tomcat /usr/share/tomcat/*
ls -ld /var/lib/tomcat /var/lib/tomcat/* /etc/tomcat /var/log/tomcat /var/cache/tomcat

mkdir /data/
mkdir /data/xnat
mkdir /data/xnat/{config,logs,plugins,work}
mkdir /data/xnat/home/logs
mkdir /data/xnat/archive
mkdir /data/xnat/build
mkdir /data/xnat/cache
mkdir /data/xnat/ftp
mkdir /data/xnat/pipeline
mkdir /data/xnat/prearchive
chown -R tomcat:tomcat /data/
postgresql-setup initdb
service postgresql start
chkconfig postgresql on

sudo su - postgres
createuser -d xnat
createdb -O xnat xnat

psql
\password xnat
\q
logout

sudo service postgresql restart

vi /data/xnat/home/config/xnat-conf.properties

When creating this file we insert the following lines inside


datasource.driver=org.postgresql.Driver
datasource.url=jdbc:postgresql://localhost/xnat
datasource.username=xnat
datasource.password=xnat

 
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


cd ~
wget https://api.bitbucket.org/2.0/repositories/xnatdev/xnat-web/downloads/xnat-web-1.7.5.3.war
cp xnat-web-1.7.5.3.war /usr/share/tomcat/webapps/ROOT.war



So, while previously I had an error that xnat.home was not configured, now I get the error shown below. I logged in as tomcat user and verified that I can create,modify and delete files and folders on the /data/xnat/home.


INFO: Starting service Catalina

May 03, 2019 2:38:52 PM org.apache.catalina.core.StandardEngine startInternal

INFO: Starting Servlet Engine: Apache Tomcat/7.0.76

May 03, 2019 2:38:52 PM org.apache.catalina.startup.HostConfig deployWAR

INFO: Deploying web application archive /var/lib/tomcat/webapps/ROOT.war

May 03, 2019 2:39:11 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.

May 03, 2019 2:39:11 PM org.apache.catalina.core.ContainerBase addChildInternal

SEVERE: ContainerBase.addChild: start:

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]

                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)

                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:511)

                at java.util.concurrent.FutureTask.run(FutureTask.java:266)

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

                at java.lang.Thread.run(Thread.java:748)

Caused by: org.nrg.framework.exceptions.NrgServiceRuntimeException: Error [Unknown]: Error [Unknown]: An error occurred trying to create the temp folder xnat_88631101668351 in the containing folder /data/xnat/home

                at org.nrg.xnat.initialization.XnatWebAppInitializer.getMultipartConfigElement(XnatWebAppInitializer.java:120)

                at org.nrg.xnat.initialization.XnatWebAppInitializer.customizeRegistration(XnatWebAppInitializer.java:99)

                at org.springframework.web.servlet.support.AbstractDispatcherServletInitializer.registerDispatcherServlet(AbstractDispatcherServletInitializer.java:113)

                at org.springframework.web.servlet.support.AbstractDispatcherServletInitializer.onStartup(AbstractDispatcherServletInitializer.java:71)

                at org.nrg.xnat.initialization.XnatWebAppInitializer.onStartup(XnatWebAppInitializer.java:59)

                at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)

                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5623)

                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

                ... 10 more

 

May 03, 2019 2:39:11 PM org.apache.catalina.startup.HostConfig deployWAR

SEVERE: Error deploying web application archive /var/lib/tomcat/webapps/ROOT.war

java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]

                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:903)

                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:511)

                at java.util.concurrent.FutureTask.run(FutureTask.java:266)

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

                at java.lang.Thread.run(Thread.java:748)

 

May 03, 2019 2:39:11 PM org.apache.catalina.startup.HostConfig deployWAR

INFO: Deployment of web application archive /var/lib/tomcat/webapps/ROOT.war has finished in 19,606 ms

May 03, 2019 2:39:11 PM org.apache.coyote.AbstractProtocol start

INFO: Starting ProtocolHandler ["http-bio-8080"]

May 03, 2019 2:39:11 PM org.apache.coyote.AbstractProtocol start

INFO: Starting ProtocolHandler ["ajp-bio-8009"]

May 03, 2019 2:39:11 PM org.apache.catalina.startup.Catalina start

INFO: Server startup in 19664 ms

 


Thank in advance for any help!

Kind regards,
Faidon

Reply all
Reply to author
Forward
0 new messages