Replication Agent loses connection
How to recover Replication Agent connection to FairCom DB servers
This section explains how to recover if the Replication Agent loses its connection to the target FairCom DB server due to a network connectivity issue that leaves an extra Replication Agent connection in the target FairCom DB server process.
recover replication agent connection loss to FairCom DB source server and target server
Sometimes the Replication Agent will lose its connection to the target FairCom DB server due to a network connectivity issue (such as loss of a VPN connection), which makes it impossible to notify the target FairCom DB server that the connection is lost. As a result, a Replication Agent connection still exists in the target FairCom DB server process.
After losing the connection to the target FairCom DB Server, the Replication Agent reconnects to the target server and then it logs the following errors.
Sat Oct 11 10:40:35 2014: ERR: Failed to lock replication state record on data target. Check for two Replication Agents using the same unique ID (REPAGENTID). Sat Oct 11 10:40:35 2014: ERR: Failed to read replication state on data target: 827 Sat Oct 11 10:40:35 2014: ERR: Failed to update Replication Agent state on data target: 100
See Loss of connection to the target server and Loss of connection to the source server to resolve this issue.
Use the
ctadmnutility to find and disconnect the old Replication Agent connection on the target server.Run the
ctadmnutility.Enter the administrator user name, password, and server name.
Note
Replace
name@hostbelow with the actual target server name, such asFAIRCOMS@hostname, wherehostnameis the hostname or IP address of the target system.C:\FairCom\V10.4.0\winX64\tools\cmdline\admin\client> ctadmn Enter Administrator User ID (and/or press RETURN) >> ADMIN Enter Administrator Password (and/or press RETURN) >> ***** Enter Optional File Password (and/or press RETURN) >> Enter Optional Server Name (and/or press RETURN) >> name@host
Select option
4. Monitor Clientsto view the client monitoring options.Example 1. Option 4. Monitor Clients**** FairCom(R) Server Administration Utility **** Copyright 1992 - 2014 FairCom Corporation. All Rights Reserved 1. User Operations 2. Group Definitions 3. File Security 4. Monitor Clients 5. Server Information (IOPERFORMANCE) 6. Server Configuration (SystemConfiguration) 7. Stop Server 8. Quiesce Server 9. Monitor Server Activity 10. Change Server Settings Enter your choice (1-10), or 'q' to quit>> 4Select option
1. List Attached Clientsto list the connected clients.Example 2. List Attached ClientsMonitor Clients: 1. List Attached Clients 2. Kill Client Enter your choice (1-2), or 'q' to return to previous menu>> 1 UserID: ADMIN NodeName: ctreplw 10.0.0.0 Task 13 Communications: FSHAREMM Memory: 66K Open Files: 2 Logon Time: 35:34 Tran Time: -- Rqst Time: 35:33 NoRequest Rqst# 13 TRANENDIn this list, find the connection whose
NodeNamefield has the valuectreplw nodeidwherenodeidis the node ID of the source server for this Replication Agent (10.0.0.0in Example 2, “List Attached Clients”).Note
ctreplwindicates a replication writer connection (that is, a Replication Agent connection that is applying changes to that server) andctreplrindicates a replication reader connection (that is, a Replication Agent connection that is reading changes from that server). To resolve errors 827 and 100 that the Replication Agent reported on a target server, only thectreplwconnection needs to be disconnected.Make a note of the UserID and task values (in Example 2, “List Attached Clients”,
ADMINand13).Press
RETURNuntilctadmnhas displayed the details for all of the connections and has returned to theMonitor Clientsmenu.Select option
2. Kill Client.Example 3. Kill ClientMonitor Clients: 1. List Attached Clients 2. Kill Client Enter your choice (1-2), or 'q' to return to previous menu>> 2 Enter Task # to kill, or zero (0) to quit >> 13 Enter User Id >> ADMIN Client marked for termination. Press RETURN to continue...Enter the task number and user ID values for the Replication Agent connection.
ctadmnwill report that the connection has been marked for termination.Press
RETURN.List the connected clients again as you did in Step 5.
The Replication Agent connection on this server should now be gone, and you can proceed to reconnect the Replication Agent to this server.
An error can also occur when the Replication Agent loses its connection to the source FairCom DB server due to a network connectivity issue. In that situation, the Replication Agent will log the following messages.
Sat Oct 11 13:33:59 2014: ERR: Failed to enable replication log position persistence on data source: 780 Sat Oct 11 13:33:59 2014: INF: Check for two replication agents using the same unique ID (REPAGENTID)
Use the
ctadmnutility to connect to the source server.Select option
4. Monitor Clientsto view the client monitoring options.Example 4. Option 4. Monitor Clients**** FairCom(R) Server Administration Utility **** Copyright 1992 - 2014 FairCom Corporation. All Rights Reserved 1. User Operations 2. Group Definitions 3. File Security 4. Monitor Clients 5. Server Information (IOPERFORMANCE) 6. Server Configuration (SystemConfiguration) 7. Stop Server 8. Quiesce Server 9. Monitor Server Activity 10. Change Server Settings Enter your choice (1-10), or 'q' to quit>> 4Select option
1. List Attached Clientsto list the connected clients.In this list, find the connection whose
NodeNamefield has the valuectreplrwherenodeidis the node ID of the target server for this Replication Agent.Make a note of the UserID and task values.
Press
RETURNuntilctadmnhas displayed the details for all of the connections and has returned to theMonitor Clientsmenu.Select option
2. Kill Client.Enter the task number and user ID values for the Replication Agent connection.
ctadmnwill report that the connection has been marked for termination.Press
RETURN.List the connected clients again as you did in Step 5.
The Replication Agent connection on this server should now be gone, and you can proceed to reconnect the Replication Agent to this server.