Skip to main content

Replication Agent loses connection

How to recover Replication Agent connection to FairCom DB servers

Abstract

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.

  1. Use the ctadmn utility to find and disconnect the old Replication Agent connection on the target server.

  2. Run the ctadmn utility.

  3. Enter the administrator user name, password, and server name.

    Note

    Replace name@host below with the actual target server name, such as FAIRCOMS@hostname, where hostname 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
  4. 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


  5. Select option 1. List Attached Clients to list the connected clients.

    Example 2. List Attached Clients
              Monitor 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


  6. In this list, find the connection whose NodeName field has the value ctreplw nodeid where nodeid 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) and ctreplr 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 the ctreplw connection needs to be disconnected.

  7. Make a note of the UserID and task values (in Example 2, “List Attached Clients, ADMIN and 13).

  8. Press RETURN until ctadmn has displayed the details for all of the connections and has returned to the Monitor Clients menu.

  9. Select option 2. Kill Client.

    Example 3. Kill Client
              Monitor 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...


  10. Enter the task number and user ID values for the Replication Agent connection. 

    ctadmn will report that the connection has been marked for termination.

  11. Press RETURN.

  12. 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)
  1. Use the ctadmn utility to connect to the source server.

  2. 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


  3. Select option 1. List Attached Clients to list the connected clients.

  4. In this list, find the connection whose NodeName field has the value ctreplr where nodeid is the node ID of the target server for this Replication Agent.

  5. Make a note of the UserID and task values.

  6. Press RETURN until ctadmn has displayed the details for all of the connections and has returned to the Monitor Clients menu.

  7. Select option 2. Kill Client.

  8. Enter the task number and user ID values for the Replication Agent connection. 

    ctadmn will report that the connection has been marked for termination.

  9. Press RETURN.

  10. 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.