- Newest
- Most votes
- Most comments
When you encounter the "No available tokens for peer" error during AWS Application Migration Service (MGN) or Elastic Disaster Recovery (DRS) replication, this typically indicates a communication issue between the replication agent on your source server and the AWS replication server.
Here are some troubleshooting steps to resolve this issue:
- Check network connectivity:
- Verify that port 1500 is open from your source server to the replication server
- Ensure port 443 (outbound) is open from your source server to the AWS Migration Service endpoint
- Confirm there are no firewall rules blocking communication
- Verify IAM permissions:
- Ensure the IAM role associated with the replication process has the necessary permissions
- For DRS, the role should include the AWSElasticDisasterRecoveryAgentPolicy
- Check system resources:
- Ensure there are sufficient resources on both the source server and replication server
- Verify there's enough free disk space on both servers
- Review agent installation:
- Consider reinstalling the AWS Replication Agent to rule out any corrupted installations
- Make sure you're using the latest version of the agent
- Check DNS configuration:
- If you're using a custom DNS server, DNS traffic might shift to TCP instead of UDP
- You might need to update security groups to allow outbound TCP traffic on port 53
- Subnet configuration:
- Confirm the replication server is in a subnet with proper access to VPC endpoints or public endpoints
If these steps don't resolve the issue, you may need to review the complete agent logs for more specific error messages that could provide additional clues about the root cause.
Sources
Elastic Disaster Recovery Sync Stalled | AWS re:Post
Application Migration Service failing on "Connect AWS Replication Agent to Replication Server" | AWS re:Post
Application migration service - Failed to identify volumes for replication. | AWS re:Post
Hey, I ran into this same issue a while back; the "No available tokens for peer" error usually happens when:
There are too many agents already connected to your replication server (even from old/stale migrations), or
The replication server has run out of available slots/tokens to accept new connections.
Here’s what helped me fix it:
Steps to try: Go to AWS MGN Console > Source Servers Look for any older/stale servers that are in Disconnected, Archived, or Stuck state. Remove or terminate those source servers, this will free up tokens on the Replication Server. Once cleaned up, try reinstalling the AWS Replication Agent on the source server that failed.
Note: If you're doing multiple migrations in a short time, you might need to scale your Replication Server capacity or ensure old sessions are closed properly.
Restart the Replication Server In MGN, go to "Settings" > "Replication settings", and edit/redeploy replication servers. Alternatively, terminate the replication server EC2 instance and let AWS auto-create a new one. Check Agent Logs (Optional but Helpful) On the source server: Location: /var/log/aws-replication-agent/ (Linux) or C:\Program Files (x86)\AWS Replication Agent\logs\ (Windows) Look for: Error Creating Connection: No available tokens for peer. Still Not Working? Open an AWS Support ticket and mention: You're receiving "No available tokens for peer" consistently. You've deregistered unused sources and restarted replication servers. You’ve reinstalled the agent with a new token. AWS can clear stuck token states on the backend if needed.
answered a year ago
Relevant content
- AWS OFFICIALUpdated 3 years ago
