5.3.2. Server cluster administration server
5.3.2.1. 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. 78. Administration server
The server cluster and the administration server (ras) must have the same version. If you use the command line utility (rac), consider the following restrictions:
- 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) versions 8.3.5 - 8.3.8 can only be used with the administration server (ras) versions 8.3.5 - 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. If you use the command line utility whose version is earlier than the administration server version, only features implemented in the platform corresponding to the command line utility version are available. If you need a specific feature, use the command line utility version where this feature is implemented (considering the restrictions mentioned above).
Both the administration server and the command line utility can work in any supported OS. Multiple administration servers can be connected to a single 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 required actions.
- For the duration of operations, the administration server is connected to the server cluster. It is disconnected from the cluster after the operations are completed. Therefore, there is no need to stop the administration server during scheduled server cluster operations associated with cluster stop or restart. Changing the server cluster version is an exception. In this case, you need to change the administration server version for it to match to the server cluster version.
The administration server and the administration utility are installed together with 1C:Enterprise server (see Installing system components).
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 server cluster. 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 utility operation result is a description of one or several data objects (for example, a list of infobase servers registered in a cluster) presented in a table:
<Parameter name> : <Parameter value>
Each parameter is displayed in a separate row. An empty row indicates the end of the object description. <Parameter name> matches the names of utility command-line parameters. If a parameter cannot be set from the command line (or it is read-only), its name is generated from the property name of the corresponding COM object. For that, all words and abbreviations in the property name are converted to lowercase and separated by "-". For example, the MemoryExcessTime working process property will be converted to memory-excess-time.
Successfully completed cluster item creation commands (except for administrators) send the ID of the created item to the stream in the format specified above.
Strings that allow arbitrary characters are displayed in double quotes. Already existing double quotes in such strings are duplicated.
Dates are displayed 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 includes a package of Java archives. You can use it to interact with the administration server from a Java-language program without the console administration utility (https://1c-dn.com/library/1c_enterprise_8_administrative_service_api/).
5.3.2.2. Starting the administration server
5.3.2.2.1. 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 switches:
cluster
Starts the administration server in server cluster administration mode.
--port or -p
Specifies the network port via which the administration utility will interact with the administration server. Default value: 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. You need administrator rights 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 you use this batch file, specify the data of a real user (name and password) 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.
- 1C:Enterprise server cluster address: localhost:1540.
- Service start mode: Auto.
Example:
register-ras 8.3.3.100
5.3.2.2.2. 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 switches:
cluster
Starts the administration server in server cluster administration mode.
--port or -p
Specifies the network port via which the administration utility will interact with the administration server. Default value: 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 switch:
./ras cluster --daemon --port=<port> <host[:port]>
The command-line switches for starting the administration server (ras) on Windows and Linux are identical.