Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-20393

Better error notification to users attempting to start confluence with incorrect permissions

    XMLWordPrintable

Details

    • 2
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      NOTE: This suggestion is for Confluence Cloud. Using Confluence Server? See the corresponding suggestion.

      Often system administrators have multiple accounts with different levels of permissions. In the case where the user is logged in with non-administrator access and attempts to start Confluence, the stack trace below is how they are informed that they are trying to start Confluence but don't have permissions.

      It would be more informative for the user if they received a more explicit error.

      16/07/2010 1:32:39 PM org.apache.coyote.http11.Http11Protocol init
      INFO: Initializing Coyote HTTP/1.1 on http-8080
      16/07/2010 1:32:39 PM org.apache.catalina.startup.Catalina load
      INFO: Initialization processed in 457 ms
      16/07/2010 1:32:39 PM org.apache.catalina.core.StandardService start
      INFO: Starting service Tomcat-Standalone
      16/07/2010 1:32:39 PM org.apache.catalina.core.StandardEngine start
      INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
      2010-07-16 13:32:43,803 INFO [main] [com.atlassian.confluence.lifecycle] contextInitialized Starting Confluence 3.3 (build #1911)
      2010-07-16 13:32:45,876 ERROR [main] [atlassian.plugin.util.FileUtils] conditionallyExtractZipFile Found file:/C:/confluence/confluence-3.3-std/confluence/WEB-I
      NF/classes/com/atlassian/confluence/setup/atlassian-bundled-plugins.zip, but failed to read file
      java.io.IOException: Unable to delete file: c:\confluence\data\bundled-plugins_language\confluence-fr_FR-plugin-1.21.jar
              at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1390)
              at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044)
              at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977)
              at com.atlassian.plugin.util.zip.AbstractUnzipper.conditionalUnzip(AbstractUnzipper.java:89)
              at com.atlassian.plugin.util.FileUtils.conditionallyExtractZipFile(FileUtils.java:29)
              at com.atlassian.plugin.loaders.BundledPluginLoader.<init>(BundledPluginLoader.java:27)
              at com.atlassian.confluence.plugin.BundledPluginLoaderFactory.getObject(BundledPluginLoaderFactory.java:68)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectFromFactoryBean(AbstractBeanFactory.java:1246)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1217)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:260)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287)
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:132)
              at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:401)
              at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:121)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:800)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:718)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386)
              at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
              at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
              at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:248)
              at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:820)
              at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:597)
              at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
              at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:122)
              at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:76)
              at com.atlassian.confluence.setup.ConfluenceClassPathXmlApplicationContext.<init>(ConfluenceClassPathXmlApplicationContext.java:26)
              at com.atlassian.confluence.setup.ConfluenceConfigurationListener.initialiseBootstrapContext(ConfluenceConfigurationListener.java:75)
              at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:40)
              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
              at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
              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:566)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      2010-07-16 13:32:45,988 INFO [main] [atlassian.plugin.manager.DefaultPluginManager] init Initialising the plugin system
      2010-07-16 13:32:46,210 INFO [main] [atlassian.plugin.manager.DefaultPluginManager] init Plugin system started in 0:00:00.221
      2010-07-16 13:32:47,650 WARN [main] [atlassian.config.xml.AbstractDom4jXmlConfigurationPersister] saveDocumentAtomically Unable to move C:\confluence\data\confl
      uence.cfg.xml1917399579089194064tmp to C:\confluence\data\confluence.cfg.xml. Falling back to non-atomic overwrite.
      2010-07-16 13:32:47,651 ERROR [main] [atlassian.confluence.setup.DefaultSetupPersister] setSetupType Could not save setupType:com.atlassian.config.Configuration
      Exception: Couldn't save confluence.cfg.xml to C:\confluence\data directory.
      log4j:ERROR setFile(null,true) call failed.
      java.io.FileNotFoundException: C:\confluence\data\logs\atlassian-confluence.log (Access is denied)
              at java.io.FileOutputStream.openAppend(Native Method)
              at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
              at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
              at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
              at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:194)
              at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:164)
              at com.atlassian.confluence.logging.ConfluenceHomeLogAppender.switchAppender(ConfluenceHomeLogAppender.java:176)
              at com.atlassian.confluence.logging.ConfluenceLoggingConfigurationListener.onApplicationEvent(ConfluenceLoggingConfigurationListener.java:78)
              at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
              at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
              at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
              at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)
              at com.atlassian.confluence.setup.ConfluenceConfigurationListener.initialiseBootstrapContext(ConfluenceConfigurationListener.java:77)
              at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:40)
              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
              at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
              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:566)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      16/07/2010 1:33:24 PM org.apache.catalina.core.StandardContext start
      SEVERE: Error listenerStart
      16/07/2010 1:33:24 PM org.apache.catalina.core.StandardContext start
      SEVERE: Context [] startup failed due to previous errors
      log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
      16/07/2010 1:33:26 PM org.apache.coyote.http11.Http11Protocol start
      INFO: Starting Coyote HTTP/1.1 on http-8080
      16/07/2010 1:33:26 PM org.apache.catalina.startup.Catalina start
      INFO: Server startup in 46788 ms
      
      

      In Confluence 5.2.3 the error is:

      2013-08-14 13:39:22,368 ERROR [main] [atlassian.confluence.setup.DefaultSetupPersister] setSetupType Could not save setupType
      com.atlassian.config.ConfigurationException: Couldn't save confluence.cfg.xml to /var/conf523-home directory.
              at com.atlassian.config.xml.AbstractDom4jXmlConfigurationPersister.saveDocument(AbstractDom4jXmlConfigurationPersister.java:83)
              at com.atlassian.config.xml.DefaultDom4jXmlConfigurationPersister.save(DefaultDom4jXmlConfigurationPersister.java:24)
              at com.atlassian.config.ApplicationConfig.save(ApplicationConfig.java:286)
              at com.atlassian.confluence.setup.DefaultSetupPersister.setSetupType(DefaultSetupPersister.java:181)
              at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:76)
              at com.atlassian.config.util.BootstrapUtils.init(BootstrapUtils.java:36)
              at com.atlassian.confluence.setup.ConfluenceConfigurationListener.initialiseBootstrapContext(ConfluenceConfigurationListener.java:87)
              at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:43)
              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
              at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
              at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
              at org.apache.catalina.core.StandardService.start(StandardService.java:525)
              at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
              at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
              at java.lang.reflect.Method.invoke(Unknown Source)
              at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
      Caused by: java.io.IOException: Permission denied
              at java.io.UnixFileSystem.createFileExclusively(Native Method)
              at java.io.File.createTempFile(Unknown Source)
              at com.atlassian.config.xml.AbstractDom4jXmlConfigurationPersister.saveDocumentAtomically(AbstractDom4jXmlConfigurationPersister.java:89)
              at com.atlassian.config.xml.AbstractDom4jXmlConfigurationPersister.saveDocument(AbstractDom4jXmlConfigurationPersister.java:79)
              ... 22 more
      

      This could be better displayed in a human readable page in a browser. Instead I simply saw a white webpage with this text:

      Error occurred during template rendering: Invocation of method 'getLocale' in class com.atlassian.confluence.core.ConfluenceActionSupport threw exception java.lang.IllegalStateException: Spring Application context has not been set at /decorators/includes/header.vm[line 57, column 41]. Contact your administrator for assistance.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mcompton Marlena Compton [Atlassian]
              Votes:
              3 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: