AWS drs: DRS agent runtime errors: add DRS-REPL error codes and new sections
Summary
Renames agent log error headings to coded identifiers (DRS-REPL-001 through DRS-REPL-009), updates the documented error-message strings to the new 'Error code: DRS-REPL-xxx' format, adds a note that the agent logs these codes, and adds three new troubleshooting sections: DRS-REPL-007 (failback connection timeout on TCP 1500), DRS-REPL-008 (replication server handshake failure), and DRS-REPL-009 (agent out-of-memory restart, including handling of the client.hprof memory dump).
Security assessment
The change is primarily a documentation restructure (error-code naming and new troubleshooting entries), not a fix for a specific vulnerability. It does add security-relevant operational guidance: the DRS-REPL-009 section warns that the client.hprof heap dump 'can include sensitive data' and instructs users to delete it after sharing, and DRS-REPL-007/008 cover TCP port 1500 reachability, security group/network ACL checks, and excluding port 1500 from deep packet inspection. These are hardening/data-handling best practices rather than remediation of a disclosed flaw, so severity is low.
Evidence
+**Cause:** The agent process ran out of memory and exited. The service manager restarts the agent after 30 seconds, and replication resumes. The agent sets its maximum memory based on the memory of the server. On some out-of-memory errors, the Java runtime can write a `client.hprof` file to the agent directory. This file contains a copy of the agent memory and can include sensitive data.
Diff
diff --git a/drs/latest/userguide/agent-runtime-errors.md b/drs/latest/userguide/agent-runtime-errors.md index c61903e..75511e4 100644 --- a//drs/latest/userguide/agent-runtime-errors.md +++ b//drs/latest/userguide/agent-runtime-errors.md @@ -7 +7 @@ -Error: Server identity changed and no matching recovery instance was foundError: Replication driver failed to load at agent startupError: Cannot connect to the replication server on TCP port 1500Error: Authentication with the replication server failedError: Cannot reach AWS Elastic Disaster Recovery or load agent credentialsError: AWS Elastic Disaster Recovery rejected the agent credentials +DRS-REPL-001: Server identity changed and no matching recovery instance was foundDRS-REPL-002: Replication driver failed to load at agent startupDRS-REPL-003: Cannot connect to the replication server on TCP port 1500DRS-REPL-004: Authentication with the replication server failedDRS-REPL-005: Cannot reach AWS Elastic Disaster Recovery or load agent credentialsDRS-REPL-006: AWS Elastic Disaster Recovery rejected the agent credentialsDRS-REPL-007: Timed out waiting for the failback connection on TCP port 1500DRS-REPL-008: Handshake with the replication server failedDRS-REPL-009: Agent ran out of memory and restarted @@ -9 +9 @@ Error: Server identity changed and no matching recovery instance was foundError: -# Replication errors: agent log messages +# Replication errors: agent runtime errors @@ -11 +11,3 @@ Error: Server identity changed and no matching recovery instance was foundError: -This topic covers messages that the AWS Replication Agent writes to its own log on the source server. The other topics in this section cover replication errors that AWS Elastic Disaster Recovery reports in the console. Use this topic when the console shows no specific error, or to find the cause behind one. To find the agent log, see [Check agent status and logs](./agent-diagnostics.html#agent-log-locations). +This topic covers messages that the AWS Replication Agent writes to its own log on the source server or recovery instance. The other topics in this section cover replication errors that AWS Elastic Disaster Recovery reports in the console. Use this topic when the console shows no specific error, or to find the cause behind one. To find the agent log, see [Check agent status and logs](./agent-diagnostics.html#agent-log-locations). + +For each error in this topic, the agent logs a line that starts with **`Error code: DRS-REPL-`** and a three-digit number. The line also includes a short summary and a _For troubleshooting, see_ link to the matching section. @@ -15 +17,7 @@ This topic covers messages that the AWS Replication Agent writes to its own log - * Error: Server identity changed and no matching recovery instance was found + * DRS-REPL-001: Server identity changed and no matching recovery instance was found + + * DRS-REPL-002: Replication driver failed to load at agent startup + + * DRS-REPL-003: Cannot connect to the replication server on TCP port 1500 + + * DRS-REPL-004: Authentication with the replication server failed @@ -17 +25 @@ This topic covers messages that the AWS Replication Agent writes to its own log - * Error: Replication driver failed to load at agent startup + * DRS-REPL-005: Cannot reach AWS Elastic Disaster Recovery or load agent credentials @@ -19 +27 @@ This topic covers messages that the AWS Replication Agent writes to its own log - * Error: Cannot connect to the replication server on TCP port 1500 + * DRS-REPL-006: AWS Elastic Disaster Recovery rejected the agent credentials @@ -21 +29 @@ This topic covers messages that the AWS Replication Agent writes to its own log - * Error: Authentication with the replication server failed + * DRS-REPL-007: Timed out waiting for the failback connection on TCP port 1500 @@ -23 +31 @@ This topic covers messages that the AWS Replication Agent writes to its own log - * Error: Cannot reach AWS Elastic Disaster Recovery or load agent credentials + * DRS-REPL-008: Handshake with the replication server failed @@ -25 +33 @@ This topic covers messages that the AWS Replication Agent writes to its own log - * Error: AWS Elastic Disaster Recovery rejected the agent credentials + * DRS-REPL-009: Agent ran out of memory and restarted @@ -30 +38 @@ This topic covers messages that the AWS Replication Agent writes to its own log -## Error: Server identity changed and no matching recovery instance was found +## DRS-REPL-001: Server identity changed and no matching recovery instance was found @@ -32 +40 @@ This topic covers messages that the AWS Replication Agent writes to its own log -**Error message:** A message that starts with **`Server identity changed from`** and ends with **`and didn't find a Recovery Instance id - Exiting`** +**Error message:** **`Error code: DRS-REPL-001 - Server identity changed and no matching recovery instance was found`** @@ -58 +66 @@ The process exits after 60 seconds, and the service manager restarts it. Replica -## Error: Replication driver failed to load at agent startup +## DRS-REPL-002: Replication driver failed to load at agent startup @@ -60 +68 @@ The process exits after 60 seconds, and the service manager restarts it. Replica -**Error message:** **`Load module failed`** +**Error message:** **`Error code: DRS-REPL-002 - Replication driver failed to load at agent startup`** @@ -88 +96 @@ The process exits after 60 seconds, and the service manager restarts it. Replica -## Error: Cannot connect to the replication server on TCP port 1500 +## DRS-REPL-003: Cannot connect to the replication server on TCP port 1500 @@ -90 +98 @@ The process exits after 60 seconds, and the service manager restarts it. Replica -**Error message:** **`Error creating connection`** or **`Connecting to replicator`** , together with a network message such as **`Connection refused`** , **`connect timed out`** , or **`No route to host`**. +**Error message:** **`Error code: DRS-REPL-003 - Cannot connect to the replication server on TCP port 1500`** @@ -105 +113 @@ The process exits after 60 seconds, and the service manager restarts it. Replica -## Error: Authentication with the replication server failed +## DRS-REPL-004: Authentication with the replication server failed @@ -107 +115 @@ The process exits after 60 seconds, and the service manager restarts it. Replica -**Error message:** **`Error creating connection`** , followed by a stack trace that mentions sending or receiving the authentication message. +**Error message:** **`Error code: DRS-REPL-004 - Authentication with the replication server failed`** @@ -122 +130 @@ The process exits after 60 seconds, and the service manager restarts it. Replica -## Error: Cannot reach AWS Elastic Disaster Recovery or load agent credentials +## DRS-REPL-005: Cannot reach AWS Elastic Disaster Recovery or load agent credentials @@ -124 +132 @@ The process exits after 60 seconds, and the service manager restarts it. Replica -**Error message:** **`Exception was thrown by the client when trying to ...`** +**Error message:** **`Error code: DRS-REPL-005 - Cannot reach AWS Elastic Disaster Recovery or load agent credentials`** @@ -141 +149 @@ The process exits after 60 seconds, and the service manager restarts it. Replica -## Error: AWS Elastic Disaster Recovery rejected the agent credentials +## DRS-REPL-006: AWS Elastic Disaster Recovery rejected the agent credentials @@ -143 +151 @@ The process exits after 60 seconds, and the service manager restarts it. Replica -**Error message:** A message that starts with **`Request to`** and includes **`The security token included in the request is invalid.`** +**Error message:** **`Error code: DRS-REPL-006 - AWS Elastic Disaster Recovery rejected the agent credentials`** @@ -159,0 +168,73 @@ With cross-account roles, a missing or misconfigured `DRSCrossAccountAgentAuthor +## DRS-REPL-007: Timed out waiting for the failback connection on TCP port 1500 + +**Error message:** **`Error code: DRS-REPL-007 - Timed out waiting for the failback connection on TCP port 1500`** + +**Cause:** During failback, the agent on the recovery instance listens on TCP port 1500 for the Failback Client. The agent starts to listen only after the Failback Client finishes configuring the replication software. The Failback Client did not connect within 5 minutes, so the wait timed out. The agent waits 30 seconds and then listens again. + +**Resolution:** + + 1. On the computer that runs the Failback Client, confirm that the Failback Client is still running and check its status. While it connects, it shows **`Establishing a connection between the Failback Client and the AWS Replication Agent running on the Recovery Instance over port 1500...`**. When it succeeds, it shows **`Connection established. Replication in progress...`**. If it reports a failure, follow the message and see [Failback Client errors](./failback-client-errors.html). + + 2. Confirm that the Failback Client can reach the recovery instance on TCP port 1500\. The Failback Client connects to the private IP address of the recovery instance when you choose **Use private IP** in the failback replication settings. Otherwise, it connects to the public IP address. See [Use private IP](./recovery-instances-details.html#recovery-instances-details-failback-replication-settings-private-ip). From the Failback Client network, test the connection to that address on TCP port 1500\. On Linux: + + nc -zv recovery-instance-ip 1500 + +On Windows: + + Test-NetConnection -ComputerName recovery-instance-ip -Port 1500 + +If the test connects, the agent can log the DRS-REPL-004 error once. You can ignore that entry. If the test fails, continue with the next step. + + 3. Confirm that the security group and network ACL for the recovery instance allow inbound TCP traffic on port 1500 from the Failback Client. See [Error: Failed to get recovery instance volumes](./failback-client-errors.html#Troubleshooting-Failback-get-volumes). Also verify that your environment meets the requirements in [Failback prerequisites](./failback-performing.html#failback-performing-prerequisites). + + 4. If the error persists, contact AWS Support. + + + + +## DRS-REPL-008: Handshake with the replication server failed + +**Error message:** **`Error code: DRS-REPL-008 - Handshake with the replication server failed`** + +**Cause:** The TCP port 1500 connection opened and the authentication message was sent. While the agent exchanged version, session, and volume information, the connection closed or reset, or returned no response for 5 minutes. A firewall, proxy, or other network device can reset or drop the connection during this exchange. The replication server can also end the session when AWS Elastic Disaster Recovery does not accept the agent or its replication session. During failback, this error can also occur between a recovery instance and the Failback Client. The agent retries every 30 seconds. + +On Windows, this error also occurs if the agent cannot map a replicated volume to a local disk. The log then shows **`runWindowsDeviceMappingCommand failed`**. + +**Resolution:** + + 1. If the connection keeps dropping and reconnecting, the agent can log this error repeatedly. First, check whether replication is affected. For a source server, open the **Source servers** page and confirm that **Data replication status** is **Healthy** and that lag is not growing. See [Interacting with the Source Servers page](./interracting.html). For failback, open the recovery instance details page and check the **Data replication status** panel. See [Data replication status](./recovery-instances-details.html#recovery-instances-details-failback-dashboard-data-replication). You can also search the agent log for **`Connected to replicator`** after the error. If replication is healthy and lag is not growing, no action is needed. + + 2. This error happens after the TCP port 1500 connection opens, so a test that only checks whether the port is reachable passes. Instead, check your firewall, proxy, and intrusion prevention logs for TCP port 1500 connections that were reset or dropped after they opened. Exclude TCP port 1500 traffic from deep packet inspection on those devices. + + 3. If the replication server ended the session, the agent gets new connection details from AWS Elastic Disaster Recovery on its next attempt. If the error continues and replication does not resume, contact AWS Support. + + 4. On Windows, if the log shows **`runWindowsDeviceMappingCommand failed`** , the agent could not map a replicated volume to a local disk. Collect diagnostic information and contact AWS Support. See [Gather diagnostic information for support](./agent-diagnostics.html#agent-diagnostic-tools). + + + + +## DRS-REPL-009: Agent ran out of memory and restarted + +**Error message:** **`Error code: DRS-REPL-009 - Agent ran out of memory and restarted`** + +**Cause:** The agent process ran out of memory and exited. The service manager restarts the agent after 30 seconds, and replication resumes. The agent sets its maximum memory based on the memory of the server. On some out-of-memory errors, the Java runtime can write a `client.hprof` file to the agent directory. This file contains a copy of the agent memory and can include sensitive data. + +**Resolution:** + + 1. The agent restarts after this error, and replication resumes. To count how many times the error occurred, search the agent log for the error code. On Linux: + + sudo grep "DRS-REPL-009" /var/lib/aws-replication-agent/agent.log.0 + +On Windows, in PowerShell run as an administrator: + + Select-String -Pattern "DRS-REPL-009" -Path "C:\Program Files (x86)\AWS Replication Agent\agent.log.0" + +If the agent does not log error codes, search for **`OutOfMemoryError`** instead. On Linux, you can also run `systemctl status aws-replication-agent` to see when the agent last started. If the error appears once and the console shows replication as **Healthy** , no action is needed. + + 2. If the error appears more than once, collect diagnostic information and contact AWS Support. See [Gather diagnostic information for support](./agent-diagnostics.html#agent-diagnostic-tools). In your case, include the kind of **`OutOfMemoryError`** from the agent log, for example **`Java heap space`** or **`unable to create new native thread`**. + + 3. If a `client.hprof` file is present, tell AWS Support in your case and wait for instructions on how to share it. The file is at `/var/lib/aws-replication-agent/client.hprof` on Linux and `C:\Program Files (x86)\AWS Replication Agent\client.hprof` on Windows, in the same folder as `agent.log.0`. The Java runtime does not overwrite an existing `client.hprof` file, so check the file timestamp to confirm that it is from the latest error. Because this file can include sensitive data, delete it after you share it. + + + +