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.
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.
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
ctadmn
utility to find and disconnect the old Replication Agent connection on the target server.Run the
ctadmn
utility.Enter the administrator user name, password, and server name.
Note
Replace
name@host
below with the actual target server name, such asFAIRCOMS@hostname
, wherehostname
is 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 Clients
to 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>> 4
Select option
1. List Attached Clients
to 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 TRANEND
In this list, find the connection whose
NodeName
field has the valuectreplw nodeid
wherenodeid
is the node ID of the source server for this Replication Agent (10.0.0.0
in Example 2, “List Attached Clients”).Note
ctreplw
indicates a replication writer connection (that is, a Replication Agent connection that is applying changes to that server) andctreplr
indicates 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 thectreplw
connection needs to be disconnected.Make a note of the UserID and task values (in Example 2, “List Attached Clients”,
ADMIN
and13
).Press
RETURN
untilctadmn
has displayed the details for all of the connections and has returned to theMonitor Clients
menu.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.
ctadmn
will 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
ctadmn
utility to connect to the source server.Select option
4. Monitor Clients
to 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>> 4
Select option
1. List Attached Clients
to list the connected clients.In this list, find the connection whose
NodeName
field has the valuectreplr
wherenodeid
is the node ID of the target server for this Replication Agent.Make a note of the UserID and task values.
Press
RETURN
untilctadmn
has displayed the details for all of the connections and has returned to theMonitor Clients
menu.Select option
2. Kill Client
.Enter the task number and user ID values for the Replication Agent connection.
ctadmn
will 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.