PADR.log message: Last IO Error: "error connecting to master 'ReplicationUser@127.0.0.1:33061'
Symptom
In a vault environment, replication appears to be working successfully but there are errors in the PADR.log and/or the VaultDB.log on the DR server:
"Last IO Error: "error connecting to master 'ReplicationUser@127.0.0.1:33061' - retry-time: x retries: x""
In the VaultDB.log is the following message:
[ERROR] Slave I/O: error connecting to master 'ReplicationUser@127.0.0.1:33061' - retry-time: x retries: x, Error_code: 2013.
or [ERROR] Slave I/O for channel '': error connecting to master 'ReplicationUser@127.0.0.1:33061' - retry-time: x retries: x message: Access denied for user 'ReplicationUser'@'localhost' (using password: YES), Error_code: MY-001045
Environment
10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0;12.1;12.2;12.6;13.0 Privileged Access Manager (PAM, self-hosted) Vault Vault
Cause
Standalone and HA Cluster
This can occur when the ReplicationUser.pass and MasterReplicationUser.pass become out of sync. This can happen when the proper failback process is not followed, a vault has been out of contact for extended periods of time, and/or a virtual vault is restored to a prior snapshot.
HA Cluster
This can occur when the ReplicationUser.pass from Node A was not copied to Node B per the HA Vault install instructions causing the files to be different between the nodes. The ReplicationUser.pass from the first HA Node is used to create the MasterReplicationUser.pass on the DR Vault.
Resolution
Copy ReplicationUser.pass from the good vault to the DR vault. In a HA Cluster ensure both nodes have the updated ReplicationUser.pass
Trigger a full replication using the following steps
Standalone
- Stop the "Idira Disaster Recovery" service
- Update PADR.ini with the following
- Set "Failovermode" to "No"
- Update "NextBinaryLogNumberToStartAt" to "-1"
- Delete "LastDataReplicationTimestamp"
- Start the "Idira Disaster Recovery" service
- Use "Vault Cluster Manager"- Stop both nodes
- On one node bring the data drive online
- Update PADR.ini with the following
- Set "Failovermode" to "No"
- Update "NextBinaryLogNumberToStartAt" to "-1"
- Delete "LastDataReplicationTimestamp"
- Take the data drive offline
- Using "Vault Cluster Manager" start one node
- Review padr.log to ensure replication completes successfully
- Using "Vault Cluster Manager" start the second node
PADR0100W Metadata Replication warning: Communication error. Last SQL Error: 0
Once completed, follow the instructions above
Additional Information
Details
SYMPTOM:
In a vault environment replication appears to be working successfully but there are errors in the PADR.log and/or the VaultDB.log on the DR server:
In the PADR.log is the following message:
Last IO Error: "error connecting to master 'ReplicationUser@127.0.0.1:33061' - retry-time: x retries: x"
In the VaultDB.log is the following message:
[ERROR] Slave I/O: error connecting to master 'ReplicationUser@127.0.0.1:33061' - retry-time: x retries: x, Error_code: 2013.
or
[ERROR] Slave I/O for channel '': error connecting to master 'ReplicationUser@127.0.0.1:33061' - retry-time: x retries: x message: Access denied for user 'ReplicationUser'@'localhost' (using password: YES), Error_code: MY-001045
PROBLEM:
Standalone and HA Cluster
The can occur when the ReplicationUser.pass and MasterReplicationUser.pass become out of sync. This can happen when the proper failback process is not followed, a vault has been out of contact for extended periods of time, and/or a virtual vault is restored to a prior snapshot.
HA Cluster
This can occur when the ReplicationUser.pass from Node A was not copied to Node B per the HA Vault install instructions causing the files to be different between the nodes. The ReplicationUser.pass from the first HA Node is used to create the MasterReplicationUser.pass on the DR Vault.
SOLUTION:
Rename ReplicationUser.pass and MasterReplicationUser.pass on the vault with the error (should be DR Vault) to ReplicationUserBad.pass and MasterReplicationUserBad.pass as a backup.
Copy ReplicationUser.pass from the good vault to the DR vault. In a HA Cluster ensure both nodes have the updated ReplicationUser.pass
Trigger a full replication using the following steps
Standalone
-
Stop the "Idira Disaster Recovery" service
-
Update PADR.ini with the following
- Set "Failovermode" to "No"
- Update "NextBinaryLogNumberToStartAt" to "-1"
-
Delete "LastDataReplicationTimestamp"
-
Start the "Idira Disaster Recovery" service
HA Cluster
-
Use "Vault Cluster Manager" stop both nodes
-
On one node bring the data drive online
-
Update PADR.ini with the following
- Set "Failovermode" to "No"
- Update "NextBinaryLogNumberToStartAt" to "-1"
-
Delete "LastDataReplicationTimestamp"
-
Take the data drive offline
-
Using "Vault Cluster Manager" start one node
-
Review padr.log to ensure replication completes successfully
-
Using "Vault Cluster Manager" start second node
If replication is successful the ReplicationUserBad.pass and MasterReplicationUserBad.pass can be deleted.
In the event that ReplicationUser.pass does not exist on the running vault or node follow the resolution in the link below to regenerate ReplicationUser.pass
PADR0100W Metadata Replication warning: Communication error. Last SQL Error: 0
Once competed follow the instructions above