What is error disable state? How to recover from error disable port?

The ErrDisable feature is implemented to handle critical situations where the switch detected excessive or late collisions on a port, port duplex misconfiguration, Ether Channel misconfiguration, Bridge Protocol Data Unit (BPDU) port-guard violation, UniDirectional Link Detection (UDLD), and other causes.

The error-disable function let the switch to shut down a port when it encounters physical, driver or configuration problems. A port being error-disabled is not by itself a cause for alarm, but for a reason of a problem that must be resolved.

When a port is in error-disabled state, it will shut down and no traffic is sent or received on that port. The port LED is set to the orange color and, when you issue the show interfaces command, the port status shown as Errdisabled.

switch#show int G1/0
GigabitEthernet1/0/1 is down, line protocol is down (err-disabled)

To find out the main reason for err-disable state. In our case it was port security violation on port Gi1/0

switch#show interfaces status err-disabled Port
Name Status Reason
Gi1/0 SERVER01 err-disabled psecure-violation

To recover automatically from errdisable errdisable state recovery command allows you to choose the type of errors that automatically reenable the ports after a specified amount of time. The show errdisable recovery command shows the default error-disable recovery state for all the possible conditions.

switch#errdisable recovery cause ?
all-Enable timer to recover from all causes
arp: inspection Enable timer to recover from arp inspection error disable
state
bpduguard: Enable timer to recover from BPDU Guard error disable
state
channel-misconfig: Enable timer to recover from channel misconfig disable
state
dhcp-rate-limit: Enable timer to recover from dhcp-rate-limit error
disable state
dtp-flap: Enable timer to recover from dtp-flap error disable state
gbic-invalid: Enable timer to recover from invalid GBIC error disable
state
l2ptguard: Enable timer to recover from l2protocol-tunnel error
disable state
link-flap: Enable timer to recover from link-flap error disable
state
mac-limit: Enable timer to recover from mac limit disable state
pagp-flap: Enable timer to recover from pagp-flap error disable
state
psecure-violation: Enable timer to recover from psecure violation disable
state
security-violation: Enable timer to recover from 802.1x violation disable
state
udld: Enable timer to recover from udld error disable state
unicast-flood: Enable timer to recover from unicast flood disable state