Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
None
-
SB/KB, BNF
-
NAS 5.3
Description
Update : I try to launch the GUI while debbuging with Eclipse, and the root error seems to be this one :
java.lang.IllegalArgumentException: The main resource set specified [/home/ccm/ccm_klm/tmp/webpages/HarvestDefinition.war] is not valid java.lang.IllegalArgumentException: The main resource set specified [/home/ccm/ccm_klm/tmp/webpages/HarvestChannel.war] is not valid ...
I've never specified such a path for my tempDir, which is actually :
<tempDir>/home/ccm/ccm_klm/tmp/netarchivesuite</tempDir>
So I try to look into the code to find out what happens, in the GUIWebServer class :
// Use directory in commontempdir for cache final File tempDir = FileUtils.getTempDir(); log.debug("GUI using tempdir " + tempDir); File basedir = tempDir.getAbsoluteFile().getParentFile(); log.debug("GUI using basedir " + basedir); server.setBaseDir(basedir.getAbsolutePath()); File webapps = new File(basedir, "/webapps"); if (webapps.exists()) { FileUtils.removeRecursively(webapps); log.info("Deleted existing tempdir '" + webapps.getAbsolutePath() + "'"); } webapps.mkdirs();
What I understand here is that the GUI go to the parent directory of the tempDir specified, then create a directory "webapps" to put the WAR files into.
But a few lines later, the same method tries to add WAR files into the Tomcat instance, based on this baseDir directory (tempDir's parent) :
try { //add the jar file to tomcat String warfile = new File(basedir, webApps[i]).getAbsolutePath();
And as this path is incorrect (the directory is empty), the Tomcat instance cannot start.
_____________________________________________________________________________
This is my deploy.xml : http://pastebin.com/EghXTFLA
I have the following error when trying to start the GUI, from the current last commit (2fe1b78) of NAS
15:33:07.358 INFO d.n.common.utils.ApplicationUtils - Starting dk.netarkivet.common.webinterface.GUIWebServer Version: 5.2-SNAPSHOT (<a href="https://github.com/netarchivesuite/netarchivesuite/commit/5054871acc371dac8dcc4e5391d09766b3fecac2">5054871acc</a>) 15:33:07.388 INFO d.n.common.utils.ApplicationUtils - Java VM: 1.8.0_92 15:33:07.389 INFO d.n.common.utils.ApplicationUtils - java.home: /usr/java/jdk1.8.0_92/jre 15:33:07.398 INFO d.n.common.utils.ApplicationUtils - Working dir: /home/ccm/ccm_klm/nas_deploy/NAS700DEV 15:33:07.400 INFO d.n.common.utils.ApplicationUtils - Using settings files '/home/ccm/ccm_klm/nas_deploy/NAS700DEV/conf/settings_GUIApplication.xml' 15:33:08.085 INFO d.n.m.d.JMSMonitorRegistryClient - Registering this client for monitoring every 1 minutes, using hostname 'vpfvdx60.pfvd.nt.bnf.fr' and JMX/RMI ports 8100/8200 15:33:08.086 INFO d.n.c.m.MBeanConnectorCreator - Registered mbean server in registry on port 8100 communicating on port 8200 using password file 'conf/jmxremote.password'. Service URL is service:jmx:rmi://vpfvdx60.pfvd.nt.bnf.fr:8200/jndi/rmi://vpfvdx60.pfvd.nt.bnf.fr:8100/jmxrmi 15:33:08.096 INFO d.n.common.utils.ApplicationUtils - dk.netarkivet.common.webinterface.GUIWebServer Running 15:33:08.102 DEBUG d.n.common.webinterface.GUIWebServer - Inside getInstance 15:33:08.103 DEBUG dk.netarkivet.common.utils.Settings - Value found in loaded data: webpages/HarvestDefinition.war,webpages/HarvestChannel.war,webpages/History.war,webpages/QA.war,webpages/Status.war 15:33:08.104 DEBUG dk.netarkivet.common.utils.Settings - Value found in loaded data: dk.netarkivet.harvester.webinterface.DefinitionsSiteSection,dk.netarkivet.harvester.webinterface.HarvestChannelSiteSection,dk.netarkivet.harvester.webinterface.HistorySiteSection,dk.netarkivet.viewerproxy.webinterface.QASiteSection,dk.netarkivet.monitor.webinterface.StatusSiteSection 15:33:08.104 INFO d.n.common.webinterface.GUIWebServer - Starting webserver. Port: 8070 deployment directories: 'webpages/HarvestDefinition.war,webpages/HarvestChannel.war,webpages/History.war,webpages/QA.war,webpages/Status.war' classes: 'dk.netarkivet.harvester.webinterface.DefinitionsSiteSection,dk.netarkivet.harvester.webinterface.HarvestChannelSiteSection,dk.netarkivet.harvester.webinterface.HistorySiteSection,dk.netarkivet.viewerproxy.webinterface.QASiteSection,dk.netarkivet.monitor.webinterface.StatusSiteSection' 15:33:08.128 DEBUG d.n.common.webinterface.GUIWebServer - GUI using tempdir /home/ccm/ccm_klm/tmp/netarchivesuite 15:33:08.129 DEBUG d.n.common.webinterface.GUIWebServer - GUI using basedir /home/ccm/ccm_klm/tmp 15:33:08.136 INFO d.n.common.webinterface.GUIWebServer - Deleted existing tempdir '/home/ccm/ccm_klm/tmp/webapps' 15:33:08.133 INFO d.n.c.distribute.JMSConnectionSunMQ - Creating instance of dk.netarkivet.common.distribute.JMSConnectionSunMQ 15:33:08.141 DEBUG dk.netarkivet.common.utils.Settings - Value found in loaded data: dk.netarkivet.harvester.webinterface.DefinitionsSiteSection,dk.netarkivet.harvester.webinterface.HarvestChannelSiteSection,dk.netarkivet.harvester.webinterface.HistorySiteSection,dk.netarkivet.viewerproxy.webinterface.QASiteSection,dk.netarkivet.monitor.webinterface.StatusSiteSection 15:33:08.138 DEBUG d.n.common.distribute.JMSConnection - Initializing a JMS connection dk.netarkivet.common.distribute.JMSConnectionSunMQ 15:33:08.151 INFO d.n.c.distribute.JMSConnectionSunMQ - Establishing SunMQ JMS Connection to 'vpfvdx60.pfvd.nt.bnf.fr:7676' 15:33:08.879 INFO d.n.h.datamodel.HarvestDBConnection - Connection pool initialized with the following values: - minPoolSize=5 - maxPoolSize=30 - acquireIncrement=5 - maxStatements=0 - maxStatementsPerConnection=10 - idleConnTestPeriod=0 - idleConnTestQuery='null' - idleConnTestOnCheckin=false 15:33:09.421 DEBUG d.n.common.distribute.JMSConnection - Adding dk.netarkivet.harvester.harvesting.monitor.HarvestMonitor@293a5f75 as listener to NAS700DEV_COMMON_HARVESTMON 15:33:09.713 INFO d.n.common.webinterface.GUIWebServer - Scanning for taglibs is disabled as tomcat.util.scan.StandardJarScanFilter.jarsToSkip is unset. 15:33:09.730 INFO d.n.common.webinterface.GUIWebServer - Scanning for taglibs is disabled as tomcat.util.scan.StandardJarScanFilter.jarsToSkip is unset. 15:33:09.735 INFO d.n.common.webinterface.GUIWebServer - Scanning for taglibs is disabled as tomcat.util.scan.StandardJarScanFilter.jarsToSkip is unset. 15:33:09.737 INFO d.n.common.webinterface.GUIWebServer - Scanning for taglibs is disabled as tomcat.util.scan.StandardJarScanFilter.jarsToSkip is unset. 15:33:09.739 DEBUG d.n.common.distribute.JMSConnection - Adding dk.netarkivet.monitor.registry.distribute.MonitorRegistryServer@2a8d39c4 as listener to NAS700DEV_COMMON_MONITOR_TOPIC 15:33:09.749 INFO d.n.m.r.d.MonitorRegistryServer - MonitorRegistryServer listening for messages on channel '[Topic 'NAS700DEV_COMMON_MONITOR_TOPIC']' 15:33:09.751 INFO d.n.common.webinterface.GUIWebServer - Scanning for taglibs is disabled as tomcat.util.scan.StandardJarScanFilter.jarsToSkip is unset. 15:33:09.922 INFO d.n.monitor.registry.MonitorRegistry - Added host 'vpfvdx60.pfvd.nt.bnf.fr' port 8105/8205 15:33:10.138 INFO d.n.monitor.registry.MonitorRegistry - Added host 'vpfvdx60.pfvd.nt.bnf.fr' port 8104/8204 15:33:10.425 INFO d.n.common.webinterface.GUIWebServer - GUI webserver has been stopped. 15:33:10.432 WARN d.n.common.webinterface.GUIWebServer - Could not start GUI org.apache.catalina.LifecycleException: Failed to start component [StandardServer[-1]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.startup.Tomcat.start(Tomcat.java:345) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at dk.netarkivet.common.webinterface.GUIWebServer.startServer(GUIWebServer.java:190) [common-core-5.2-SNAPSHOT.jar:5054871acc371dac8dcc4e5391d09766b3fecac2] at dk.netarkivet.common.webinterface.GUIWebServer.getInstance(GUIWebServer.java:175) [common-core-5.2-SNAPSHOT.jar:5054871acc371dac8dcc4e5391d09766b3fecac2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_92] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_92] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_92] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_92] at dk.netarkivet.common.utils.ApplicationUtils.startApp(ApplicationUtils.java:169) [common-core-5.2-SNAPSHOT.jar:5054871acc371dac8dcc4e5391d09766b3fecac2] at dk.netarkivet.common.webinterface.GUIApplication.main(GUIApplication.java:38) [common-core-5.2-SNAPSHOT.jar:5054871acc371dac8dcc4e5391d09766b3fecac2] Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Tomcat]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:769) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) ~[tomcat-embed-core-8.0.32.jar:8.0.32] ... 9 common frames omitted Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) ~[tomcat-embed-core-8.0.32.jar:8.0.32] ... 11 common frames omitted Caused by: org.apache.catalina.LifecycleException: A child container failed during start at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:924) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) ~[tomcat-embed-core-8.0.32.jar:8.0.32] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) ~[tomcat-embed-core-8.0.32.jar:8.0.32] ... 13 common frames omitted 15:33:10.434 ERROR d.n.common.utils.ApplicationUtils - Could not add shutdown hook for class dk.netarkivet.common.webinterface.GUIWebServer dk.netarkivet.common.exceptions.ArgumentNotValid: The value of the variable 'CleanupIF app' must not be null. at dk.netarkivet.common.exceptions.ArgumentNotValid.checkNotNull(ArgumentNotValid.java:76) ~[common-core-5.2-SNAPSHOT.jar:5054871acc371dac8dcc4e5391d09766b3fecac2] at dk.netarkivet.common.utils.CleanupHook.<init>(CleanupHook.java:48) ~[common-core-5.2-SNAPSHOT.jar:5054871acc371dac8dcc4e5391d09766b3fecac2] at dk.netarkivet.common.utils.ApplicationUtils.startApp(ApplicationUtils.java:178) ~[common-core-5.2-SNAPSHOT.jar:5054871acc371dac8dcc4e5391d09766b3fecac2] at dk.netarkivet.common.webinterface.GUIApplication.main(GUIApplication.java:38) [common-core-5.2-SNAPSHOT.jar:5054871acc371dac8dcc4e5391d09766b3fecac2] 15:33:10.661 ERROR d.n.common.utils.EMailNotifications - Mailing NetarchiveSuite-ERROR: Could not add shutdown hook for class dk.netarkivet.common.webinterface.GUIWebServer dk.netarkivet.common.exceptions.ArgumentNotValid: The value of the variable 'CleanupIF app' must not be null. at dk.netarkivet.common.exceptions.ArgumentNotValid.checkNotNull(ArgumentNotValid.java:76) ~[common-core-5.2-SNAPSHOT.jar:5054871acc371dac8dcc4e5391d09766b3fecac2] at dk.netarkivet.common.utils.CleanupHook.<init>(CleanupHook.java:48) ~[common-core-5.2-SNAPSHOT.jar:5054871acc371dac8dcc4e5391d09766b3fecac2] at dk.netarkivet.common.utils.ApplicationUtils.startApp(ApplicationUtils.java:178) ~[common-core-5.2-SNAPSHOT.jar:5054871acc371dac8dcc4e5391d09766b3fecac2] at dk.netarkivet.common.webinterface.GUIApplication.main(GUIApplication.java:38) [common-core-5.2-SNAPSHOT.jar:5054871acc371dac8dcc4e5391d09766b3fecac2] 15:33:10.662 INFO d.n.m.d.JMSMonitorRegistryClient - Cleaning up dk.netarkivet.monitor.distribute.JMSMonitorRegistryClient 15:33:10.662 INFO d.n.c.distribute.JMSConnectionSunMQ - Cleaning up dk.netarkivet.common.distribute.JMSConnectionSunMQ 15:33:10.663 INFO d.n.common.distribute.JMSConnection - Starting cleanup 15:33:10.663 INFO d.n.m.d.JMSMonitorRegistryClient - Cleaned up dk.netarkivet.monitor.distribute.JMSMonitorRegistryClient 15:33:10.681 INFO d.n.common.distribute.JMSConnection - Cleanup finished 15:33:10.682 INFO d.n.c.distribute.JMSConnectionSunMQ - Cleaned up dk.netarkivet.common.distribute.JMSConnectionSunMQ