Error: "Keep-alive request was rejected" on Citrix VDAs while ESXi hosts report receive packet drops
search cancel

Error: "Keep-alive request was rejected" on Citrix VDAs while ESXi hosts report receive packet drops

book

Article ID: 460917

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

After ESXi hosts move to a new vSphere Distributed Switch (vDS), Citrix users get disconnected and Citrix Virtual Delivery Agents (VDAs) repeatedly show Unregistered. The same ESXi hosts report receive packet drops on their physical uplinks. Because both symptoms start after the same change, they get reported as one network issue.

About every 5 minutes, the Citrix Desktop Service on the VDA logs event 1015 with the error "Keep-alive request was rejected". Event 1012 follows as the VDA registers with another Delivery Controller. The VDA alternates between Delivery Controllers on each cycle.

The "Receive packets dropped" counter on the host uplinks is non-zero.

Steps to validate

1. On the ESXi host running the VDA, check the uplink counters. Replace <vmnic name> with an uplink of the vDS that carries the VDA traffic.

esxcli network nic stats get -n <vmnic name>

Example output (trimmed):

NIC statistics for vmnic#
Packets received: ##########
Receive packets dropped: #######
Total receive errors: 0
Receive CRC errors: 0
Receive frame errors: 0
Receive FIFO errors: 0

Note the "Receive packets dropped" and "Packets received" values for each uplink.

2. Check how long the counters have been accumulating. The counters start at host boot.

uptime

Example output:

##:##:## up ### days, ##:##:##, load average: ##, ##, ##

A host booted before the vDS migration cannot show that the drops started at the migration.

3. On a Delivery Controller, check the deregistration reason the broker recorded. Replace <VDA name> with the affected machine.

Get-BrokerMachine -MachineName "*<VDA name>*" | Format-List MachineName, RegistrationState, ControllerDNSName, LastDeregistrationReason, LastDeregistrationTime

Example output:

MachineName : <Domain>\<VDA name>
RegistrationState : Registered
ControllerDNSName : <Delivery Controller FQDN>
LastDeregistrationReason : RegistrationStateMismatch
LastDeregistrationTime : ##/##/#### ##:##:##

Citrix defines ContactLost as the VDA not contacting the broker within the timeout, and AgentNotContactable as a failed test callback from the broker to the VDA. When the recorded reason is neither of these, the broker did not record a loss of contact with the VDA.

4. Capture the VDA's registration traffic while a deregistration occurs. Find the VDA's port ID first.

net-stats -l

Example output (trimmed):

PortNum Type SubType SwitchName MACAddress ClientName
######### 5 9 <vDS name> 00:50:56:##:##:## <VDA name>.eth0

Start the capture on that port, writing to a datastore. The VDA registers with the Delivery Controller on TCP port 80 by default.

pktcap-uw --switchport <VDA port ID> --dir 2 --tcpport 80 -o /vmfs/volumes/<datastore name>/<VDA name>.pcap

Leave the capture running until event 1015 is logged on the VDA, then stop it with Ctrl+C a few minutes later. If a Delivery Controller runs on ESXi, capture its port the same way at the same time.

Open the file in Wireshark and check that every registration and keep-alive request gets an HTTP/1.1 200 OK response. Apply this display filter:

tcp.analysis.retransmission || tcp.analysis.lost_segment

No matching packets means no packet on the VDA's controller connections was lost or resent. In the environment this article is based on, the VDA received 200 OK from one Delivery Controller and then sent TCP resets on its own controller connections within 140 ms. Two seconds later it registered with the other Delivery Controller.

Environment

  • VMware vSphere ESXi 8.x
  • Citrix Virtual Apps and Desktops

Cause

The Citrix Delivery Controller rejects the VDA's keep-alive and records RegistrationStateMismatch. The Citrix Broker Service makes that decision, and the network delivers every packet between the VDA and the Delivery Controllers while it happens.

The receive drops on the hosts are a separate condition. A packet dropped on a host uplink never reaches the VM, so a drop on the registration traffic shows up as a retransmission or a sequence gap. The captures show neither. The failures also follow the VDA's 5-minute heartbeat to the Delivery Controller, not the burst pattern of the drops.

Resolution

Open a case with Citrix Support for the keep-alive rejections. Provide:

  • Citrix Desktop Service events 1015 and 1012 from the VDA
  • The Get-BrokerMachine output from step 3
  • Citrix Broker Service events from each Delivery Controller at the deregistration times
  • The packet captures from step 4

In the environment this article is based on, the deregistrations stopped after the Citrix administrators rebuilt the affected machine catalog.

Troubleshoot the host receive drops separately from the deregistrations.

If the error persists after following these steps, contact Broadcom Support for further assistance. Provide the following when opening a support request:

  • A support bundle from the ESXi host running the VDA
  • Output of esxcli network nic stats get -n <vmnic name> for each vDS uplink
  • Output of uptime
  • The packet captures from step 4 in issue/introduction