2017-06-21 69 views
2

我得到這個錯誤在我們的生產環境 -如何解決AEM6.1中的「org.apache.sling.servlets.post.impl.operations.ModifyOperation無法創建資源」錯誤?

*ERROR* [10.49.33.40 [1498065304267] POST /content/mywebsite/en/autodiscover/autodiscover.xml HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Unable to create resource named autodiscover.xml in /content/mywebsite/en/autodiscover 
21.06.2017 13:15:04.270 *ERROR* [10.49.33.40 [1498065304267] POST /content/mywebsite/en/autodiscover/autodiscover.xml HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Exception during response processing. 
javax.jcr.nodetype.ConstraintViolationException: No default node type available for /content/mywebsite/en/autodiscover/autodiscover.xml 
       at org.apache.jackrabbit.oak.util.TreeUtil.addChild(TreeUtil.java:186) 
       at org.apache.jackrabbit.oak.jcr.delegate.NodeDelegate.addChild(NodeDelegate.java:692) 
       at org.apache.jackrabbit.oak.jcr.session.NodeImpl$5.perform(NodeImpl.java:296) 
       at org.apache.jackrabbit.oak.jcr.session.NodeImpl$5.perform(NodeImpl.java:262) 
       at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:200) 
       at org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:112) 
       at org.apache.jackrabbit.oak.jcr.session.NodeImpl.addNode(NodeImpl.java:262) 
       at org.apache.jackrabbit.oak.jcr.session.NodeImpl.addNode(NodeImpl.java:247) 
       at org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.create(JcrResourceProvider.java:567) 
       at org.apache.sling.resourceresolver.impl.tree.ResourceProviderEntry.create(ResourceProviderEntry.java:502) 
       at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.create(ResourceResolverImpl.java:1132) 
       at org.apache.sling.servlets.post.impl.operations.AbstractCreateOperation.deepGetOrCreateNode(AbstractCreateOperation.java:584) 
       at org.apache.sling.servlets.post.impl.operations.AbstractCreateOperation.processCreate(AbstractCreateOperation.java:107) 
       at org.apache.sling.servlets.post.impl.operations.ModifyOperation.doRun(ModifyOperation.java:91) 
       at org.apache.sling.servlets.post.AbstractPostOperation.run(AbstractPostOperation.java:92) 
       at org.apache.sling.servlets.post.impl.SlingPostServlet.doPost(SlingPostServlet.java:202) 
       at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:149) 
       at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:345) 
       at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:376) 
       at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:547) 
       at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77) 
       at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:146) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:371) 
       at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:171) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:96) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282) 
       at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77) 
       at com.day.cq.dam.core.impl.servlet.ActivityRecordHandler.doFilter(ActivityRecordHandler.java:155) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:73) 
       at com.adobe.granite.requests.logging.impl.RequestLoggerImpl.doFilter(RequestLoggerImpl.java:137) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at com.adobe.granite.csrf.impl.CSRFFilter.doFilter(CSRFFilter.java:201) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at org.apache.sling.security.impl.ContentDispositionFilter.doFilter(ContentDispositionFilter.java:181) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at com.day.cq.wcm.core.impl.AuthoringUIModeServiceImpl.doFilter(AuthoringUIModeServiceImpl.java:292) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at com.day.cq.wcm.core.impl.warp.TimeWarpFilter.doFilter(TimeWarpFilter.java:106) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter.doFilter(RedirectFilter.java:240) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at com.adobe.cq.social.commons.cors.CORSAuthenticationFilter.doFilter(CORSAuthenticationFilter.java:91) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at com.day.cq.analytics.provisioning.impl.UserAuthenticationRequestFilter.doFilter(UserAuthenticationRequestFilter.java:119) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:95) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet.doFilter(FormsHandlingServlet.java:269) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at com.day.cq.theme.impl.ThemeResolverFilter.doFilter(ThemeResolverFilter.java:76) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at com.adobe.granite.optout.impl.OptOutFilter.doFilter(OptOutFilter.java:74) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at com.day.cq.wcm.core.impl.WCMRequestFilter.doFilter(WCMRequestFilter.java:90) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at com.day.cq.wcm.designimporter.CanvasPageDeleteRequestFilter.doFilter(CanvasPageDeleteRequestFilter.java:88) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at org.apache.sling.rewriter.impl.RewriterFilter.doFilter(RewriterFilter.java:83) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at com.adobe.granite.httpcache.impl.InnerCacheFilter.doFilter(InnerCacheFilter.java:77) 
       at com.adobe.granite.httpcache.impl.InnerCacheFilter.doFilter(InnerCacheFilter.java:56) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:129) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at com.adobe.granite.rest.impl.servlet.ApiResourceFilter.doFilter(ApiResourceFilter.java:68) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at com.adobe.cq.dam.s7imaging.impl.auth.MemoryTokenAuthHandler.doFilter(MemoryTokenAuthHandler.java:156) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at org.apache.sling.bgservlets.impl.BackgroundServletStarterFilter.doFilter(BackgroundServletStarterFilter.java:135) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at com.adobe.cq.social.ugcbase.security.impl.SaferSlingPostServlet.doFilter(SaferSlingPostServlet.java:132) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl.doFilter(ResourceResolverHelperImpl.java:84) 
       at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) 
       at org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151) 
       at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:217) 
       at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:336) 
       at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:297) 
       at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:93) 
       at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:50) 
       at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31) 
       at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:89) 
       at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108) 
       at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80) 
       at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46) 
       at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31) 
       at com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:308) 
       at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108) 
       at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80) 
       at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46) 
       at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31) 
       at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:290) 
       at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108) 
       at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80) 
       at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46) 
       at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31) 
       at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:129) 
       at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108) 
       at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80) 
       at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46) 
       at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31) 
       at org.apache.sling.featureflags.impl.FeatureManager.doFilter(FeatureManager.java:115) 
       at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108) 
       at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80) 
       at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46) 
       at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31) 
       at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75) 
       at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108) 
       at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80) 
       at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46) 
       at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31) 
       at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:76) 
       at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:49) 
       at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67) 
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) 
       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808) 
       at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587) 
       at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221) 
       at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) 
       at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) 
       at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) 
       at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) 
       at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) 
       at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) 
       at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) 
       at org.eclipse.jetty.server.Server.handle(Server.java:497) 
       at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) 
       at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) 
       at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) 
       at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) 
       at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) 
       at java.lang.Thread.run(Thread.java:745) 

但是我們沒有「/content/mywebsite/en/autodiscover/autodiscover.xml」或「/內容/ mywebsite/EN /自動發現」在我們的倉庫中。不知道它從哪裏獲取此網址。

如何在不訪問此特定URL的情況下對其進行調試。謝謝!

+1

看起來像一個配置錯誤的電子郵件應用程序試圖連接到您的網站下載帳戶發現設置。在生產btw上不應該允許在該路徑上發佈帖子。 –

+0

我該如何解決/調試? – Sara

+0

在全球範圍內檢查您的調度程序配置並阻止您的站點發布操作,並僅允許特定路徑。 –

回答

1

看你的堆棧跟蹤,有一點突出的是:

/content/mywebsite/

這看起來像在其中可以從您的域名重定向請求的調度程序文件(某些默認配置wwww.example.com )發佈到發佈商的默認(假定)內容結構。

或者,它可能是您發佈商的吊索貼圖。

因此,根據評論中建議的解釋,某些電子郵件客戶端(如Outlook)嘗試使用與您的域([email protected])相對應的電子郵件地址自動註冊用戶。這將啓動自動發現POST請求。

這是企業環境中大多數電子郵件客戶端的普通設置,所以這不是問題。這裏值得考慮的問題有:

您的發佈商正在接受POST來自匿名用戶的請求。這必須由調度員或發佈者阻止。

Adob​​e有很多關於調度程序設置和發佈者安全性的文檔來解決此問題。總結一下,您需要禁用發佈服務器上的匿名用戶的寫入權限,並配置分派器以阻止任意路徑上的POST請求。

調試

您可以輕鬆地使用curl模擬相同的POST請求重現當地環境這個問題。 .xml文件不允許在引發此錯誤的/ content節點下。

1

正如在另一個答案中提到的,您不需要調試此問題,因爲它是網絡和安全配置問題而不是AEM問題。您必須:

  • 在您的發佈者和調度員處安全匿名發佈。
  • 修復您的吊繩映射或調度程序配置(如果有)來照顧mywebsite內容路徑解析。

另一種可能性是,一些內部企業網絡配置錯誤,並且SMTP自動發現現在被重定向到您的發佈者而不是您通常的郵件服務器。

相關問題