When a PingAM or ForgeRock login keeps failing, how do you find the broken node?
A failing PingAM journey usually shows users a bare sign-in error. Here's where AM logs each node's outcome, which loggers to raise, the errors Ping documents for common nodes, and how to fix the usual causes.
part 16 of 18 · Identity security, from the ground upthe ideaRead the node trail before you touch logging, then raise one logger.
after reading, you can- Work out which node a failed login got stuck on from the audit log
- Raise the right debug logger for one reproduction, then follow the transaction ID
- Spot the script outcome and timeout mistakes behind many failed logins
When a PingAM journeydefinitionIt's Ping's word for an authentication tree, the chain of nodes someone goes through to sign in. You'll see both words in the docs, and they mean the same thing. fails, the user usually sees a generic sign-in error and the help desk sees nothing useful at all. The authentication audit log records every node a journey passed through, so start there, and only then turn up debug logging for the one tree that's breaking.
Somewhere in your sign-in flow one small step is failing, and the screen won't say which
PingAM is the product that used to be called ForgeRock Access Management. It signs people in to your apps. Each way of signing in is a journey, also called an authentication tree: a chain of small steps called nodes. One node asks for a username, the next checks the password, another sends a code to a phone. Each node picks an outcome, and the outcome decides which node runs next. When a journey fails, one of those nodes went down the wrong path or threw an error, and the screen rarely says which. The fix is almost always in the logs PingAM already keeps.
Think of an airport security line with several checkpoints: passport desk, bag scanner, gate scan. If you get turned back, the last officer only says no. Every checkpoint writes in its own logbook, though, so you find out where it went wrong by reading the logbooks in order, not by asking the last officer.
- PingAM and ForgeRock AM administrators
- Developers who write custom nodes or scripts
- Help desk and IAM support teams
- App teams that call AM over REST
- IAM leads planning an upgrade
Why a failing journey costs more than it looks
A broken journey locks people out, and it's often everybody on that path at once. The login page, a mobile app and an API client may all call the same tree, so one bad change to a shared inner tree can stop all three. Help desk tickets pile up with "I can't sign in", which says nothing about which node failed.
The bigger risk is a journey that fails open or routes the wrong way. Ping recommends disabling trees you aren't using, because an enabled test tree is another way in. A tree that skips its MFA branch for some users may not raise any error, and then only the audit trail of node outcomes shows it.
Most of the information you need is already being written. The JSON audit handler is AM's default, and it logs authentication events to a file per topic. Debug logging defaults to the Error level, which is usually too quiet for a journey problem. Turning it up for everything fills disks fast, so the skill is knowing which logger to raise, for how long.
-
01 Client asks for a tree
The login page or app POSTs to /json/authenticate in the realm, naming the tree with authIndexType=service and authIndexValue.
-
02 AM checks the tree
A disabled tree gets No configuration found, and that's the end of it. An enabled one gets an AM-TREE-LOGIN-STARTED entry before the first node runs.
-
03 Nodes run in order
Each node checks one thing, a password say, and picks an outcome. AM logs AM-NODE-LOGIN-COMPLETED for every node, which is how you find out later which way it went.
-
04 AM asks for input
When a node needs the user, AM returns callbacks and the current authId. The client fills them in and posts them back with that latest authId.
-
05 The journey ends
A Success node creates a session and returns a tokenId. A Failure node ends the journey in failure. AM logs AM-TREE-LOGIN-COMPLETED either way.
For engineers: the authId is the journey. With client-side journey sessions it carries the state itself. With server-side sessions it points at the copy in the CTS token store, and with in-memory sessions AM keeps the journey in one server's memory. Ping is blunt about clients here. Use the authId exactly as AM returns it, replace it after every response, and never reuse an earlier one, because AM rejects authId values it can't verify. A lot of "the journey restarts for no reason" tickets come down to one of those rules being broken in a custom client.
Where to look, in the order that saves time
Start with the audit log, because it's already on and it's structured. The authentication topic writes to authentication.audit.json under /path/to/am/var/audit/ on a default install. AM writes one event as each node completes and a final event at the end of the tree. Each node event carries an entries object with the tree name, the node's display name, type, ID and outcome. Reading those for one failed login tells you how far the user got.
| Source | Where | What it answers |
|---|---|---|
| Authentication audit log | authentication.audit.json in /path/to/am/var/audit/ | Which tree ran, every node's outcome, and whether the journey ended FAILED or with an exception |
| Access audit log | access.audit.json, same folder | Who called which endpoint and what came back. Join it to the other logs on transactionId |
| Debug logs | Files set in logback.xml, for example am/var/debug/debug.out | Stack traces and node errors. Raise org.forgerock.openam.core.rest.authn.trees for tree problems |
| Script loggers | Named scripts.<context>.<uuid>.(<name>) in Logback.jsp | What your Scripted Decision node logged. The logger appears only after the script has run once |
| Debug node popup | A Debug node in the tree, Enable Debug Popup on | Shared node state, universalId and transaction ID as you step through in a browser. Self-managed AM only |
| Recording facility | ssoadm start-recording, or the REST call | Debug logs, thread dumps, runtime properties and the AM config, bundled for a support case |
| Distributed tracing | OpenTelemetry, off by default | Where time goes across HTTP, LDAP and script HTTP calls, plus IDM calls in Ping Advanced Identity Software deployments. Ping marks the interface as Evolving |
Ping's audit reference shows what a node event looks like. The part to read is "info":{"nodeOutcome":"true","treeName":"Example","displayName":"Data Store Decision","nodeType":"DataStoreDecisionNode","nodeId":"e5ec495a-..."}. In the debug files, tree errors come from the org.forgerock.openam.core.rest.authn.trees.AuthTrees logger, and Ping's own JsonLayout example shows the message Exception in processing the tree with the transactionId next to it. To reproduce a login outside the browser, Ping's REST docs start a named tree with a POST to /am/json/realms/root/realms/alpha/authenticate?authIndexType=service&authIndexValue=Login.
The transaction IDdefinitionAn ID AM gives every incoming request. Audit and debug entries from that request share it, which lets you join the logs. is what ties it together. Any event raised while AM handles one request gets the same transactionId, whatever the topic. Find the failed login in the authentication log, take its transactionId, and search the access log and debug files for it. If you also want DS or IDM entries to line up, both sides need setup. AM ignores incoming X-ForgeRock-TransactionId headers until you set the advanced server property org.forgerock.http.TrustTransactionHeader to true, and Ping notes DS needs trust-transaction-ids:true too. Only trust that header from sources you control, since a caller could otherwise reuse one ID to bury its own requests.
Watch for one field in particular. When a journey ends in an exception, which Ping says usually means a misconfigured journey, AM-TREE-LOGIN-COMPLETED carries a result of FAILED plus exception: "An exception occurred during the authentication process". That's your signal to stop looking at the user's password and start looking at the tree.
The usual causes, roughly most to least common
The ranking below is ours, from how often each cause fits the symptom people describe. The messages in it are the ones Ping documents for each node, so you can search your logs for them as written. Where the docs give no message, we say so instead of making one up.
| What you see | Where it shows | Likely cause | Fix |
|---|---|---|---|
| Rejected at the password check | Debug log: invalid password error, or invalid username error | The password didn't match, or the username matched no profile in the realm's data store | Confirm the user exists in that realm's data store, then treat it as a credential problem |
| Fails without checking a password | Debug log: Password is null for username <username> | No collector put the password in node state before Data Store Decision ran | Add or reconnect the password collector, or a Zero Page Login Collector for header logins |
| Every login fails at the same node | Debug log: Exception in data store decision node | AM can't reach the data store, or the store errored | Check LDAP connectivity, bind account and certificates for the identity store |
| Journey stops at a scripted node | Debug log: invalid script outcome, or script outcome error | The script sets an outcome that isn't listed in the node's Outcomes field | List every outcome string the script can set, then connect each one in the designer |
| Script node fails after a rewrite | Found an action result from scripted node, but it was not an ActionWrapper object | A next-generation script returned something other than its action object. The legacy engine logs the same message with Action object | Check how the script sets its action against the engine version it runs on |
| Legacy script fails calling Java | The Access to Java class is prohibited error, per Ping's knowledge base | The class isn't on that script type's allowlist | Use a next-generation binding or library script; allowlist one class only as a last resort |
| User sent back to the start mid-journey | No error message; the first step shows again | In-memory journey sessions and a load balancer that isn't sticky | Make the load balancer honour amlbcookie, or move to client-side or CTS journey sessions |
| Fails after a slow MFA or email step | Journey ends partway through | The journey session passed its maximum duration, 5 minutes by default | Raise Max duration on the tree or realm, or use an Update Journey Timeout node |
| No configuration found | REST response or login page | The tree is disabled | Enable it, and check the tree name and full realm path in the request while you're there |
| Inner tree never runs | Configured tree does not exist: <tree-name> | Inner Tree Evaluator points at a renamed or missing tree | Fix the Tree Name, then search every parent tree for the old name |
| Login completes, then User Locked Out. | 401 from the Success node | The account status is Inactive, for example after a persistent lockout | Find out why it was set inactive before you reactivate it |
A few of these deserve more than a table row. The scripted-outcome mismatch is the one people trip over after every script edit. Ping says the node shows only the outcomes you configure, and a script that sets one you left out logs a warning and may stop the journey from completing. Nothing fails at save time, so it turns up as a production bug the first time that branch runs.
The load-balancer case is quieter. Since upgrades keep in-memory journey sessions by default, an estate upgraded from older versions may be running them without anyone deciding to. Ping says in-memory journey sessions need sticky load balancingdefinitionSending every request in one journey to the same AM server, by the amlbcookie cookie. In-memory journey sessions need it., and a request that lands on another AM server starts the journey again. You won't see an error, just users looping back to the username page, mostly at busy times when the balancer spreads load. New installs default to client-side JWT journey sessions instead. Whatever the storage, every AM server in a journey has to share the secret behind am.authn.trees.transientstate.encryption or it can't decrypt the transient state another server wrote.
Inner trees cause a data problem that looks like a logic problem. Shared state a child journey collects comes back to the parent, but transient and secure state don't. If the child collects a password and a node in the parent needs it, the parent won't find it. Ping also says duration values set on inner trees are ignored, so a long timeout on a child tree does nothing; set it on the parent or with the Update Journey Timeout node.
Reproduce it, read it, fix it
From a vague ticket to the failing node, without turning on everything
- 01Get one failed attempt with a time and a username
Ask for the exact time, the app or URL used, and the username. With that you can pick out one login in the audit log instead of reading thousands.
- 02Find the journey in the authentication audit log
Search authentication.audit.json for the principal around that time. Read the AM-NODE-LOGIN-COMPLETED events in order and note the last node and its outcome, then check AM-TREE-LOGIN-COMPLETED for FAILED or the exception field.
- 03Reproduce it outside the login page
Call the tree directly with curl, using the full realm path and authIndexType=service with the tree name. Pass each callback back with the newest authId. If REST works and the page doesn't, the problem is in the client or the UI, not the tree.
- 04Raise one logger, briefly
As amAdmin, open Logback.jsp and set org.forgerock.openam.core.rest.authn.trees to Debug. Raise your script's own logger too if a scripted node is involved. Reproduce once, then put both back.
- 05Follow the transaction ID
Take the transactionId from the failed event and grep the debug files for it. Stack traces and node messages from that one request sit together.
- 06Fix in a lower environment first
Change the tree, node or script in development, test every outcome path rather than only the happy one, then promote it the way you promote other config. Keep a before-and-after export of the tree.
- 07Watch the next hour of logins
After the change goes live, watch AM-TREE-LOGIN-COMPLETED results for that tree. A falling FAILED count is the evidence the ticket can close.
If you need the setting to survive a restart, put a logback.xml in the AM classpath, for example /path/to/tomcat/webapps/am/WEB-INF/classes/. Add scan and scanPeriod to the configuration element and AM picks up edits without a restart, which matters on a busy cluster. Ping's JsonLayout class adds the transactionId to every JSON debug entry, and AmThrowableProxyConverter can cut stack traces down to size, so persistent debug files stay readable and don't eat the disk.
When the problem only shows under load, or support asks for everything, use the recording facility instead of hand-collecting files. ssoadm start-recording takes a JSON control file with an issue ID, which Ping suggests setting to your case number, and saves debug logs, thread dumps, runtime properties and an export of the AM configuration. Set a password on the config export, because it's your whole configuration.
What PingAM 8 changed for debugging journeys
If you're still on 7.x, a few changes in 8.0 and 8.1 change how you build and read journeys. They're worth knowing before an upgrade, since they also change what your logs contain. Support dates for each version are on our ForgeRock and PingAM page.
What changed in PingAM 8 that you'll notice in the logs
Nodes now have versions, and AM-NODE-LOGIN-COMPLETED logs the version for nodes above 1.0. Set org.forgerock.am.auth.node.versioning.enable.v1.audit.detail to true to log it for every node.
The nodes REST endpoint is versioned now, and calls without a version are deprecated. Scripts that build trees over REST should name the node version in the URL.
Set transactionalOnly to true and the tree only runs inside a transaction AM starts, such as a SAML 2.0 or OAuth 2.0 app tree. Calling it directly won't run it, so check the flag before you test that way. You can only set it over REST.
mustRun forces a tree to run to completion whatever sessions exist, and noSession trees finish without creating a session. Standalone AM needs a rebuilt UI with XUI_MUST_RUN_ENABLED=true for mustRun.
OpenTelemetry tracing follows a request across HTTP, outgoing LDAP and script HTTP calls, and IDM calls in Ping Advanced Identity Software deployments. It's off by default and Ping labels the interface Evolving.
Node Designer lets you write a scripted node type once, with next-generation bindings, and reuse it in any journey or deployment. When it breaks, you fix one node type instead of chasing copies of the same script.
Next-generation scripts log through an SLF4J-style wrapper. The old com.sun.identity.shared.debug.Debug logger used by legacy scripts is deprecated, so logger.message calls change when you migrate a script.
Node versioning is the one that matters most for troubleshooting. A node type can now exist in several versions, and the audit event records which one ran, for versions above 1.0 unless you turn on the property that logs them all. When a tree behaves differently in two environments, compare node versions before you compare anything else.
Build journeys that are easier to debug
- One large tree with every branch, edited in place
- Outcomes typed into Scripted Decision nodes by hand, and nobody checks them
- Script Inputs and Outputs left at * everywhere
- Debug nodes left in trees that reach production
- In-memory journey sessions behind a load balancer nobody made sticky
- Clients get a bare 401 for every kind of failure
- Small inner trees, each set to innerTreeOnly so nobody can call them on their own
- Each outcome a script can set is on the node and wired up, and someone tested it
- Script Inputs and Outputs filled in, so anyone reading the node can see which state each script uses
- Debug nodes only in a development realm
- Journey session storage chosen on purpose, with stickiness checked if it's in-memory
- Set Error Details nodes, so the client gets a real message back
Ping's own advice on design is to write down the steps a user has to take before you open the designer, and to nest trees because one huge tree is hard to read and maintain. That helps debugging directly. A failure in a small inner tree points at a handful of nodes, and setting innerTreeOnly stops anyone from calling that fragment as a complete login.
Give clients something better than a bare 401. A Set Error Details node placed before a node that can error adds your message and static key-value details, such as an errorUrl, to the JSON response. The help desk can then tell an identity-verification failure from a wrong password without opening a log.
Before: one big tree, state on one server
Every login path runs through one tree. Journey state sits in one AM server's memory, so a balancer that switches servers sends the user back to the start.
After: the journey keeps going even when the balancer picks another server
Now it doesn't matter which AM server the balancer picks for the next step. Failures stay inside one small inner tree, and every log line for a login carries the same transaction ID.
Two settings round it off. Journey session allowlisting, off by default, stops a client from replaying an old step to rewind a journey. Switch it on in Realms, then Authentication, then Settings, then Trees. If you rely on AM's own lockout rather than the directory's password policy, turn on Store Invalid Attempts in Data Store. Ping says it's needed with server-side or client-side journey sessions, or users may never be locked out at all.
Who does what when a journey breaks
- Get the time, the app, the username and the exact error from the user. Without those, nobody can find the login in the logs
- Check whether others on the same app report it. Many tickets at once points at the tree, one points at the account
- Pass the ticket to IAM support with those details instead of resetting the password first
- Open authentication.audit.json, find that user's node events and write down the last node and its outcome
- Reproduce with curl against the tree, then raise only the trees logger in Logback.jsp
- Put every logger back to its old level once you have the failure on record
- List every outcome your scripts can set in the node's Outcomes field. Then walk each branch once before release
- Move legacy scripts that need allowlisted Java classes to next-generation bindings
- Keep the authId handling in custom clients to Ping's rules: replace it every time, never reuse it
- Search production trees for Debug nodes and delete them, since the popup can show passwords
- Disable default and test trees nobody uses, and review which trees are still enabled
- Decide on allowlisting and on where audit logs go, so a failed journey can be found later
If a journey breaks in production
Most journey failures follow a change: a tree edit, a script update, a load balancer change or an upgrade. Start from the most recent one.
- 01Containfirst 30 minutes
- Work out whether one tree or every tree fails. One tree points at config, all of them at the data store or the AM servers
- If a recent tree change caused it, point clients back at the last good tree or restore the previous tree export
- Tell the help desk what users are seeing and when you'll post the next update
- 02Find the nodefirst hours
- Read AM-NODE-LOGIN-COMPLETED events for a few failed logins and find the node they share
- Look in AM-TREE-LOGIN-COMPLETED for the exception field. If it's there, the journey itself is misconfigured
- Raise the trees logger and the script logger for a single reproduction, then lower them
- 03Fixsame day
- Fix the node, outcome list, script or session setting in a lower environment and test every branch
- Promote the fixed tree the same way you promote other AM config, with an export kept
- If you can't find it, start a recording with the case number as issue ID and open a Ping support case
- 04Check for misusesame week
- If the failure let anyone skip a step, read the audit log for successful logins that took that path
- Check for logins through trees that should have been off or innerTreeOnly
- Bring in your incident process if any of them can't be explained
- 05Learnafter the fix
- Add the failing path to the test cases you run on every tree change
- Write down which logger and which audit field found it, for the next person on call
- Remove any Debug node or Trace setting added during the incident
Three failures you might recognise (illustrations, not clients)
- the setup
- A company upgraded two AM servers from 7.x. The upgrade kept in-memory journey sessions, and a new load balancer spreads requests round robin.
- what happens
- Users whose next request lands on the other server start again. There's no error message, so it reads as random flakiness.
- what to do
- Make the balancer stick on amlbcookie, or switch the realm's journey sessions to JWT or CTS. Then test a full login several times through the balancer.
- the setup
- A developer adds a new outcome, contractor, to a Scripted Decision node script that routes users to MFA, but doesn't add it to the node's Outcomes field.
- what happens
- Contractors take the new branch, the node logs script outcome error, and they can't finish signing in. Employees take other branches and get in fine, so at first it looks like a problem with the contractors' accounts.
- what to do
- Add the outcome to the node, connect it in the designer, and test every branch before promoting. Add the error string to your log alerts.
- the setup
- A registration journey emails a verification link through an Email Suspend node. Nobody changed the duration settings, so the journey's maximum and the suspend time both fall back to the global default of 5 minutes.
- what happens
- Anyone who opens the email after a few minutes away finds a dead link, and has to fill in the whole registration form again.
- what to do
- Set a Suspend Duration on the Email Suspend node, then set treeTimeout on the parent tree or add an Update Journey Timeout node so the maximum covers it. Inner-tree durations are ignored.
When to call Ping support
Open a case when AM-TREE-LOGIN-COMPLETED shows the exception field and the debug log doesn't explain it, when a built-in node fails the same way on a clean test tree, or when the failure only happens under load. Start a recording first, with the case number as the issue ID, and send it along with the tree export, the AM version, and the transactionId of one failed login. Ping's node troubleshooting page covers a common one: a node that won't appear in the tree designer needs a nodeDescription property in its properties file.
How Cohash helps
We work on PingAM and ForgeRock deployments, including the custom nodes and scripts that journeys tend to collect over the years. We can take a failing or sprawling tree, trace where it breaks, split it into inner trees you can test, and set up logging that finds the next failure fast. See our ForgeRock and PingAM work, our identity and access management practice, or start with a free assessment.
What to take from this
- 01
Read authentication.audit.json first. The node events show how far the user got and which way the last node went, before you touch any logging.
- 02
Raise only org.forgerock.openam.core.rest.authn.trees and your script's logger, reproduce once, then put them back.
- 03
Join audit and debug entries on transactionId to see one failed login from end to end.
- 04
List every outcome a script can set in its node, and test every branch before you promote.
- 05
In-memory journey sessions need a sticky load balancer. Check yours after an upgrade from 7.x.
- 06
Keep Debug nodes out of production trees. Ping's example popup output shows a password field.
01Where are PingAM authentication logs?
On a default self-managed install, the JSON audit handler writes authentication.audit.json and the other audit files under /path/to/am/var/audit/. Debug logs go wherever your logback.xml says, for example am/var/debug/debug.out. Check your audit handler settings if they aren't there.
02Where do I look to see which node a failed login got stuck on?
Read the AM-NODE-LOGIN-COMPLETED events for that login in authentication.audit.json. Each carries the tree name, node name, type, ID and outcome. The last one before AM-TREE-LOGIN-COMPLETED is where the journey went wrong.
03How do I get more logging out of a tree without flooding the disk?
As amAdmin, open Logback.jsp in the AM root context and set org.forgerock.openam.core.rest.authn.trees to Debug or Trace. It takes effect at once and resets on restart, so set it back once you've reproduced the problem. For a lasting change, put a logback.xml in the AM classpath with a rolling appender.
04Users keep getting sent back to the first step. Why?
Often it's in-memory journey sessions behind a load balancer that isn't sticky, so the next request lands on a server that doesn't know the journey. Ping says a request that reaches another server starts the journey again. A client reusing an old authId is the other common cause.
05We keep getting "No configuration found" from PingAM. What does it mean?
AM returns it when someone tries to authenticate through a disabled tree. Also check the tree name is spelled the way AM has it and that the request uses the full realm path, starting realms/root.
06Our login broke after a script change, and the log says script outcome error. Why?
The script set an outcome that isn't in the node's Outcomes field. Add every outcome string the script can set, connect each one in the designer and save the tree.
07Is it safe to use the Debug node in production?
We wouldn't. Its popup shows node state, and an example popup output in Ping's docs includes a password field. Use it in a development realm and take it out before promoting. It also isn't available in PingOne Advanced Identity Cloud.
08How long can someone take over a PingAM login before it times out?
Five minutes by default, including any time suspended. A node such as Update Journey Timeout overrides the tree setting, which overrides the realm and then the global setting. Values set on inner trees are ignored.
Three questions, about a minute
Pick an answer and we'll tell you if it's right, and why it is or isn't. The score stays in this browser.
-
Q1Users on the same app report failed sign-ins since a script change this morning. Where should you look first?
show the answer
B. Open authentication.audit.json and read the node events for those logins Node events show which node each failed login reached and the outcome it chose. That narrows the problem to one node before you raise any logging.
-
Q2After an upgrade, users sometimes loop back to the username page, with no errors in the logs. What's the most likely cause?
show the answer
C. In-memory journey sessions behind a load balancer that isn't sticky Upgrades keep in-memory journey sessions by default, and those need every request to reach the same AM server. A request that lands elsewhere starts the journey again without an error.
-
Q3A Scripted Decision node logs script outcome error, but only for one group of users. How do you fix it?
show the answer
A. Add that outcome to the node's Outcomes field and wire it to the next node The node only knows the outcomes listed on it, and the script returned one that isn't there. Add it and connect it, and those users get through again.