500xxx 内部错误500xxx Internal errors

本文介绍 500xxx 内部错误的原因和解决方案。This article describes the causes and solutions for 500xxx Internal errors.

症状Symptoms

向 IoT 中心发出的请求失败并出现错误,该错误以 500 和/或某种类型的“服务器错误”开头。Your request to IoT Hub fails with an error that begins with 500 and/or some sort of "server error". 一些可能的原因如下:Some possibilities are:

  • 500001 ServerError:IoT 中心遇到服务器端问题。500001 ServerError: IoT Hub ran into a server-side issue.

  • 500008 GenericTimeout:IoT 中心在超时之前无法完成连接请求。500008 GenericTimeout: IoT Hub couldn't complete the connection request before timing out.

  • ServiceUnavailable (无错误代码) :IoT 中心遇到了内部错误。ServiceUnavailable (no error code): IoT Hub encountered an internal error.

  • InternalServerError (无错误代码) :IoT 中心遇到了内部错误。InternalServerError (no error code): IoT Hub encountered an internal error.

原因Cause

500xxx 错误响应可能有多种原因。There can be a number of causes for a 500xxx error response. 在所有情况下,此问题很可能是暂时性的。In all cases, the issue is most likely transient. 尽管 IoT 中心团队会努力维持 SLA,但一小部分 IoT 中心节点偶尔会遇到暂时性故障。While the IoT Hub team works hard to maintain the SLA, small subsets of IoT Hub nodes can occasionally experience transient faults. 如果设备尝试连接到有问题的节点,则你会收到此错误。When your device tries to connect to a node that's having issues, you receive this error.

解决方案Solution

若要缓解 500xxx 错误,请从设备发出重试命令。To mitigate 500xxx errors, issue a retry from the device. 若要自动管理重试,请确保使用最新版本的 Azure IoT SDKTo automatically manage retries, make sure you use the latest version of the Azure IoT SDKs. 有关暂时性故障处理和重试的最佳做法,请参阅暂时性故障处理For best practice on transient fault handling and retries, see Transient fault handling. 如果问题仍然出现,请检查资源运行状况Azure 状态,以确定 IoT 中心是否存在已知的问题。If the problem persists, check Resource Health and Azure Status to see if IoT Hub has a known problem. 也可使用手动故障转移功能You can also use the manual failover feature. 如果不存在已知的问题,但问题仍然出现,请联系支持人员以做进一步调查。If there are no known problems and the issue continues, contact support for further investigation.