Description

Server cluster administration server

General information

To administer a server cluster, you can use a cluster administration server. It includes the server (ras) and the command-line utility (rac) used for server cluster management.

Fig. Administration server


The server cluster and the administration server (ras) must have the same version. When using the command-line utility (rac), the following limitations should be considered:

  • The command-line utility (rac) version 8.3.1 or 8.3.2 can only be used with the administration server (ras) version 8.3.1 or 8.3.2.
  • The command-line utility (rac) version 8.3.3 or 8.3.4 can only be used with the administration server (ras) version 8.3.3 or 8.3.4.
  • The command-line utility (rac) version 8.3.5 through 8.3.8 can only be used with the administration server (ras) version 8.3.5 through 8.3.8.
  • The command-line utility (rac) version 8.3.9 and later can only be used with the administration server (ras) version 8.3.9 and later. When using the command line utility of earlier version than the version of the administration server, only the functionality implemented in the platform corresponding to the command line utility version is available. If you need a specific feature, make sure to use the command-line utility of the version in which the feature is implemented (subject to the above limitations).

Both the administration server and the command line utility can work in any supported OS. Multiple administration servers can be connected to the server cluster at the same time. An administration server can be connected to one server agent only.

An administration server (ras) can run as an application, as a Windows service, or as a Linux daemon. The general procedure is as follows:

  • The administration server is started (as an application, or as a service/daemon).
  • The command-line utility connects to the administration server to perform the necessary actions.
  • For the duration of the operations, the administration server connects to the server cluster and, after performing the operations‑disconnects from the cluster. Therefore, there is no need to shut down the administration server during scheduled operations on a cluster of servers associated with cluster shutdown or restart. Changing the server cluster version is an exception. In this case, you need to set the administration server version identical to the server cluster version.

The administration server and the administration utility are installed together with the 1C:Enterprise server.

For interaction between the administration server and the administration utility, network port 1545 is used. This can be redefined using the --port parameter of the administration server startup command line (ras).

The administration utility allows you to perform all operations required to administer a cluster of servers. However, the following features are not supported:

  • OS authentication for server cluster administrators, working server administrators, and Infobase administrators.

The administration utility (rac) gets all necessary parameters from the command line and sends information to the standard output stream (stdout). If successful, the return code of the utility is equal to 0. Otherwise, the return code is non-zero and an error message is sent to the standard error stream (stderr).

The result of the utility operation is a description of one or several data objects (for example, a list of Infobase servers registered in a cluster) in the form of a table:

<Parameter name> : <Parameter value>

Where each parameter is displayed on a new line and contains an empty line indicating the end of the object description. <Parameter name> matches the names of the utility command line parameters. If the parameter cannot be set from the command line (or it is read-only), then the parameter name is converted from the property name of the corresponding COM object. Conversion is performed according to the following rule: All words and abbreviations in the name of a property are converted to lowercase and separated by "-". For example, theMemoryExcessTime working process property will be converted to memory-excess-time.

Cluster item creation commands (with the exception of administrators) send the ID of the created item to the stream in the above format when successful.

Strings that allow arbitrary characters are put in double-quotes, with double quotes in the strings themselves being duplicated.

Dates are in XML format (https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/#dateTime).

For more information about parameters of the administration server (ras) or the administration utility (rac), run the corresponding executable file with the help command-line parameter:

ras help
rac help

The ITS disk also comes with a package of Java archives, which allows you to interact with the administration server from a Java-language program without the help of a console administration utility (https://1c-dn.com/library/1c_enterprise_8_administrative_service_api/ ).

Starting the administration server

On Windows

In application mode

To start the administration server in application mode, use the following command line:

ras cluster --port=<port> <host[:port]>

The command can have the following keys:

cluster

Starts the administration server in server cluster administration mode.

--port or -p

Specifies the network port on which the administration utility will communicate with the administration server. The default value is 1545.

<host[:port]>

Specifies the address of the service agent of the server cluster administrated by the administration server.

If the address of the cluster agent is not explicitly specified, the default value is localhost:1540.

In service mode

To start the administration server in service mode, you need to register the administration server as a service. This operation can be performed using the sc utility.  Administrator rights are required to complete the registration.

Let us review an example of the batch file that performs the registration of the server service.

Register-ras.bat:

@echo off
rem %1 – 1C:Enterprise full version
 
set SrvUserName=<user name>
set SrvUserPwd=<user password>
set CtrlPort=1540
set AgentName=localhost
set RASPort=1545
 
set SrvcName="1C:Enterprise 8.3 Remote Server"
set BinPath="\"C:\Program Files\1cv8\%1\bin\ras.exe\" cluster --service --port=%RASPort% %AgentName%:%CtrlPort%"
set Description="1C:Enterprise 8.3 Administration Server"
 
sc stop %SrvcName%
sc delete %SrvcName%
sc create %SrvcName% binPath= %BinPath% start= auto obj= %SrvUserName% password= %SrvUserPwd% displayname= %Desctiption%

Before using this batch file, you need to edit it with the user name and password of the user on whose behalf the administration server service will run (set SrvUserName = and set SrvUserPwd = lines). This batch file performs registration of the administration server with the following parameters:

  • Service Name: 1C:Enterprise 8.3 Remote Server
  • Displayed Name: 1C: Enterprise 8.3 administration server
  • Administration server port: 1545
  • Address of the 1C:Enterprise server cluster: localhost:1540
  • Service start mode: Auto.

Example:

register-ras 8.3.3.100
On Linux

In application mode

To start the administration server in application mode, use the following command line:

./ras cluster --port=<port> <host[:port]>

The command can have the following keys:

cluster

Starts the administration server in server cluster administration mode.

--port or -p

Specifies the network port on which the administration utility will communicate with the administration server. The default value is 1545.

<host[:port]>

Specifies the address of the service agent of the server cluster administrated by the administration server.

If the address of the cluster agent is not explicitly specified, the default value is localhost:1540.

In daemon mode

To start the administration server (ras) in daemon mode, you need to start the administration server using a special command-line key:

./ras cluster --daemon --port=<port> <host[:port]>

The command line keys for starting the administration server (ras) on Windows and Linux are identical.

Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.