1. Sebastian Sebastian
  2. scm-manager
  3. Issues

Issues

Issue #172 resolved

Issues with webapp deploy on CentOS6 with Tomcat6

Alexey Bandurkin
created an issue

There is an error occurred during SCM-Manager startup.

  java.lang.IllegalStateException: could not create home directory at /usr/share/tomcat6/.scm
at sonia.scm.BasicContextProvider.findBaseDirectory(BasicContextProvider.java:216)
at sonia.scm.BasicContextProvider.(BasicContextProvider.java:94)
at sonia.scm.SCMContext.getContext(SCMContext.java:78)
at sonia.scm.ScmLogFilePropertyDefiner.(ScmLogFilePropertyDefiner.java:62)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:50)
at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:32)
at ch.qos.logback.core.joran.action.DefinePropertyAction.begin(DefinePropertyAction.java:64)
at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:276)
at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:148)
at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:130)
at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:147)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:133)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:96)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:55)
at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:148)
at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
at org.slf4j.impl.StaticLoggerBinder.(StaticLoggerBinder.java:54)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:279)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:252)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:265)
at sonia.scm.boot.BootstrapListener.(BootstrapListener.java:76)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3916)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
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:119)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

Comments (8)

  1. Sebastian Sebastian repo owner
    • changed status to open

    The unix user which runs the scm-manager instance has no write access to /usr/share/tomcat6/. SCM-Manager tries to create its home directory in the user directory of the user which controls the process. I think the best solution for this problem is to change the location of the scm home directory.

    Have a look at the section "How can i change the SCM-Manager home directory?" of https://bitbucket.org/sdorra/scm-manager/wiki/faq.

  2. Sebastian Sebastian repo owner

    You have to create the directory by your self and change the owner to the user which controls the tomcat process e.g.:

    mkdir /var/scm
    chown tomcat:tomcat /var/scm
    

    The WEB-INF/classes/scm.properties is not the best solution for your needs. Because when you create a update of scm-manager you have to reedit this file. A more cleaner solution for you is to edit the catalina.sh script of your tomcat and add the environment variable for scm-manager like SCM_HOME=/var/scm.

  3. Log in to comment