分布式缓存: Velocity之异常信息
Windows Server AppFabric 中的缓存错误消息包含一个错误代码字符串和一个错误子状态字符串。 本附录提供错误消息和开发人员可以用来处理这些错误的常量之间的连接。
以下错误消息是您可能在启用缓存的应用程序的应用程序日志中看到的内容示例:
ErrorCode <ERRCA0017>:SubStatus<ES0006>:There is a temporary failure. Please retry later. (One or more specified Cache servers are unavailable, which could be caused by busy network or servers. Ensure that security permission has been granted for this client account on the cluster and that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Retry later.)
尽管该错误消息解释了这个问题,但它并没有告诉开发人员所生成的 DataCacheException 对象的确切类型。 在这种情况下,DataCacheException 对象拥有一个 ErrorCode 属性(其值为 RetryLater)和一个 SubStatus 属性(其值为 CacheServerUnavailable)。 这允许开发人员使用异常处理来针对该错误采取更具体的操作,如重试调用。 还允许 IT 专业人士查找有关该错误的详细信息。 对于本示例错误消息,在本文档的下面部分有更详细的帮助。 RetryLater (CacheServerUnavailable) (Windows Server AppFabric 缓存)。
技巧 |
有关 AppFabric 缓存错误处理的详细信息,请参阅处理错误。 有关如何解决若干常见缓存错误的指南,请参阅本文档中的应用程序异常(Windows Server AppFabric 缓存)。 |
下表将错误代码字符串与 DataCacheErrorCode 类中的错误代码常量连接在一起。
错误代码字符串 | DataCacheErrorCode 常量 |
ERRCA0001 | CacheItemVersionMismatch |
ERRCA0002 | RegistryKeyOpenFailure |
ERRCA0003 | InvalidArgument |
ERRCA0004 | UndefinedError |
ERRCA0005 | RegionDoesNotExist |
ERRCA0006 | KeyDoesNotExist |
ERRCA0007 | RegionAlreadyExists |
ERRCA0008 | KeyAlreadyExists |
ERRCA0009 | NamedCacheDoesNotExist |
ERRCA0010 | MaxNamedCacheCountExceeded |
ERRCA0011 | ObjectLocked |
ERRCA0012 | ObjectNotLocked |
ERRCA0013 | InvalidCacheLockHandle |
ERRCA0014 | InvalidEnumerator |
ERRCA0015 | NotificationInvalidationNotSupported |
ERRCA0016 | |
ERRCA0017 | RetryLater |
ERRCA0018 | |
ERRCA0019 | ClientServerVersionMismatch |
ERRCA0020 | SerializationException |
ERRCA0021 | ServerNull |
ERRCAdmin001 | CacheAdminHostsRunning |
ERRCAdmin002 | CacheAdminRequestTimeoutResultUnknown |
ERRCAdmin003 | CacheAdminTimeout |
ERRCAdmin004 | CacheAdminNullArgs |
ERRCAdmin005 | CacheAdminUnknownError |
ERRCAdmin006 | CacheAdminQuorumNotUp |
ERRCAdmin007 | CacheAdminStoreAccessFailure |
ERRCAdmin008 | CacheAdminHostsNotRunning |
ERRCAdmin009 | CacheAdminCacheNotPresent |
ERRCAdmin010 | CacheAdminHostNotPresent |
ERRCAdmin011 | CacheAdminCacheAlreadyPresent |
ERRCAdmin012 | CacheAdminRegionNotPresent |
ERRCAdmin013 | CacheAdminNoQuorumIfHostStopped |
ERRCAdmin014 | CacheAdminNoSeedNodes |
ERRCAdmin015 | CacheAdminHostRunning |
ERRCAdmin016 | CacheAdminHostNotRunning |
ERRCAdmin017 | CacheAdminConfigDeleteHostError |
ERRCAdmin018 | CacheAdminConfigAddHostError |
ERRCAdmin019 | CacheAdminDefaultCacheCreateFailure |
ERRCAdmin020 | CacheAdminDeleteInProgress |
ERRCAdmin021 | CacheAdminCacheCreationInconsistencyFailure |
ERRCAdmin022 | CacheAdminHostNameResolveFailure |
ERRCAdmin023 | CacheAdminNoHosts |
ERRCAdmin024 | CacheAdminClusterRefreshFailed |
ERRCAdmin025 | CacheAdminClusterTimeout |
ERRCAdmin026 | CacheAdminRemoteRegistryAccessFailed |
ERRCAdmin027 | CacheAdminWindowsAccountInvalid |
ERRCAdmin028 | CacheAdminWindowsAccountAlreadyPresent |
ERRCAdmin029 | CacheAdminWindowsAccountNotPresent |
ERRCAdmin030 | CacheAdminGrantClientAccountErrorFormat |
ERRCAdmin031 | CacheAdminRevokeClientAccountErrorFormat |
ERRCAdmin032 | CacheAdminInvalidOperation |
ERRCAdmin033 | CacheAdminClusterNotReady |
ERRCAdmin034 | CacheAdminHostRefreshFailed |
ERRPS001 | CacheAdminClusterSettingsReadError |
ERRPS002 | CacheAdminInvalidClusterSettings |
ERRPS003 | CacheAdminMaxCachesCreated |
ERRPS004 | CacheAdminPortsDuplicated |
ERRPS005 | CacheAdminClusterDown |
ERRPS006 | CacheAdminStatsIncorrect |
ERRPS007 | CacheAdminInvalidSecuritySettings |
ERRPS008 | CacheAdminInstallPathReadError |
ERRPS009 | CacheAdminCacheNotCreated |
ERRPS010 | CacheAdminCacheNotRemoved |
下表将错误子状态字符串与 DataCacheErrorSubStatus 类中的错误子状态常量连接在一起。
错误子状态字符串 | DataCacheErrorSubStatus 常量 |
ES0001 | 无 |
ES0002 | |
ES0003 | |
ES0004 | ReplicationQueueFull |
ES0005 | KeyLatched |
ES0006 | |
ES0007 |
另请参阅
概念