Product Documentation

c-treeACE V11.0 Update Guide

Previous Topic

Next Topic

Associate Replication to Specific Server Nodes

A replicated server node identification can be specified to register a specific Replication Agent context with an associated server. The REPL_NODEID server configuration is used to set this identification value.

Replication Agent now supports configuration options to force required node IDs for source and target servers. These options are set with the following options in ctreplagent.cfg:


source_nodeid <dotted_notation>

target_nodeid <dotted_notation>

Note: Node IDs are expected to be in IPv4 address format, although actual values are arbitrary and do not need to match any actual IP server address. The main requirement is that node IDs be unique among all servers participating in replication.

Exception Handling

When this option is used for a source and/or target server, the Replication Agent requires that the server has set its node ID to that value (using the REPL_NODEID configuration option in ctsrvr.cfg). If the server has not set the value, the Replication Agent logs the following message to ctreplagent.log:


Node ID is required for source server but it is not set

If an error occurs retrieving a server node ID, the agent logs this message:


Node ID is required for source server but it cannot be read: error code <errorcode>

If a node ID mismatch is detected when Replication Agent is starting, a message is logged to ctreplagent.log and the agent shuts down:


Source server node ID is expected to be '<expectednodeid>' but is '<actualnodeid>'

If the node IDs match when Replication Agent starts, but the connection to the source or target server is lost and reestablished, and a node ID mismatch is detected, the Replication Agent logs an error message but does not terminate. Instead, it continues retrying the connection and checking for a proper node ID match every 5 seconds.

Replication API

The options can also be set by calling the ctReplAgentSetConfigOption() function.

Example

ctReplAgentSetConfigOption(""source_nodeid"", ""10.0.0.1"", prepstt, lineno, cfgfile);

ctReplAgentSetConfigOption(""target_nodeid"", ""10.0.0.2"", prepstt, lineno, cfgfile);

TOCIndex