[Résolu] N'arrive pas à utiliser la branche Docker

Bonjour,

En voulant utiliser la branche Docker, je n’arrive pas à faire tourner Asqatasun.
Ci-dessous, les commandes utilisées ainsi que les logs du conteneur Docker.

git fetch origin -p
git checkout -b origin/Docker
mvn clean install

cp -v cli/asqatasun-cli/target/asqatasun-3.2.0-SNAPSHOT.i386.tar.gz docker/Docker-build/asqatasun-3.2.0-20151106-a.i386.tar.gz
cd docker/Docker-build 

docker build -t localhost/asqatsun . 
docker run -d -p 127.0.0.1:8080:8080 localhost/asqatsun

L’URL http://localhost:8080/ affiche:

"It works ! If you’re seeing this page via a web browser, it means you’ve setup Tomcat successfully.


Par contre l’URL http://localhost:8080/asqatasun/ affiche :

Etat HTTP 404 - /asqatasun/


L’affichage des logs du conteneur :

docker logs "id of running container"
  • Starting MySQL database server mysqld …done.
  • Checking for tables which need an upgrade, are corrupt or were not closed cleanly.
  • Starting Tomcat servlet engine tomcat7 …fail!
    Nov 09, 2015 1:20:41 AM org.apache.catalina.core.StandardContext startInternal
    SEVERE: Error listenerStart
    Nov 09, 2015 1:20:41 AM org.apache.catalina.core.StandardContext startInternal
    SEVERE: Context [/asqatasun] startup failed due to previous errors
    Nov 09, 2015 1:20:41 AM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
    Nov 09, 2015 1:20:41 AM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler [“http-bio-8080”]
    Nov 09, 2015 1:20:41 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 5943 ms

En entrant dans le conteneur, l’accès aux fichiers /var/logs/
fourni quelques informations supplémentaires :

docker exec -it "id of running container"  bash
# cat /var/log/asqatasun/asqatasun.log 

Affiche :

09-11-2015 01:20:41:433 0    ERROR org.springframework.web.context.ContextLoader  - Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:conf/context/seo/engine/seo-beans-engine.xml]
Offending resource: ServletContext resource [/WEB-INF/conf/tgol-service.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [conf/context/seo/engine/seo-beans-engine.xml]; nested exception is java.io.FileNotFoundException: class path resource [conf/context/seo/engine/seo-beans-engine.xml] cannot be opened because it does not exist
	at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
	at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
	at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:245)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:196)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:181)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)
	at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:527)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:441)
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
	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.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [conf/context/seo/engine/seo-beans-engine.xml]; nested exception is java.io.FileNotFoundException: class path resource [conf/context/seo/engine/seo-beans-engine.xml] cannot be opened because it does not exist
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:239)
	... 32 more
Caused by: java.io.FileNotFoundException: class path resource [conf/context/seo/engine/seo-beans-engine.xml] cannot be opened because it does not exist
	at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:157)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
	... 36 more

docker exec -it "id of running container"  bash
# cat /var/log/tomcat7/catalina.out 

Affiche :

Nov 09, 2015 1:20:35 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/common/classes], exists: [false], isDirectory: [false], canRead: [false]
Nov 09, 2015 1:20:35 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/common], exists: [false], isDirectory: [false], canRead: [false]
Nov 09, 2015 1:20:35 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server/classes], exists: [false], isDirectory: [false], canRead: [false]
Nov 09, 2015 1:20:35 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/server], exists: [false], isDirectory: [false], canRead: [false]
Nov 09, 2015 1:20:35 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
Nov 09, 2015 1:20:35 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat7/shared], exists: [false], isDirectory: [false], canRead: [false]
Nov 09, 2015 1:20:35 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler [“http-bio-8080”]
Nov 09, 2015 1:20:35 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 322 ms
Nov 09, 2015 1:20:35 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Nov 09, 2015 1:20:35 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
Nov 09, 2015 1:20:35 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/asqatasun
Nov 09, 2015 1:20:41 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Nov 09, 2015 1:20:41 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/asqatasun] startup failed due to previous errors
Nov 09, 2015 1:20:41 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
Nov 09, 2015 1:20:41 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [“http-bio-8080”]
Nov 09, 2015 1:20:41 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5943 ms

@mfaure je pense avoir le même soucis en lançant l’installation dans une VM.
tu veux les logs ?

Alors, c’est pas normal mais c’est normal… (et merci pour le retour)

En résumé, j’ai le même problème, je suis dessus.

Matthieu

A partir de la dernière mise à jour de la branche develop
cela fonctionne maintenant. Merci ! :smile: