Applies To:
  • CitectSCADA 5.xx, 6.00, 6.00 Service Pack A
  • CitectHMI 5.xx, 6.00, 6.00 Service Pack A

Summary:
The ClusterSetName() function will return 0 (successful) even if the requested server(s) do not exist or are unavailable.

Why doesn't it return an error and how can i tell whether i have successfully connected to the requested server?

Solution:
ClusterSetName() is Asynchronous, it does not know whether the requested server(s) exist or not. The function works by changing the name for the primary and standby ART servers. ie [Client]Primary, [Client]Standby from the ini. It then calls TranReopen which closes the old tran connections to the original servers and reopens them with the new server names.

ClusterSetName() will only return an error if an error occurs in the name change not whether it can actually connect to those servers. It cannot tell the difference whether those servers don't exist or are just not available at that time.

To determine the server status, you can call ServerInfo() after ClusterSetName()

Note : Similarly, ClusterGetName() will just return the primary or standby names set in the ini or alternatively those set by ClusterSetName(). It does not check to see if the server(s) are available. Once again ServerInfo() could be used here to determine the server status.
 

Keywords:
Cluster 
 

Attachments