Why does the ENA on my Amazon EC2 instance time out or reset?

3 minute read
0

The Elastic Network Adapter (ENA) on my Amazon Elastic Compute Cloud (Amazon EC2) instance times out or resets.

Resolution

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, make sure that you use the most recent AWS CLI version.

When you use an ENA on your Amazon EC2 instance, you might experience one of the following common issues:

  • The ENA resets
  • The ENA times out
  • The ENA doesn’t function correctly
  • The ENA fails to authenticate

Use the following troubleshooting steps to resolve these errors.

Note: In the following commands, replace the example values with your values.

Check the ENA driver version that's installed on your instance. Run one of the following PowerShell commands inside the instance:

Get-WmiObject Win32_PnPSignedDriver|?{$_.manufacturer -like "*Amazon*"}| select DeviceName, DriverVersion, Manufacturer

- or -

dism /online /Get-Drivers /Format:table | findstr "Amazon*"

Take an Amazon Machine Image (AMI) backup, and then update the ENA driver to the latest version

On your instance, check if ENA support is turned on. Use the AWS CLI or AWS CloudShell to run the following command:

aws ec2 describe-instances —instance-ids instance_id —query "Reservations[].Instances[].EnaSupport" (PowerShell command): (Get-EC2Instance -InstanceId instance-id).Instances.EnaSupport

If ENA support isn't turned on, then run the following command to turn on ENA support:

aws ec2 modify-instance-attribute —instance-id instance_id —ena-support Edit-EC2InstanceAttribute -InstanceId instance_id -EnaSupport $true

In Event View, check for Event IF 5007 and 5202 error IDs. If a combination of these error IDs occurs frequently, then check your resource allocations.

To check your resource allocations, open the Windows Resource Monitor and enter resmon. Choose OK to open the Resource Monitor window. The CPU tab lists CPU usage graphs. Review the usage levels for CPU 0, and check if the usage level is too high.

Note: On instance types that are larger than 16 vCPU, it's a best practice to configure RSS to exclude CPU 0 for the ENA. If you configure RSS on smaller instance types, then performance might improve. However, because there are a smaller number of available cores, check that the CPU cores don't affect performance. For more information, see Configure RSS CPU affinity.

Run the Set-NetAdapterRss command to configure RSS for your ENA:

Set-NetAdapterRss -name (Get-NetAdapter | Where-Object {$_.InterfaceDescription -like "*Elastic*"}).Name -Baseprocessorgroup 0 -BaseProcessorNumber 1

Important: To avoid network disruptions, it's a best practice to apply these settings in off peak hours. Also, make sure that you run the commands in an elevated PowerShell prompt.

Run a PowerShell command to increase the network adapter receive buffer size to 8192:

Set-NetAdapterAdvancedProperty -Name (Get-NetAdapter | Where-Object {$_.InterfaceDescription -like "*Elastic*"}).Name -DisplayName "Receive Buffers" -DisplayValue 8192

Note: You can also use the device manager to manually set the buffer size.

If the issue isn't resolved and RDP doesn't work, then create an elastic network interface and attach the network interface to the EC2 instance. Then, test again. If required, detach the network interface after you finish your test.

AWS OFFICIAL
AWS OFFICIALUpdated 8 months ago