Configuring Relay Server in a Multinode Cluster

Setting up relay server in a multinode environment requires a unique set of steps to ensure configuration details are propagated correctly.

Prerequisites
Ensure you have installed relay server and configured it for your Web server type.
Task
  1. On the first node:
    1. Open <UnwiredPlatform_InstallDir>\Servers\UnwiredServer\config\relayserver.properties and edit property values as explained in the file comments.
      If you are configuring a farm in this file with the relayserver.webserver.farm_name and the relayserver.webserver.token properties, this farm is used for data orchestration engine (DOE) connections and data change notification (DCN) requests in a cluster.
    2. With Unwired Server running, register the relay server by running <UnwiredPlatform_InstallDir>\Servers\UnwiredServer\bin\regRelayServer.bat.
      Registering the relay server also generates rs.config. This file is used to configure the relay server.
    3. Restart Unwired Server. The RSOE for this server also starts.
    4. To configure the relay server:
      1. Open rs.config, and ensure all servers in the cluster are added to the file. regRelayServer.bat generates a configuration file that contains only the details of the server on which it is run — even if there is more than one server registered in cluster.
        For example, when finished, you should have:
        • One [options] section
        • One [relay_server] section
        • Multiple [backend_farm] sections, including one for Unwired Server, one for the messaging synchronisation server, and one for Web server farms). To calculate the total sections, use:
          (3 * no. of server runtime nodes) = the total number of [backend_server] entries 

          For example, if you have two nodes, you would require six [backend_farm] sections.

          Define the [backend_farm] sections as follows, where the lines prefixed with "#" are additional configuration comments:
          [backend_server]
              enable   = yes
              farm     = MyServerName.SUPFarm
              id       = MyServerNameSUPServer1
              # uncomment mac if you want relay server to do MAC 
              # verification.
              # the value should have only the 1 MAC address RSOE 
              # sends to relay server.
              # Look in the RSOE.log file to see what that address is
              # mac      = 00-50-56-c0-00-08!!00-50-56-c0-00-01!!
              # 00-15-c5-3d-e2-01!!00-13-02-c5-8e-f1!!00-ff-b0-b5-e0-8a
              token    = asd13123bmnsadfas
          
      2. Copy rs.config to either the \Servers directory you created for IIS Web server or the /Modules directory you created for Apache Web server.
      3. To apply changes, run this command from the directory you copied the rs.config file to:

        rshost -f rs.config -q -qc -u

        By default, rshost is installed to UnwiredPlatform_InstallDir\Servers\SQLAnywhere11\Mobilink\relayserver\IIS\Bin32\IAS_relay_server\Server. For reference details on the rshost utility, see System Administration > System Reference > Command Line Utilities > Relay Server Utilities, Relay Server (rshost) Utility.

  2. On remaining nodes:
    1. Open <UnwiredPlatform_InstallDir>\Servers\UnwiredServer\config\relayserver.properties and edit property values as explained in the file comments.
    2. With Unwired Server running, register the RSOE and configuration changes by running <UnwiredPlatform_InstallDir>\Servers\UnwiredServer\bin\regRelayServer.bat with Unwired Server running.
      Use this syntax:
      regRelayServer.bat install auto
      This file generates:
      • <UnwiredPlatform_InstallDir>\Servers\UnwiredServer\config\rs.config
      • startrsoe.bat stoprsoe.bat in <UnwiredPlatform_InstallDir>\Servers\UnwiredServer\bin\.
      After startrsoe.bat and stoprsoe.bat are generated, the Start Unwired Server desktop shortcuts and menu commands also start and stop the RSOE.
      Note: These various .BAT files are never modified while registering relay server. They have a condition to check if relay server is configured.
    3. If relay server is configured with the generated rs.config file, restart Unwired Server. The RSOE for this server also starts. If a file other than the generated rs.config is used, RSOEs will have errors.
  3. For messaging-based application devices, register the device using relay server connection parameters:
    1. In Sybase Control Center, create a registration template using exported values.
      For details, see Sybase Control Center Online Help> Configure > Configuring Unwired Platform > Device Users > Devices.
    2. Set up the device messaging application settings to connect the relay server.
    Configure properties of the same name as follows:
    • User Name – any valid user name that has been registered with the messaging server.
    • Server Name – MyRelayserver.MyCompany.com
    • Server Port – 80
    • Company ID – the messaging server farm ID. For example, SUPServer.SUPMessagingFarm.
    • Activation Code – a matching relay server code.
  4. For replication-based synchronization application devices, the application developer can embed the relay server connection info in the application, or the administrator can provide the setup values to the application user, thereby allowing him or her to configure the device application independently.
Related reference
Relay Server (rs.config) Configuration File