grabbit icon indicating copy to clipboard operation
grabbit copied to clipboard

Hi Team, while creating a new job to sync content between two AEM 6.3 instances curl command is failing. Any thoughts?

Open harish6959 opened this issue 7 years ago • 7 comments

Thanks for taking the time to fill out an issue! To help the community solve your issue, please provide answers to the following questions, along with supporting log and configuration files.

``[aemadmin@lqec060cmaem01 author1]$ curl -v -f -X PUT --header 'Content-Type: text/plain' --data-binary "@/opt/jpm/adobe/author1/config.json" -u admin:admin -D /tmp/grabbit_headers http://localhost:14503/grabbit/job

  • Trying 127.0.0.1...
  • TCP_NODELAY set
  • Connected to localhost (127.0.0.1) port 14503 (#0)
  • Server auth using Basic with user 'admin'

PUT /grabbit/job HTTP/1.1 Host: localhost:14503 Authorization: Basic YWRtaW46YWRtaW4= User-Agent: curl/7.53.1 Accept: / Content-Type: text/plain Content-Length: 1082 Expect: 100-continue

  • The requested URL returned error: 409 Conflict
  • stopped the pause stream!
  • Closing connection 0 curl: (22) The requested URL returned error: 409 Conflict [aemadmin@lqec060cmaem01 author1]$ ll /var/grabb^C

What version of AEM are you running? AEM 6.3

How do you produce the issue? Please run grabbit.sh

Does the issue occur consistently? Yes

Any additional details?

harish6959 avatar Jan 31 '18 00:01 harish6959

Adding more logs:

curl -v -X PUT --header 'Content-Type: text/plain' --data-binary @/opt/jpm/adobe/author1/config.json -u admin:admin http://localhost:14503/grabbit/job

  • Trying 127.0.0.1...
  • TCP_NODELAY set
  • Connected to localhost (127.0.0.1) port 14503 (#0)
  • Server auth using Basic with user 'admin'

PUT /grabbit/job HTTP/1.1 Host: localhost:14503 Authorization: Basic YWRtaW46YWRtaW4= User-Agent: curl/7.53.1 Accept: / Content-Type: text/plain Content-Length: 1082 Expect: 100-continue

< HTTP/1.1 409 Conflict < Date: Wed, 31 Jan 2018 00:40:54 GMT < X-Content-Type-Options: nosniff < Set-Cookie: cq-authoring-mode=TOUCH;Path=/;Expires=Wed, 07-Feb-2018 00:40:54 GMT < Expires: Thu, 01 Jan 1970 00:00:00 GMT < Content-Type: text/html; charset=UTF-8 < Connection: close <

409 Conflict

Conflict

Cannot serve request to /grabbit/job in org.apache.sling.jcr.webdav.impl.servlets.SimpleWebDavServlet

    <h3>Request Progress:</h3>
      0 TIMER_START{Request Processing}
      2 COMMENT timer_end format is {<elapsed microseconds>,<timer name>} <optional message>
      7 LOG Method=PUT, PathInfo=null
      9 TIMER_START{handleSecurity}
   1454 TIMER_END{1442,handleSecurity} authenticator org.apache.sling.auth.core.impl.SlingAuthenticator@e1b1b1a returns true
   1706 TIMER_START{ResourceResolution}
   1845 TIMER_END{136,ResourceResolution} URI=/grabbit/job resolves to Resource=JobResource, type=twcable:grabbit/job, path=/grabbit/job
   1858 LOG Resource Path Info: SlingRequestPathInfo: path='/grabbit/job', selectorString='null', extension='null', suffix='null'
   1858 TIMER_START{ServletResolution}
   1863 TIMER_START{resolveServlet(/grabbit/job)}
   1887 TIMER_END{22,resolveServlet(/grabbit/job)} Using servlet org.apache.sling.jcr.webdav.impl.servlets.SimpleWebDavServlet
   1890 TIMER_END{31,ServletResolution} URI=/grabbit/job handled by Servlet=org.apache.sling.jcr.webdav.impl.servlets.SimpleWebDavServlet
   1899 LOG Applying Requestfilters
   1904 LOG Calling filter: com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl
   1912 LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter
   1916 LOG Calling filter: com.adobe.granite.httpcache.impl.InnerCacheFilter
   1924 LOG Calling filter: org.apache.sling.rewriter.impl.RewriterFilter
   1928 LOG Calling filter: com.adobe.cq.mcm.campaign.servlets.CampaignCopyTracker
   1932 LOG Calling filter: com.adobe.cq.history.impl.HistoryRequestFilter
   2057 LOG Calling filter: com.day.cq.wcm.core.impl.WCMRequestFilter
   2069 LOG Calling filter: com.adobe.cq.wcm.core.components.internal.servlets.CoreFormHandlingServlet
   2073 LOG Calling filter: com.adobe.granite.optout.impl.OptOutFilter
   2080 LOG Calling filter: com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet
   2084 LOG Calling filter: com.adobe.cq.social.commons.cors.CORSAuthenticationFilter
   2088 LOG Calling filter: org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
   2091 LOG Calling filter: com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter
   2096 LOG Calling filter: com.day.cq.wcm.core.impl.AuthoringUIModeServiceImpl
   2572 LOG Calling filter: org.apache.sling.security.impl.ContentDispositionFilter
   2578 LOG Calling filter: com.adobe.granite.csrf.impl.CSRFFilter
   2587 LOG Calling filter: com.adobe.granite.rest.assets.impl.AssetContentDispositionFilter
   2591 LOG Calling filter: com.adobe.granite.requests.logging.impl.RequestLoggerImpl
   2597 LOG Calling filter: com.adobe.granite.rest.impl.servlet.ApiResourceFilter
   2605 LOG Calling filter: com.day.cq.dam.core.impl.assetlinkshare.AdhocAssetShareAuthHandler
   2610 LOG Calling filter: com.adobe.cq.social.ugcbase.security.impl.SaferSlingPostServlet
   2613 LOG Calling filter: com.day.cq.wcm.core.impl.warp.TimeWarpFilter
   2624 LOG Applying Componentfilters
   2627 LOG Calling filter: com.day.cq.personalization.impl.TargetComponentFilter
   2630 LOG Calling filter: com.day.cq.wcm.core.impl.WCMComponentFilter
   2804 LOG Calling filter: com.day.cq.wcm.core.impl.WCMDebugFilter
   2825 TIMER_START{org.apache.sling.jcr.webdav.impl.servlets.SimpleWebDavServlet#0}
   2989 LOG Applying Error filters
   2993 LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter
   2996 LOG Calling filter: org.apache.sling.rewriter.impl.RewriterFilter
   3003 TIMER_START{handleError:status=409}
   3453 TIMER_END{447,handleError:status=409} Using handler /libs/sling/servlet/errorhandler/default.jsp
   5557 LOG Found processor for post processing ProcessorConfiguration: {contentTypes=[text/html], order=-1, active=true, valid=true, processErrorResponse=true, pipeline=(generator=Config(type=htmlparser, config={}), transformers=(Config(type=linkchecker, config={}), Config(type=mobile, config=JcrPropertyMap [node=Node[NodeDelegate{tree=/libs/cq/config/rewriter/default/transformer-mobile: { jcr:primaryType = nt:unstructured, component-optional = true}}], values={jcr:primaryType=nt:unstructured, component-optional=true}]), Config(type=mobiledebug, config=JcrPropertyMap [node=Node[NodeDelegate{tree=/libs/cq/config/rewriter/default/transformer-mobiledebug: { jcr:primaryType = nt:unstructured, component-optional = true}}], values={jcr:primaryType=nt:unstructured, component-optional=true}]), Config(type=contentsync, config=JcrPropertyMap [node=Node[NodeDelegate{tree=/libs/cq/config/rewriter/default/transformer-contentsync: { jcr:primaryType = nt:unstructured, component-optional = true}}], values={jcr:primaryType=nt:unstructured, component-optional=true}]), serializer=Config(type=htmlwriter, config={}))}
   5740 TIMER_END{5738,Request Processing} Dumping SlingRequestProgressTracker Entries
    <hr>
    <address>ApacheSling/2.6 (jetty/9.2.19.v20160908, Java HotSpot(TM) 64-Bit Server VM 1.8.0_144, Linux 4.9.75-25.55.amzn1.x86_64 amd64)</address>
</body>
* Closing connection 0

harish6959 avatar Jan 31 '18 00:01 harish6959

Hey @harish6959 thanks for reporting the issue. Can you try by installing the config package mentioned in the 3rd point here: https://github.com/TWCable/grabbit/blob/master/docs/AEMSupport.adoc#what-you-need-to-run-grabbit ?

That is needed for 6.3 as well. I'll update the documentation on it. Let me know how it goes!

sagarsane avatar Feb 08 '18 16:02 sagarsane

@sagarsane, I already have "Grabbit-Deserialization-Firewall-Configuration-1.0" package installed on both AEM instances.

harish6959 avatar Feb 08 '18 17:02 harish6959

@harish6959 can you please check whether:

  1. Grabbit bundle is installed and active?
  2. Any exceptions in the error.log when you try to refresh the Grabbit bundle from the OSGi console?

sagarsane avatar Feb 08 '18 17:02 sagarsane

I am also facing the same issue. Can anyone tell me how to solve this? @sagarsane i have validated bith 1 and 2, still the same issue.

praveenv2018 avatar Jul 10 '18 14:07 praveenv2018

@harish6959 @praveenv2018 Have you done the whitelisting? On AEM 6.3+ it appears it's something that needs to be done for grabbit. Perhaps this can be added to the setup instructions too for AEM 6.3+

  1. in /system/console/configMgr
  2. Find 'Apache Sling Login Admin Whitelist Configuration Fragment'
  3. Add a new one
  4. Name: grabbit
  5. White Listed BSNs: com.twcable.grabbit

mzgubin avatar Aug 30 '18 02:08 mzgubin

Thanks for the help @mzgubin .. adding Grabbit package to the Sling Login Admin Whitelist config is mentioned in the installation docs here : https://github.com/TWCable/grabbit/blob/master/docs/AEMSupport.adoc#what-you-need-to-run-grabbit

@harish6959 and @praveenv2018 as mentioned above please let us know if you are still having issues.

Thanks!

sagarsane avatar Sep 09 '18 01:09 sagarsane