Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

ESXi iSCSI login rejected: CHAP or mutual CHAP does not match the array

Technical article
VMware

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

If an ESXi host cannot log in to an iSCSI target and the log says Login failed to authenticate with target, the array rejected the host's CHAP credentials. The name or secret on the adapter, on a single target that overrides the adapter, or on the mutual (incoming) side does not match what the array holds.

Prove it from the log first, then compare the adapter and each target against the array, change one level at a time, and remember that a changed setting only reaches a session after it logs out and back in.

What the error means

CHAP is the way the iSCSI target checks who the initiator is. Per the vSphere 8.0 storage documentation, ESXi sets CHAP at the adapter level, where every target receives the same name and secret. Software iSCSI, dependent hardware iSCSI and iSER adapters also support per-target CHAP, and by default discovery addresses and static targets inherit the adapter's settings. A per-target setting overrides the inherited one.

Broadcom documents the failure in two forms.

In /var/log/syslog.log (KB 390153, ESXi 7.0.x and 8.0.x):

iscsid[2098858]: Login failed to authenticate with target
iscsid[2098858]: discovery login to ###.###.###.### rejected: initiator error (02/01), non-retryable, giving up

And with the reason code (KB 410093): Login failed to authenticate with target followed by Reason: 00050201 Target Error: (0x0201 Initiator could not be successfully authenticated.). The KB's cause is that "the CHAP and mutual CHAP credentials configured on the ESXi initiator and on the iSCSI array do not match" or are missing.

The visible effect, per KB 390153, is that a storage adapter does not appear in the paths, so the host is missing an expected path to the iSCSI datastores.

Network path failures and wrong-network-binding faults look similar in the vSphere Client but log differently: no TCP connection means no login attempt and no authentication line.

Likely causes

Cause What you see How to confirm
Name or secret on the adapter differs from the array Login failed to authenticate with target, (02/01) Compare Authentication on the adapter with the array's CHAP entry for this initiator
Per-target CHAP overrides the adapter Some targets log in, others are rejected Check each target's own authentication setting; look for an override rather than inheritance
Mutual (incoming) CHAP missing or the same secret reused Login fails only when bidirectional CHAP is selected Incoming credentials set on both sides, with a different secret from the outgoing one
Settings changed but sessions not re-established Old behaviour persists after the edit Existing sessions keep old settings until log out and log in
Array does not apply CHAP during dynamic discovery (ESXi 8.0 before Update 3e) Host sees paths but no devices; re-entering CHAP works until the next reboot The KB 387514 symptom and build number
Unsupported combination Bidirectional CHAP on an independent hardware adapter Adapter type; Broadcom says independent hardware adapters do not support bidirectional CHAP
Name or secret too long for the adapter Setting rejected or not applied Name up to 511 and secret up to 255 characters; some adapters lower (QLogic: 255 and 100)

Prove the cause before changing anything

These commands are taken from the Broadcom documentation and have not been run.

1. Find the failing log lines. On the host, search /var/log/syslog.log for Login failed to authenticate with target, rejected: initiator error (02/01) and 0x0201. If you find them, the TCP connection works and the rejection is authentication. If you find none, return to the network path.

Also read the array's own event log. As one example, NetApp's Element software records the event CHAP authentication failed, unknown CHAP username 'iqn.1998-01.com.vmware:esx-host1-9760c674' when an ESXi software adapter connects with CHAP (NetApp knowledge base). The visible part of that page gives the symptom only. Its cause and fix sit behind a sign-in, so use it to recognise the line, and read your own array vendor's documentation for what it means.

2. Read the adapter's CHAP settings. In the vSphere Client: host > Configure > Storage > Storage Adapters > select the vmhba > Properties > Authentication. Or from the shell (esxcli iscsi reference, 8.0.2):

esxcli iscsi adapter auth chap get --adapter <vmhba> --direction uni
esxcli iscsi adapter auth chap get --adapter <vmhba> --direction mutual

The reference gives the syntax, with --direction as uni or mutual. It does not print sample output, so look for the level (prohibited, discouraged, preferred, required) and the authentication name. The secret is not something to read back; compare it by re-entering it.

3. Read each target's setting.

esxcli iscsi adapter target portal list --adapter <vmhba>
esxcli iscsi adapter target portal auth chap get --adapter <vmhba> --address <target-ip> --name <target-iqn> --direction uni

Per KB 390153, per-target and per-target-IP CHAP settings can override the adapter-level settings, so CHAP can succeed for some targets and fail for others. A bad result is a target with its own name or secret where you expected it to inherit.

4. Read the session list.

esxcli iscsi session list --adapter <vmhba>

The reference documents the command and its options. It does not publish sample output. Look for the failing target's session, or its absence.

5. Check the array. On the array, confirm that the CHAP name it expects for this initiator, normally the host's iSCSI initiator name unless a different name was set, matches what the host sends. The vSphere procedure says "Make sure that the name you specify matches the name configured on the storage side."

Example (illustrative): host esx01 has two targets on array san-a. Datastore ds-prod works and ds-backup has no paths. syslog.log shows rejected: initiator error (02/01) for the ds-backup portal only. The adapter uses the host's initiator name and one shared secret, but the ds-backup target portal carries its own CHAP name left over from an earlier array. The mismatch is at target level, not adapter level.

Fix

Make the change in one place, starting where the proof pointed. Configure the array side first and match it exactly, as Broadcom's procedure says.

Adapter level

In the vSphere Client: host > Configure > Storage Adapters > the vmhba > Properties > Authentication > Edit (Set Up CHAP, vSphere 8.0):

  1. Pick the method: None, Use unidirectional CHAP if required by target, Use unidirectional CHAP unless prohibited by target, Use unidirectional CHAP, or Use bidirectional CHAP.
  2. Enter the outgoing name (select "Use initiator name" or clear it and type the name the array expects) and the outgoing secret, the same as on the array.
  3. For bidirectional CHAP, enter the incoming credentials. Use different secrets for outgoing and incoming CHAP.
  4. Click OK and rescan the iSCSI adapter.

From the shell, esxcli iscsi adapter auth chap set takes --adapter, --authname, --level, --direction and --secret, and the reference recommends a secret of at least 12 bytes. Avoid typing a secret into a shell session that is logged or shared; the vSphere Client is the safer path.

Per-target override

For a target that overrides the adapter, either correct its name and secret or return it to inheritance. esxcli iscsi adapter target portal auth chap set has --inherit ("Inheriting iSCSI authentication setting from parent") as well as --authname, --level, --direction and --secret. Use the vSphere Client's target authentication dialog if you prefer a UI.

Make the new settings take effect

Broadcom says "If you change the CHAP parameters, they are used for new iSCSI sessions," and "For existing sessions, new settings are not used until you log out and log in again."

Disruptive step: logging out an iSCSI session on a host with running VMs drops that path. Do this only when other paths to the same devices are healthy, one session at a time, or with the host in maintenance mode. A failed login after the change leaves that path down. To back out, restore the previous CHAP settings and log in again.

Version-specific variant: hosts on ESXi 8.0 before Update 3e

KB 387514 describes hosts with bidirectional CHAP that worked on 7.0 Update 3 and lose their devices after upgrade to 8.0 Update 3. They see paths but no devices, and re-entering the CHAP configuration restores access only until the next reboot. Logs show the same 02/01 line during discovery, with zero targets discovered. The KB's cause is that some arrays do not apply CHAP during the login used for dynamic discovery, so SendTargets fails when CHAP is set on the adapter. It says this is fixed in ESXi 8.0 Update 3e, build 24674464, and that reconfiguring CHAP is only a temporary workaround. If your build is older, plan the update. Disruptive step: an ESXi update needs maintenance mode and a host reboot.

Confirm the fix

  1. syslog.log shows no new Login failed to authenticate with target lines after the rescan.
  2. esxcli iscsi session list --adapter <vmhba> shows a session for each expected target.
  3. The host shows the expected paths and devices on the adapter in the vSphere Client.
  4. After a host reboot in a maintenance window, the paths return without reconfiguring CHAP. This matters most for the dynamic-discovery variant above.

What to watch afterwards

  • Record the CHAP name, level and the target-level overrides for each host in the change record. Store the secret in your password manager, not in the record.
  • Change CHAP in one maintenance window per array, adapter and array side together.
  • After any array replacement or migration, re-check per-target entries left over from the old array.
  • Alert on Login failed to authenticate in the host's syslog.

Risks and limits

  • The esxcli reference gives syntax and option names but no sample output, and Broadcom does not publish sample esxcli iscsi adapter auth chap get or session list output on the pages cited.
  • The log sample in KB 410093 is dated 10 September 2025, although the page itself was updated on 30 September 2026.
  • KB 387514 also points to KB 317961, a related CHAP persistence issue on ESXi 7.0.1 and higher. Check it if your hosts are on that release.
  • Array-side steps differ by vendor, and the array vendor's documentation governs them.

NetLeverage runs its own hosting on VMware vSphere, vCenter and ESXi. Talk to an engineer.

Sources