Replication errors: agent runtime errors
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.
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.
Topics
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
DRS-REPL-005: Cannot reach AWS Elastic Disaster Recovery or load agent credentials
DRS-REPL-006: AWS Elastic Disaster Recovery rejected the agent credentials
DRS-REPL-007: Timed out waiting for the failback connection on TCP port 1500
DRS-REPL-001: Server identity changed and no matching recovery instance was found
Error message:
Error code: DRS-REPL-001 - Server identity changed and no matching recovery instance was found
Cause: At startup, the agent detected that the server identity changed and found no matching recovery instance. This happens when:
-
A disk with the agent installed was cloned, migrated, or restored onto a different server.
-
On the same server, the agent cannot detect or read the identifier that it recorded at installation: the MAC address, the VMware UUID, or the Google Cloud instance ID. For example, it cannot read the VMware UUID from the system BIOS information or reach the Google Cloud metadata server.
-
On a recovery instance, the agent could not confirm with AWS Elastic Disaster Recovery that the instance is a recovery instance. For example, the instance has no instance profile with the required permissions, cannot reach AWS Elastic Disaster Recovery over TCP port 443, or is not a recovery instance in this AWS account and Region.
The process exits after 60 seconds, and the service manager restarts it. Replication does not start.
Resolution:
-
On a recovery instance, verify the instance profile policy and TCP port 443 access to AWS Elastic Disaster Recovery. See AWS managed policy: AWSElasticDisasterRecoveryRecoveryInstancePolicy. The agent checks again after it restarts. If the error persists, reinstall the agent as a recovery instance. This procedure first disconnects the instance from AWS. See Reinstalling the agent on a recovery instance.
-
On a server that was cloned, migrated, or restored, or whose identifier changed, reinstall the agent so that it registers as its own source server. See Reinstalling the agent.
-
If the identity changed unexpectedly, contact AWS Support.
DRS-REPL-002: Replication driver failed to load at agent startup
Error message:
Error code: DRS-REPL-002 - Replication driver failed to load at agent startup
Cause: At startup, the agent could not load the replication driver or set up the driver device. The process exits, and the service manager restarts it. Common causes include the following:
-
On Linux, the agent could not rebuild the driver after a kernel upgrade. The agent rebuilds it automatically, which requires kernel headers that match the new kernel and access to download the driver sources from AWS.
-
On Linux, kernel headers that do not match the running kernel
-
On Linux, Secure Boot or SELinux settings that block the driver
-
Endpoint protection software that blocks the driver
Resolution:
-
On Linux, install kernel headers that match the running kernel, and then reinstall the agent to rebuild the driver. See DRS-INST-002: Kernel headers link is broken.
-
On Linux, resolve Secure Boot, SELinux, or endpoint protection settings that block the driver. See DRS-INST-025: Permission denied when loading kernel driver.
-
On Windows, check the driver service with
sc query AwsReplicationDriver, confirm that endpoint protection software is not blocking the driver, and then restart the agent. -
If the driver still fails to load, collect diagnostic information and contact AWS Support. See Gather diagnostic information for support.
DRS-REPL-003: Cannot connect to the replication server on TCP port 1500
Error message:
Error code: DRS-REPL-003 - Cannot connect to the replication server on TCP port 1500
Cause: The agent could not connect to the replication server on TCP port 1500 because the connection was refused, timed out, or had no route. The agent retries every 30 seconds until it connects.
Resolution:
-
Verify that the firewall, route table, and network ACL that you manage allow outbound TCP traffic on port 1500 from the source server to the replication server. See Verifying TCP port 1500.
-
AWS Elastic Disaster Recovery opens inbound TCP port 1500 on the security group that it creates for the replication server. If you replaced that security group, verify that your security group allows inbound TCP traffic on port 1500. See Resolving port 1500 issues.
-
If the error persists, contact AWS Support.
DRS-REPL-004: Authentication with the replication server failed
Error message:
Error code: DRS-REPL-004 - Authentication with the replication server failed
Cause: The agent connected to the replication server on TCP port 1500, but the connection failed while the agent sent or received the authentication message. For example, a firewall, proxy, or other network device between the source server and the replication server interrupted or inspected the TLS connection. The agent retries every 30 seconds.
Resolution:
-
Make sure that no firewall, proxy, or inspection device decrypts or interrupts TCP port 1500 traffic between the source server and the replication server. To verify connectivity, see Verifying TCP port 1500.
-
If the log shows
No available tokens for peer, earlier connection attempts in the same session failed. Fix the network issues first. If this is the only error in the log, contact AWS Support. -
If authentication still fails, reinstall the agent. If the error returns, contact AWS Support.
DRS-REPL-005: Cannot reach AWS Elastic Disaster Recovery or load agent credentials
Error message:
Error code: DRS-REPL-005 - Cannot reach AWS Elastic Disaster Recovery or load agent credentials
Cause: A request to AWS Elastic Disaster Recovery failed before the service responded, because the agent could not reach the endpoint or load its credentials. Common causes are DNS resolution failures, blocked outbound TCP port 443, incorrect proxy settings, or an unavailable credential source. The agent keeps running and retries.
Resolution:
-
Verify DNS resolution and outbound TCP port 443 connectivity from the source server to the AWS Elastic Disaster Recovery endpoint for the target Region. See Solving communication problems over TCP port 443 between the source servers and AWS Elastic Disaster Recovery.
-
If the source server uses a proxy, verify the proxy settings.
-
If the agent uses an instance profile, confirm that an instance profile with the required IAM policy is attached. For an agent that you installed with an instance profile, see Using an instance profile for agent installation in AWS. For a recovery instance, see AWS managed policy: AWSElasticDisasterRecoveryRecoveryInstancePolicy.
-
If the error persists, contact AWS Support.
DRS-REPL-006: AWS Elastic Disaster Recovery rejected the agent credentials
Error message:
Error code: DRS-REPL-006 - AWS Elastic Disaster Recovery rejected the agent credentials
Cause: AWS Elastic Disaster Recovery does not recognize the agent's credentials. For example, AWS access keys stored in the agent configuration were deleted or deactivated. Agents installed with the current installer use a certificate instead of stored access keys. After seven days of rejected requests, the agent stops its regular requests and checks the credentials once every 24 hours until they work.
Resolution:
-
Reinstall the agent to configure new credentials. See Reinstalling the agent.
-
Confirm that the agent log no longer shows the invalid security token warning and that replication resumes.
With cross-account roles, a missing or misconfigured
DRSCrossAccountAgentAuthorizedRole role in the account where the
instance runs, or DRSCrossAccountAgentRole role in the account that the
agent replicates to, causes an AWS STS error for the AssumeRole request
instead of this message. See Creating the Failback and in-AWS right-sizing roles.
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:
-
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 showsConnection established. Replication in progress.... If it reports a failure, follow the message and see Failback Client errors. If it reports that it could not establish the connection, see DRS-FAILBACK-009: Could not establish replication connection to recovery instance for the Failback Client side. -
Confirm that the Failback Client can reach the recovery instance on TCP port 1500. The Failback Client connects to the IPv6 address of the recovery instance when the failback replication settings use IPv6. It 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. From the Failback Client network, test the connection to that address on TCP port 1500. On Linux:
nc -zvrecovery-instance-ip1500On Windows:
Test-NetConnection -ComputerNamerecovery-instance-ip-Port 1500If 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.
-
Confirm that the security group and network ACL for the recovery instance allow inbound TCP traffic on port 1500 from the Failback Client. Also verify that your environment meets the requirements in Failback prerequisites.
-
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:
-
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. For failback, open the recovery instance details page and check the Data replication status panel. See Data replication status. You can also search the agent log for
Connected to replicatorafter the error. If replication is healthy and lag is not growing, no action is needed. -
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.
-
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.
-
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.
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:
-
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.0On 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
OutOfMemoryErrorinstead. On Linux, you can also runsystemctl status aws-replication-agentto see when the agent last started. If the error appears once and the console shows replication as Healthy, no action is needed. -
If the error appears more than once, collect diagnostic information and contact AWS Support. See Gather diagnostic information for support. In your case, include the kind of
OutOfMemoryErrorfrom the agent log, for exampleJava heap spaceorunable to create new native thread. -
If a
client.hproffile 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.hprofon Linux andC:\Program Files (x86)\AWS Replication Agent\client.hprofon Windows, in the same folder asagent.log.0. The Java runtime does not overwrite an existingclient.hproffile, 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.