Skip to main content
Level 2
May 15, 2026
Question

aemaacs publish post servlet call fails with 404 error

  • May 15, 2026
  • 1 reply
  • 11 views

aemaacs author post custom servlet call from a site content page works fine. But, publish post custom servlet call fails with 404 error.

When servlet with post request is getting called, I don't find any entry in publish access.log, error.log and request.log.

However, getting following entry in cdn.log {"timestamp":"2026-05-14T17:06:53+0000","ttfb":8,"ttlb":8,"cli_ip":"192.223.233.218","cli_country":"US","cli_region":"US-TX","rid":"some value","req_ua":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36","aem_envKind":"SKYLINE","aem_tenant":"company name","host":"publish-p170552-e1826604.adobeaemcloud.com","url":"/bin/customservlet","method":"POST","res_ctype":"text/html; charset=iso-8859-1","cache":"PASS","debug":"","res_age":"","status":301,"pop":"IAD","rules":"","alerts":"","sample":"","ddos":false}

    1 reply

    Level 2
    May 15, 2026

    Hi ​@helloosuman ,

     

    The CDN log entry you shared is actually very revealing the fact that the request appears in cdn.log but not in publish access.log, error.log, or request.log tells us the request is being stopped before it reaches the publish instance entirely. This is not a servlet registration issue.

     

    A few things to check based on your CDN log:

     

    1. Dispatcher filter rules blocking POST to /bin/*
    This is the most common cause. AEMaaCS Dispatcher blocks POST requests to /bin/ paths by default. Check your dispatcher/src/conf.dispatcher.d/filters/filters.any file for rules like:

    /0001 { /type "deny" /method "POST" /url "/bin/*" }

    You need an explicit allow rule before the deny:

    /0010 { /type "allow" /method "POST" /url "/bin/customservlet" }

    Remember on AEMaaCS, dispatcher config is deployed via Cloud Manager pipeline, not manually. A config that works on author (which bypasses dispatcher) will fail on publish.

     

    2. CDN-level traffic filtering
    Your cdn.log shows `cache:PASS` which means the CDN did forward the request, so CDN caching rules are not blocking it. However, check if you have any custom CDN rules (via Adobe-managed CDN config in your Cloud Manager environment) that might redirect or block POST requests.

     

    3. Sling Servlet Registration on Publish
    If dispatcher is confirmed open, verify the servlet is actually registered on publish. Go to:
    https://publish-p170552-e1826604.adobeaemcloud.com/system/console/servletresolver

    Note: this console is only accessible on author directly. For publish, check via the AEM Cloud Service Developer Console in Cloud Manager go to your environment, Publish pod, and check the OSGi servlet registry to confirm your servlet bundle is active.

     

    4. Replication of supporting content/config
    If your servlet depends on any OSGi config or content paths, confirm those have been replicated/deployed to publish as well.

     

    Most likely culprit: dispatcher filter. Start there first.

    avesh_narang
    Level 4
    May 15, 2026

    Adding to ​@akhil_merupula  above reply , ​@helloosuman if you will be able to validate the redirect location from 301 response ,you’ll pinpoint exactly which layer is enforcing it.

    Thanks !