

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# Neptune 服务错误
<a name="errors"></a>

Amazon Neptune 有两组不同的错误：
+ 仅针对 Neptune 数据库集群端点的图形引擎错误。
+ 这些错误与用于通过 AWS SDK 和 AWS Command Line Interface (AWS CLI) 创建和修改 Neptune 资源的 API 关联。

**Topics**
+ [可用数据库实例不足](insufficientDBInstancesAvailable.md)
+ [图形引擎错误消息和代码](errors-engine-codes.md)
+ [数据库集群管理 API 错误消息和代码](CommonErrors.md)
+ [Neptune 加载程序错误和源消息](loader-message.md)

# 可用数据库实例不足
<a name="insufficientDBInstancesAvailable"></a>

 在您尝试创建、启动或修改数据库实例时，可能返回 `InsufficientDBInstanceCapacity` 错误。在您尝试从数据库快照还原数据库实例时，也可能返回此错误。返回此错误时，常见原因是特定的数据库实例类在请求的可用区中不可用。您可以尝试以下方法之一来解决问题：
+  使用不同的数据库实例类重试请求。
+  使用不同的可用区返回请求。
+  重试请求而不明确指定可用区。

 有关排查 Amazon EC2 的实例容量问题的信息，请参阅《Amazon EC2 用户指南》中的[实例容量不足](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/troubleshooting-launch.html#troubleshooting-launch-capacity)。

# 图形引擎错误消息和代码
<a name="errors-engine-codes"></a>

在遇到时，Amazon Neptune 端点返回 Gremlin 和 SPARQL 的标准错误。

也可以从同一个端点返回特定于 Neptune 的错误。本节介绍 Neptune 错误消息、代码和建议的操作。

**注意**  
这些错误仅针对 Neptune 数据库集群端点。通过 AWS SDK 和 AWS CLI 创建和修改 Neptune 资源的 API 的常见错误集并不相同。有关这些错误的更多信息，请参阅[数据库集群管理 API 错误消息和代码](CommonErrors.md)。

## 图形引擎错误格式
<a name="errors-format"></a>

Neptune 错误消息返回相关的 HTTP 错误代码和 JSON 格式的响应。

```
HTTP/1.1 400 Bad Request
x-amzn-RequestId: LDM6CJP8RMQ1FHKSC1RBVJFPNVV4KQNSO5AEMF66Q9ASUAAJG
Content-Type: application/x-amz-json-1.0
Content-Length: 465
Date: Thu, 15 Mar 2017 23:56:23 GMT

{
    "requestId": "0dbcded3-a9a1-4a25-b419-828c46342e47",
    "code": "ReadOnlyViolationException",
    "detailedMessage": "The request is rejected because it violates some read-only restriction, such as a designation of a replica as read-only."
}
```

## 图形引擎查询错误
<a name="errors-query"></a>

下表包含错误代码、消息和 HTTP 状态。

它还指示是否可以重试请求。一般而言，如果在新尝试中请求可能成功，则可以重试请求。


| Neptune Service Error Code | HTTP status | Ok to Retry? | Message | 
| --- |--- |--- |--- |
| AccessDeniedException | 403 | No | Authentication or authorization failure. | 
| BadRequestException | 400 | No | The request could not be completed. | 
| BadRequestException | 400 | No | Request size exceeds max allowed value of 157286400 bytes. | 
| CancelledByUserException | 500 | Yes | The request processing was cancelled by an authorized client. | 
| ConcurrentModificationException | 500 | Yes | The request processing did not succeed due to a modification conflict. The client should retry the request. | 
| ConstraintViolationException | 400 | Yes | The query engine discovered, during the execution of the request, that the completion of some operation is impossible without violating some data integrity constraints, such as persistence of in- and out-vertices while adding an edge. Such conditions are typically observed if there are concurrent modifications to the graph, and are transient. The client should retry the request. | 
| FailureByQueryException  | 500 | Yes | Calling fail() caused request processing to fail. The client may retry the request presuming the logic in the query could be expected to succeed on a later attempt. As a result, the choice to retry will be query specific. | 
| InternalFailureException | 500 | No | The request processing has failed. | 
| InvalidNumericDataException | 400 | No | Invalid use of numeric data which cannot be represented in 64-bit storage size. | 
| InvalidParameterException | 400 | No | An invalid or out-of-range value was supplied for some input parameter or invalid syntax in a supplied RDF file. | 
| MalformedQueryException | 400 | No | The request is rejected because it contains a query that is syntactically incorrect or does not pass additional validation. | 
| MemoryLimitExceededException | 500 | Yes | The request processing did not succeed due to lack of memory, but can be retried when the server is less busy. | 
| MethodNotAllowedException | 405 | No | The request is rejected because the chosen HTTP method is not supported by the used endpoint. | 
| MissingParameterException | 400 | No | A required parameter for the specified action is not supplied. | 
| QueryLimitExceededException | 500 | Yes | The request processing did not succeed due to the lack of a limited resource, but can be retried when the server is less busy. | 
| QueryLimitException | 400 | No | Size of query exceeds system limit. | 
| QueryTooLargeException | 400 | No | The request was rejected because its body is too large. | 
| ReadOnlyViolationException | 400 | No | The request is rejected because it violates some read-only restriction, such as a designation of a replica as read-only. | 
| ThrottlingException | 500 | Yes | Rate of requests exceeds the maximum throughput. OK to retry. | 
| TimeLimitExceededException | 500 | Yes | The request processing timed out. | 
| TooManyRequestsException | 429 | Yes | The rate of requests exceeds the maximum throughput. OK to retry. | 
| UnsupportedOperationException | 400 | No | The request uses a currently unsupported feature or construct. | 

## IAM 身份验证错误
<a name="errors-iam-auth"></a>

这些错误特定于已启用 IAM 身份验证的集群。

下表包含错误代码、消息和 HTTP 状态。


| Neptune Service Error Code | HTTP status | Message | 
| --- |--- |--- |
| Incorrect IAM User/Policy | 403 | You do not have sufficient access to perform this action. | 
| Incorrect or Missing Region | 403 | Credential should be scoped to a valid Region, not '区域'. | 
| Incorrect or Missing Service Name | 403 | Credential should be scoped to correct service: 'neptune-db'. | 
| Incorrect or Missing Host Header / Invalid Signature | 403 | The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. Host header is missing or hostname is incorrect. | 
| Missing X-Amz-Security-Token | 403 | 'x-amz-security-token' is named as a SignedHeader, but it does not exist in the HTTP request | 
| Missing Authorization Header | 403 | The request did not include the required authorization header, or it was malformed. | 
| Missing Authentication Token | 403 | Missing Authentication Token. | 
| Old Date | 403 | Signature expired: 20181011T213907Z is now earlier than 20181011T213915Z (20181011T214415Z - 5 分钟.) | 
| Future Date | 403 | Signature not yet current: 20500224T213559Z is still later than 20181108T225925Z (20181108T225425Z \$1 5 分钟.) | 
| Incorrect Date Format | 403 | Date must be in ISO-8601 'basic format'. Got 'date'. See [https://en.wikipedia.org/wiki/ISO_8601](https://en.wikipedia.org/wiki/ISO_8601). | 
| Unknown/Missing Access Key or Session Token | 403 | The security token included in the request is invalid.  | 
| Unknown/Missing Secret Key | 403 | The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. Host header is missing or hostname is incorrect. | 
| TooManyRequestsException | 429 | The rate of requests exceeds the maximum throughput. OK to retry. | 

# 数据库集群管理 API 错误消息和代码
<a name="CommonErrors"></a>

这些 Amazon Neptune 错误与用于借助 AWS SDK 和 AWS CLI 创建和修改 Neptune 资源的 API 关联。

下表包含错误代码、消息和 HTTP 状态。


| Neptune Service Error Code | HTTP status | Message | 
| --- |--- |--- |
| AccessDeniedException | 403 |  您没有足够的访问权限，无法执行该操作。  | 
| IncompleteSignature | 400 |  请求签名不符合 AWS 标准。  | 
| InternalFailure | 500 |  由于未知错误、异常或故障导致请求处理失败。  | 
| InvalidAction | 400 |  所请求的操作无效。确认正确键入了操作。  | 
| InvalidClientTokenId | 403 |  在我们的记录中没有所提供的 X.509 证书或 AWS 访问密钥 ID。  | 
| InvalidParameterCombination | 400 |  同时使用了不得共用的参数。  | 
| InvalidParameterValue | 400 |  为输入参数提供的值无效或超出范围。  | 
| InvalidQueryParameter | 400 |  为输入参数提供的值无效或超出范围。  | 
| MalformedQueryString | 400 |  查询字符串包含语法错误。  | 
| MissingAction | 400 |  请求中遗漏了一个操作或必需参数。  | 
| MissingAuthenticationToken | 403 |  请求中必须包含有效的（已注册的）AWS 访问密钥 ID 或 X.509 证书。  | 
| MissingParameter | 400 |  未提供用于指定操作的必需参数。  | 
| OptInRequired | 403 |  AWS 访问密钥 ID 需要订阅服务。  | 
| RequestExpired | 400 |  请求到达服务的时间超过请求上的日期戳或请求到期日期（如针对预签名 URL）15 分钟，或者请求上的日期戳离到期还有 15 分钟以上。  | 
| ServiceUnavailable | 503 |  由于服务器发生临时故障而导致请求失败。  | 
| ThrottlingException | 500 |  由于请求限制而导致请求被拒绝。  | 
| ValidationError | 400 |  输入未能满足 AWS 服务指定的约束。  | 

# Neptune 加载程序错误和源消息
<a name="loader-message"></a>

Neptune 加载程序的 `status` 终端节点返回了以下消息。有关更多信息，请参阅 [获取状态 API](load-api-reference-status.md)。

下表包含加载程序源代码和描述。


| Error or Feed Code | Description | 
| --- |--- |
|  LOAD\$1NOT\$1STARTED  |  加载已记录但未启动。  | 
|  LOAD\$1IN\$1PROGRESS  |  表示正在进行加载并指定当前正在加载的文件数。 加载程序解析文件时，会创建一个或多个要并行加载的块。由于单个文件可以生成多个块，因此，此消息中包含的文件计数通常少于批量加载过程使用的线程数。  | 
|  LOAD\$1COMPLETED  |  加载已完成且无任何错误或错误在可接受的阈值内。  | 
|  LOAD\$1CANCELLED\$1BY\$1USER  |  用户已取消加载。  | 
|  LOAD\$1CANCELLED\$1DUE\$1TO\$1ERRORS  |  由于错误，系统已取消加载。  | 
|  LOAD\$1UNEXPECTED\$1ERROR  |  加载失败，返回意外错误。  | 
|  LOAD\$1FAILED  |  加载因一个或多个错误而失败。  | 
|  LOAD\$1S3\$1READ\$1ERROR  |  源由于间歇性或临时 Amazon S3 连接问题而失败。如果任何馈送收到此错误，整体加载状态将设置为 LOAD\$1FAILED。  | 
|  LOAD\$1S3\$1ACCESS\$1DENIED\$1ERROR  |  已拒绝对 S3 存储桶的访问。如果任何馈送收到此错误，整体加载状态将设置为 LOAD\$1FAILED。  | 
|  LOAD\$1COMMITTED\$1W\$1WRITE\$1CONFLICTS  |  加载数据已提交，但具有未解决的写入冲突。 加载程序将尝试解决单独事务中的写入冲突并随着加载进行更新馈送状态。如果最终源状态为 LOAD\$1COMMITTED\$1W\$1WRITE\$1CONFLICTS，则将尝试恢复加载，并且此操作可能成功且无写入冲突。写入冲突一般与错误输入数据无关，但数据重复可能增加写入冲突的可能性。  | 
|  LOAD\$1DATA\$1DEADLOCK  | Load was automatically rolled back due to deadlock. | 
|  LOAD\$1DATA\$1FAILED\$1DUE\$1TO\$1FEED\$1MODIFIED\$1OR\$1DELETED  |  源由于文件在加载开始后已被删除或更新而失败。  | 
|  LOAD\$1FAILED\$1BECAUSE\$1DEPENDENCY\$1NOT\$1SATISFIED  |  加载请求未执行，因为其依赖关系检查失败。  | 
|  LOAD\$1IN\$1QUEUE  |  加载请求已排队，正在等待执行。  | 
|  LOAD\$1FAILED\$1INVALID\$1REQUEST  |  加载失败，因为请求无效（例如，指定的源/存储桶可能不存在，或者文件格式无效）。  | 