Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA Enterprise SCADA

Configure the OASyS DNA Socket Server Relay Service

Configure the OASyS DNA Socket Server Relay Service

  • Last UpdatedJul 05, 2024
  • 3 minute read

The default configuration as supplied by AVEVA contains configuration options for the following port pairs:

  • Nom2XML – Gas Contract nominations: Port1 = 5000, Port2 = 5001

  • XMLPointImport2XML – XML Point Import: Port1 = 5002, Port2 = 5003

  • FILE2XML – Point Import: Port1 = 5004, Port2 =5005

  • TcpListener – TCP listener tool: Port1 = 5006, Port2 = 5007

    Notes: Deleting or improperly modifying the above lines in the configuration file will interfere with the proper functioning of these applications. Additional lines, however, can be safely added as detailed below.

    It is crucial to cross-reference the configured ports with the current port allocations to ensure the configured port is available for use. This precaution helps maintain the integrity and functionality of the OASyS DNA Socket Relay Server Relay Service.

    If the TCPListener tool will be used and ports 5006 or 5007 are used by another program, follow the Manual Configuration procedures for the Relay Service Mode in the user documentation for TCPListener.

To configure the SocketServerRelayService.json file

Note: For information on overriding default configuration settings, refer to Modify configuration settings.

  1. Navigate to the following directory: %DNADataRoot%\Tools\config\Settings.

  2. Either create or open the SocketServerRelayService.json file.

  3. In the default configuration file, you can find a configuration section for each linked pair of ports that you need to define. For example:

    "XMLPointImport2XML": {

    "Port1": 5002,

    "Port2": 5003,

    "Port1 DisconnectLevel(0-2)": 0,

    "Port2 DisconnectLevel(0-2)": 0,

    "Port1 IdleTimeout(ms)": 0,

    "Port2 IdleTimeout(ms)": 0,

    "ServerBlockingMode": 1,

    "StaleDataThresh(ms)": 0

    }

    The following items can be defined for a port pair:

    • Port1 is port 1 of the port pair.

    • Port2 is port 2 of the port pair.

    • Port1 DisconnectLevel(0-2) is the disconnect level, which is one of the following:

      • 0 — never disconnect

      • 1 — disconnect in the event of a write to the disconnected partner socket

      • 2 — disconnect if partner socket disconnects

    • Port2 DisconnectLevel(0-2) is the disconnect level for port 2

    • Port1 IdleTimeout(ms) is the disconnect time after port 1 is idle for this many milliseconds.

    • Port2 IdleTimeout(ms) is the disconnect time after port 2 is idle for this many milliseconds.

    • ServerBlockingMode is the server blocking mode, which is one of the following:

      • 0 — servers allow multiple clients to connect

      • 1 — servers allow only one client to connect at a time

    • StaleDataThresh(ms) — if greater than zero, the system discards data received from a client that has no client to which to send data after this many milliseconds (plus / minus 100 ms)

    • [Optional] DebugLevel(0-2) is the debug level that determines the messages written by the service in the Windows event log. The possible values are:

      • 0 — service start / stop conditions

      • 1 — level 0 plus service connection activities

      • 2 — level 1 plus service data relay activities

        Notes: Port numbers are limited to 1025-65536. If you include a port outside this range, the system ignores the port and writes a warning message to the Windows event log.

        Port1 Flags and Port2 Flags are optional and may be omitted if not used. Omitting an optional item is equivalent to including it with the value of 0.

        Important: Do not duplicate ports within a service, or between services. Only one server can service any one port. If a port number appears twice in the file, the system ignores the second occurrence and writes a warning message to the Windows event log.

  4. Restart the OASyS DNA Socket Server Relay Service for the modification to take effect. For more information, refer to Restart the OASyS DNA Socket Server Relay Service.