Forum Ametys

Forum de la communauté Ametys

You are not logged in.

#1 16/09/2016 12:54:47

vcotrez
Guest
Registered: 17/06/2016
Posts: 22

Installation sur CentOS et problème création fichier .lock

Bonjour,
Je rencontre un problème à l'installation d'Ametys sur un serveur Centos.
Tomcat me renvoie l'erreur ci-après.

Il semblerait que ce soit un problème à la création d'un fichier .lock dans le repository.

Je précise que les services Tomcat et Apache sont lancés en compte root et que le compte cms a les droits 'rwx' sur tous les répertoires du cms.

Je vous remercie par avance pour votre aide.
Vincent

An error occurred. Please contact the administrator of the application.org.apache.avalon.framework.component.ComponentException: Unable to initialize the ComponentManager (key [org.apache.cocoon.Processor])
    at org.ametys.runtime.cocoon.TreeProcessor.compose(TreeProcessor.java:94)
    at org.apache.avalon.framework.container.ContainerUtil.compose(ContainerUtil.java:173)
    at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:266)
    at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:108)
    at org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:524)
    at org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:583)
    at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
    at org.apache.cocoon.Cocoon.initialize(Cocoon.java:345)
    at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
    at org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1435)
    at org.ametys.runtime.servlet.RuntimeServlet.createCocoon(RuntimeServlet.java:225)
    at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:495)
    at org.ametys.runtime.servlet.RuntimeServlet.init(RuntimeServlet.java:171)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4425)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4738)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.Exception: Caught an exception trying to initialize the component org.ametys.plugins.flipbook.ConvertContentAttachment2ImagesComponent
    at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.initialize(ThreadSafeComponentManager.java:205)
    at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
    at org.ametys.runtime.cocoon.TreeProcessor.compose(TreeProcessor.java:62)
    ... 38 more
Caused by: org.apache.avalon.framework.service.ServiceException: Unable to initialize component org.ametys.plugins.repository.AmetysObjectResolver (key [org.ametys.plugins.repository.AmetysObjectResolver]) (Key='org.ametys.plugins.repository.AmetysObjectResolver')
    at org.apache.avalon.framework.service.WrapperServiceManager.lookup(WrapperServiceManager.java:80)
    at org.ametys.plugins.flipbook.AbstractConvertDocument2ImagesComponent.service(AbstractConvertDocument2ImagesComponent.java:75)
    at org.apache.avalon.framework.container.ContainerUtil.service(ContainerUtil.java:143)
    at org.ametys.runtime.plugin.component.ThreadSafeComponentManager$ComponentFactory.instanciate(ThreadSafeComponentManager.java:376)
    at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:104)
    at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:94)
    at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.initialize(ThreadSafeComponentManager.java:200)
    ... 40 more
Caused by: org.apache.avalon.framework.component.ComponentException: Unable to initialize component org.ametys.plugins.repository.AmetysObjectResolver (key [org.ametys.plugins.repository.AmetysObjectResolver])
    at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.lookup(ThreadSafeComponentManager.java:134)
    at org.ametys.runtime.plugin.component.PluginsComponentManager.lookup(PluginsComponentManager.java:64)
    at org.apache.avalon.framework.service.WrapperServiceManager.lookup(WrapperServiceManager.java:68)
    ... 46 more
Caused by: org.apache.avalon.framework.service.ServiceException: Unable to initialize component org.ametys.plugins.repository.AmetysObjectFactoryExtensionPoint (key [org.ametys.plugins.repository.AmetysObjectFactoryExtensionPoint]) (Key='org.ametys.plugins.repository.AmetysObjectFactoryExtensionPoint')
    at org.apache.avalon.framework.service.WrapperServiceManager.lookup(WrapperServiceManager.java:80)
    at org.ametys.plugins.repository.AmetysObjectResolver.service(AmetysObjectResolver.java:80)
    at org.apache.avalon.framework.container.ContainerUtil.service(ContainerUtil.java:143)
    at org.ametys.runtime.plugin.component.ThreadSafeComponentManager$ComponentFactory.instanciate(ThreadSafeComponentManager.java:376)
    at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:104)
    at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:94)
    at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.lookup(ThreadSafeComponentManager.java:130)
    ... 48 more
Caused by: org.apache.avalon.framework.component.ComponentException: Unable to initialize component org.ametys.plugins.repository.AmetysObjectFactoryExtensionPoint (key [org.ametys.plugins.repository.AmetysObjectFactoryExtensionPoint])
    at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.lookup(ThreadSafeComponentManager.java:134)
    at org.ametys.runtime.plugin.component.PluginsComponentManager.lookup(PluginsComponentManager.java:64)
    at org.apache.avalon.framework.service.WrapperServiceManager.lookup(WrapperServiceManager.java:68)
    ... 54 more
Caused by: org.apache.avalon.framework.service.ServiceException: Unable to initialize component javax.jcr.Repository (key [javax.jcr.Repository]) (Key='javax.jcr.Repository')
    at org.apache.avalon.framework.service.WrapperServiceManager.lookup(WrapperServiceManager.java:80)
    at org.ametys.plugins.repository.AmetysObjectFactoryExtensionPoint.service(AmetysObjectFactoryExtensionPoint.java:67)
    at org.apache.avalon.framework.container.ContainerUtil.service(ContainerUtil.java:143)
    at org.ametys.runtime.plugin.component.ThreadSafeComponentManager$ComponentFactory.instanciate(ThreadSafeComponentManager.java:376)
    at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:104)
    at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:94)
    at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.lookup(ThreadSafeComponentManager.java:130)
    ... 56 more
Caused by: org.apache.avalon.framework.component.ComponentException: Unable to initialize component javax.jcr.Repository (key [javax.jcr.Repository])
    at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.lookup(ThreadSafeComponentManager.java:134)
    at org.ametys.runtime.plugin.component.PluginsComponentManager.lookup(PluginsComponentManager.java:64)
    at org.apache.avalon.framework.service.WrapperServiceManager.lookup(WrapperServiceManager.java:68)
    ... 62 more
Caused by: javax.jcr.RepositoryException: Unable to create or lock file /home/cms/Ametys_CMS/application/v1_0_0/cms/WEB-INF/data/repository/.lock
    at org.apache.jackrabbit.core.util.RepositoryLock.tryLock(RepositoryLock.java:155)
    at org.apache.jackrabbit.core.util.RepositoryLock.acquire(RepositoryLock.java:138)
    at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:253)
    at org.ametys.plugins.repository.provider.AmetysRepository.<init>(AmetysRepository.java:45)
    at org.ametys.plugins.repository.provider.JackrabbitRepository.initialize(JackrabbitRepository.java:77)
    at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
    at org.ametys.runtime.plugin.component.ThreadSafeComponentManager$ComponentFactory.configureAndStart(ThreadSafeComponentManager.java:392)
    at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:112)
    at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:94)
    at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.lookup(ThreadSafeComponentManager.java:130)
    ... 64 more
Caused by: java.io.FileNotFoundException: /home/cms/Ametys_CMS/application/v1_0_0/cms/WEB-INF/data/repository/.lock (Permission non accordée)
    at java.io.RandomAccessFile.open0(Native Method)
    at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
    at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)
    at org.apache.jackrabbit.core.util.RepositoryLock.tryLock(RepositoryLock.java:152)
    ... 73 more

Offline

#2 16/09/2016 13:47:43

Raphaël Franchet
Expert Team
From: Toulouse
Registered: 10/08/2010
Posts: 1,111

Re: Installation sur CentOS et problème création fichier .lock

L'erreur importante est donc : java.io.FileNotFoundException: /home/cms/Ametys_CMS/application/v1_0_0/cms/WEB-INF/data/repository/.lock (Permission non accordée)

Vous avez donc bien un problème de droits.
Lancer tomcat en root est plutôt une mauvaise idée, mais du coup, ce qui compte c'est que ROOT ait les droits sur les fichiers de l'application (pas 'cms').

Je vous recommande vivement de lancer tomcat en cms plutôt.
(après avoir donner les droits qui conviennent dans le repertoire tomcat puisque des tas de fichiers ont maintenant été créé en root)


Raphael Franchet
Expert Ametys

Offline

#3 20/09/2016 08:22:43

vcotrez
Guest
Registered: 17/06/2016
Posts: 22

Re: Installation sur CentOS et problème création fichier .lock

Bonjour,
Merci pour votre réponse.
C'était effectivement un problème de droits, tomcat est en fait lancé en user 'tomcat', sur je mets les droits sur l'arborescence cms à l'utilisateur 'tomcat', cela fonctionne.

En revanche je rencontre une anomalie en édition de site.
Dans l'interface d'édition d'une page, les gabarits ne sont pas présents, et les pages s'affichent sans gabarit, les css ne sont pas pris en compte notamment.
Curieusement, cette anomalie ne se produit pas en visualisation 'Version en ligne'.

Pour être clair, je mets une copie d'écran en fichier attaché.

Offline

#4 28/09/2016 15:05:12

Raphaël Franchet
Expert Team
From: Toulouse
Registered: 10/08/2010
Posts: 1,111

Re: Installation sur CentOS et problème création fichier .lock

Concernant la miniature des gabarits, cela se déclare dans le fichier template.xml du template.
Par exemple:

<template>
    <label i18n="true">SKIN_BO_ZONING_BLOG_LABEL</label> 
    <description i18n="true">SKIN_BO_ZONING_BLOG_DESCRIPTION</description> 

    <thumbnail> 
        <medium>thumbnail_32.png</medium> 
        <large>thumbnail_48.png</large>
    </thumbnail> 

Le fichier doit être placé dans le répertoire "resources" du gabarit en question.


Concernant la preview, elle utilise la même url que la prévisualisation. Du coup il s'agit peut être simplement d'un problème de cache du navigateur.


Raphael Franchet
Expert Ametys

Offline

Board footer

Powered by FluxBB