how to access built-in health checks via dispatcher/internet? | Community
Skip to main content
jayv25585659
Level 8
November 14, 2022
Solved

how to access built-in health checks via dispatcher/internet?

  • November 14, 2022
  • 2 replies
  • 2037 views

might be explained with an example:

 

Any ideas on how to get this to work?

The reason why I'm asking is that our AEM "architecture" is using 3rd-party platform called "OpenCloud". This platform provides its own health checker servlet (http://localhost:4502/system/health and http://localhost:4503/system/health) and I want to access this path.

thank you.

EDIT:


This is the content of my /filters section

# Deny everything /0001 { /type "deny" /glob "*" } # Enable Health Check Servlet /0006 { /type "allow" /method "GET" /url "/system/health*" } #I have other lines in the filters section but I have commented them

 

my dispatcher config

<IfModule dispatcher_module> DispatcherConfig "/etc/httpd/conf.modules.d/dispatcher.farms.any" DispatcherLog /var/log/httpd/dispatcher.log DispatcherLogLevel warn DispatcherNoServerHeader off DispatcherDeclineRoot off DispatcherUseProcessedURL 1 DispatcherPassError 0 </IfModule>
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Lokesh_Vajrala

@jayv25585659 My bad; I meant to send the LogLevel with `Debug`. If you want, you can go with `Trace2` to get more detailed logging on why it is blocked. Tail this log file `tail -f /var/log/httpd/dispatcher.log` and check what is happening. Here are a few things you can focus on to debug: 

  1. Is the request logged in dispatcher.log? 
  2. Is the path logged in the dispatcher the path you're requesting? Or is it being rewritten by the rewrite engine and forwarded to the dispatcher? 
  3. What is the passthrough path hitting publish instance? 

2 replies

Mayank_Gandhi
Adobe Employee
Adobe Employee
November 14, 2022

@jayv25585659 Please share a snippet from dispatcher logs to see what's the error while accessing the URL at the dispatcher level

jayv25585659
Level 8
November 14, 2022

I edited my original reply.

I tried the following:

  • browsed http://www.my-host.com/system/health and nothing showed up in /var/log/httpd/dispatcher.log

  • I ran this curl -vvv -k https://localhost/system/health and got this reply. I also got nothing in the logs.

    <html><head>
    <title>404 Not Found</title>
    </head><body>
    <h1>Not Found</h1>
    <p>The requested URL was not found on this server.</p>
    </body></html>
Lokesh_Vajrala
Community Advisor
Community Advisor
November 14, 2022

@jayv25585659 

There must be another rule in dispatcher filters which might be blocking it. Change the dispatcher log level to debug or trace and restart the dispatcher to notice which rule is blocking it. 

Define DISP_LOG_LEVEL Warn Debug

 

Instead of allowing everything -> /0001 { /type "allow" /glob "*" } set allow rule with specific path 

# /health_check { /type "allow" /url "/system/health" }   

 

 

jayv25585659
Level 8
November 14, 2022
  • I will check the log level. I think it's already using "warn".

  • I already have a specific rule for /system/health and it's not working. I'm only did the global allow everything once the specific rule is not working.
Lokesh_Vajrala
Community Advisor
Lokesh_VajralaCommunity AdvisorAccepted solution
Community Advisor
November 14, 2022

@jayv25585659 My bad; I meant to send the LogLevel with `Debug`. If you want, you can go with `Trace2` to get more detailed logging on why it is blocked. Tail this log file `tail -f /var/log/httpd/dispatcher.log` and check what is happening. Here are a few things you can focus on to debug: 

  1. Is the request logged in dispatcher.log? 
  2. Is the path logged in the dispatcher the path you're requesting? Or is it being rewritten by the rewrite engine and forwarded to the dispatcher? 
  3. What is the passthrough path hitting publish instance?