Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-4997

After some time (a few days) without restart, a FileNotFound Exception on the key pair.properties happens

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Neutral
    • Resolution: Cannot Reproduce
    • Affects Version/s: 4.5.8
    • Fix Version/s: None
    • Component/s: activation
    • Labels:
      None
    • Environment:
      CE, Java 1.6

      Description

      After a restart the activation works again.

      java.lang.SecurityException: Failed to retrieve private key. Please make sure the key is located in WEB-INF/config/default/keypair.properties
      at info.magnolia.module.exchangesimple.BaseSyndicatorImpl.activate(BaseSyndicatorImpl.java:358)
      at info.magnolia.module.exchangesimple.BaseSyndicatorImpl.activate(BaseSyndicatorImpl.java:282)
      at info.magnolia.module.admininterface.commands.ActivationCommand.activateUpdate(ActivationCommand.java:123)
      at info.magnolia.module.admininterface.commands.ActivationCommand.execute(ActivationCommand.java:94)
      at info.magnolia.commands.MgnlCommand.executePooledOrSynchronized(MgnlCommand.java:174)
      at info.magnolia.commands.MgnlCommand.execute(MgnlCommand.java:161)
      at info.magnolia.commands.DelegateCommand.execute(DelegateCommand.java:62)
      at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
      at info.magnolia.cms.servlets.CommandBasedMVCServletHandler.execute(CommandBasedMVCServletHandler.java:96)
      at info.magnolia.cms.servlets.MVCServlet.doPost(MVCServlet.java:125)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at info.magnolia.cms.filters.ServletDispatchingFilter.doFilter(ServletDispatchingFilter.java:123)
      at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:91)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:83)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:85)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:85)
      at info.magnolia.cms.filters.CompositeFilter.doFilter(CompositeFilter.java:67)
      at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:91)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:83)
      at info.magnolia.cms.filters.VirtualUriFilter.doFilter(VirtualUriFilter.java:70)
      at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:91)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:83)
      at info.magnolia.module.cache.executor.Bypass.processCacheRequest(Bypass.java:58)
      at info.magnolia.module.cache.executor.CompositeExecutor.processCacheRequest(CompositeExecutor.java:66)
      at info.magnolia.module.cache.filter.CacheFilter.doFilter(CacheFilter.java:153)
      at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:61)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:83)
      at info.magnolia.cms.i18n.I18nContentSupportFilter.doFilter(I18nContentSupportFilter.java:76)
      at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:91)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:83)
      at info.magnolia.cms.filters.RangeSupportFilter.doFilter(RangeSupportFilter.java:84)
      at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:91)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:83)
      at info.magnolia.cms.security.BaseSecurityFilter.doFilter(BaseSecurityFilter.java:60)
      at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:91)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:83)
      at info.magnolia.cms.security.SecurityCallbackFilter.doFilter(SecurityCallbackFilter.java:86)
      at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:61)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:83)
      at info.magnolia.cms.security.LogoutFilter.doFilter(LogoutFilter.java:93)
      at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:61)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:83)
      at info.magnolia.module.templatingkit.filters.SiteMergeFilter.doFilter(SiteMergeFilter.java:99)
      at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:91)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:83)
      at info.magnolia.cms.filters.MultiChannelFilter.doFilter(MultiChannelFilter.java:83)
      at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:61)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:83)
      at info.magnolia.module.cache.filter.GZipFilter.doFilter(GZipFilter.java:75)
      at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:61)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:83)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:85)
      at info.magnolia.cms.security.auth.login.LoginFilter.doFilter(LoginFilter.java:93)
      at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:91)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:83)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:85)
      at info.magnolia.cms.filters.CosMultipartRequestFilter.doFilter(CosMultipartRequestFilter.java:91)
      at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:61)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:83)
      at info.magnolia.module.devicedetection.filter.DeviceDetectionFilter.doFilter(DeviceDetectionFilter.java:73)
      at info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:61)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:83)
      at info.magnolia.cms.filters.ContentTypeFilter.doFilter(ContentTypeFilter.java:102)
      at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:91)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:83)
      at info.magnolia.cms.filters.ContextFilter.doFilter(ContextFilter.java:131)
      at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:91)
      at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:83)
      at info.magnolia.cms.filters.CompositeFilter.doFilter(CompositeFilter.java:67)
      at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:91)
      at info.magnolia.cms.filters.SafeDestroyMgnlFilterWrapper.doFilter(SafeDestroyMgnlFilterWrapper.java:108)
      at info.magnolia.cms.filters.MgnlFilterDispatcher.doDispatch(MgnlFilterDispatcher.java:67)
      at info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:108)
      at info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:94)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: info.magnolia.cms.exchange.ExchangeException: 1 error detected:
      java.lang.SecurityException: Failed to retrieve private key. Please make sure the key is located in WEB-INF/config/default/keypair.properties
      at info.magnolia.module.exchangesimple.SimpleSyndicator.handleErrors(SimpleSyndicator.java:95)
      at info.magnolia.module.exchangesimple.SimpleSyndicator.activate(SimpleSyndicator.java:86)
      at info.magnolia.module.exchangesimple.BaseSyndicatorImpl.activate(BaseSyndicatorImpl.java:322)
      ... 89 more
      Caused by: java.lang.SecurityException: Failed to retrieve private key. Please make sure the key is located in WEB-INF/config/default/keypair.properties
      at info.magnolia.cms.security.SecurityUtil.getPrivateKey(SecurityUtil.java:263)
      at info.magnolia.cms.security.SecurityUtil.encrypt(SecurityUtil.java:185)
      at info.magnolia.module.exchangesimple.BaseSyndicatorImpl.addActivationHeaders(BaseSyndicatorImpl.java:591)
      at info.magnolia.module.exchangesimple.BaseSyndicatorImpl.transportActivatedData(BaseSyndicatorImpl.java:454)
      at info.magnolia.module.exchangesimple.BaseSyndicatorImpl.activate(BaseSyndicatorImpl.java:405)
      at info.magnolia.module.exchangesimple.SimpleSyndicator$2.runTask(SimpleSyndicator.java:103)
      at info.magnolia.module.exchangesimple.ExchangeTask.run(ExchangeTask.java:75)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
      ... 1 more
      Caused by: java.io.FileNotFoundException: WEB-INF/config/default/keypair.properties (No such file or directory)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.<init>(FileInputStream.java:120)
      at java.io.FileInputStream.<init>(FileInputStream.java:79)
      at info.magnolia.cms.security.SecurityUtil.getPrivateKey(SecurityUtil.java:258)
      ... 8 more

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            tomwespi Tom Wespi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: