

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# Neptune 服務錯誤
<a name="errors"></a>

Amazon Neptune 有不同的兩組錯誤：
+ 圖形引擎錯誤，僅發生在 Neptune 資料庫叢集端點。
+ 與使用 AWS SDK 和 AWS Command Line Interface () 建立和修改 Neptune 資源APIs 相關聯的錯誤AWS CLI。

**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 建立和修改 Neptune 資源的 APIs，並 AWS CLI 具有一組不同的常見錯誤。如需這些錯誤的資訊，請參閱[資料庫叢集管理 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 'region'. | 
| 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 和 建立和修改 Neptune 資源的 APIs 相關聯 AWS CLI。

下表包含錯誤代碼、訊息和 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 |  請求之送達時間為超過請求之日期戳記的 15 分鐘後或超過請求過期日期的 15 分鐘後 (例如預先簽章的 URL)，或者請求的日期戳記為未來 15 分鐘後。  | 
| ServiceUnavailable | 503 |  由於伺服器暫時故障，請求失敗。  | 
| ThrottlingException | 500 |  由於請求調節，因此請求遭到拒絕。  | 
| ValidationError | 400 |  輸入無法滿足 AWS 服務指定的限制條件。  | 

# Neptune 載入器的錯誤和饋送訊息
<a name="loader-message"></a>

以下訊息由 Neptune 載入器的 `status` 端點傳回。如需詳細資訊，請參閱[Get-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  |  載入失敗，因為請求無效 (例如，指定來源/儲存貯體可能不存在，或檔案格式無效)。  | 