ecosmak.ru

How to remove the server 1s enterprise. Set local security policies

Here is a shortcut with which you can install the 1C server agent as a Windows service. The service is installed using the " -instsrvc". Please note that you have the opportunity to change the directory in which the 1C server parameters and its logs are located. This is done through the " -d" . In this example, a directory is specified: E:\Servers1C\WorkServer81. It is highly recommended to enclose the directory path in quotation marks, especially if the path contains spaces or Latin characters.


It should be noted that even compliance with these simple requirements for the rules for writing a directory does not guarantee the launch of the 1C server agent. There are times when the 1C server agent service does not start. In this case, I recommend that the path to the directory be composed exclusively of Latin characters and each directory is not longer than 8 characters.

Here's what it looks like server agent service 1C:



On the Services tab Login"do not forget to specify the required login under which the server agent service 1C.



The directory itself, in which the 1C server parameters and 1C server logs will be written, must be granted rights to the user under which it is launched server agent 1C. (Click " Add" in the "Properties" window of the server directory).



Add the required user and check the box next to the rights " Change" in a collumn " allow".



Let's say we need a second 1C server, but version 8.2. It should be noted that 1C server 8.1 and 8.2 by default use the same ports for their work.

To register a second 1C server agent, for example, for developers, you need to set an unoccupied port for the server agent through the " -port" and an idle port for the cluster associated with it via the parameter " -regport" . To provide developers with debugging information from the server, you must specify the " -debug" in the service launch line. For developers, it is imperative to use a separate 1C server, so through the " -d"We specify the directory with our 1C server settings for developers. ( The range of working ports remains the same for both servers - these ports are occupied dynamically. For reference, 1C workflow requires 2 ports, therefore, by default, in the port range from 1560 to 1591, a maximum of 16 workflows can be used. )



Here's what it looks like agent service test server 1C(server 1C for developers):



On the test service tab " Login"also do not forget to specify the necessary login under which it will run agent service test server 1C(for developers).


It is assumed that we have already copied through export, following the instructions, one of the 1C server agents as a Windows service. In the future, changes to the service parameters are made through Windows registry. Windows services are located in the registry path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\1C:Enterprise 8.1 Server Agent

We write a beautiful description in the parameter Description:



AND beautiful name for service in parameter display name:



In string parameter ImagePath set the required values ​​of the service parameters:



In parameter start set the value 4 , which puts the service in a disabled state.



When copying a service in Windows 2008, this instruction was enough.



But if you use Windows 2003 on your server, then you need to copy 1C server devices:


Copying a 1C server device in Windows 2003

Opening the registry path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\1C:Enterprise 8.1 Server Agent\Enum...



And look at the string parameter 0 . Its value looks something like this:



The given path in the string points to this branch:



This branch also needs to be copied. To do this, first we export it:



The resulting reg-file (registry file) open with notepad ...



And add the necessary identifier in the key lines, in this case - debug.



To add a new device (prescribe it to the Windows registry), we need to grant access rights to the registry branch HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\1C:Enterprise 8.1 Server Agent\Enum\Root. From the right-click menu, select " Permissions...":



Specify the user under which we work:



We give him the necessary rights (Full rights):



Now boldly run the previously edited reg-file. In the request window, agree and click the " Yes":



After making changes, we can remove the rights.



Rebooting the server...



Don't forget to check the permissions of the new service we created:



This article will talk about the server agent 1C: Enterprise 8.3 (valid for version 8.2 ) if the agent is used in operating systems of the Windows family. The agent launch parameters will be given, as well as a description of the actions performed when it starts.

1. 1C:Enterprise server agent startup file

In order to launch a 1C:Enterprise server cluster, you need to run the server agent, or rather the program agent.exe, which is located in the directory bin 1C:Enterprise installation directory. The default is:

  • C:\Program Files (x86)\1cv8\<Version Number>\bin — for the 32-bit version of the 1C:Enterprise server version 8.3
  • C:\Program Files\1cv8\<Version Number>\bin — for the 64-bit version of the 1C:Enterprise server version 8.3
  • C:\Program Files (x86)\1cv82\<Version Number>\bin — for the 32-bit version of the 1C:Enterprise server version 8.2
  • C:\Program Files\1cv82\<Version Number>\bin — for the 64-bit version of the 1C:Enterprise server version 8.2

2. Launch parameters of the 1C:Enterprise server agent

When starting the server agent agent.exe it is possible to use the following options:

Launch parameters of the 1C:Enterprise server agent
Parameter Description
-port<порт> The network port number of the server agent (ragent). This port is used by the cluster console to contact the central server. The cluster agent port is also specified as the working server network port. The default value is: 1540 .
-regport<порт> Network port number of the master cluster manager (rmngr) created by default when ragent is first started. Default value: 1541 .
-range<диапазоны> Network port ranges for dynamic selection. Service ports of cluster processes are selected from them if it is impossible to select them from the settings of the corresponding working server. Default value: 1560:1591 .
-debug Starting a server cluster in configuration debug mode.
-d<каталог> The directory where the service files of the server cluster will be located (or are located) (including the list of clusters and the list of cluster infobases). If the directory path contains spaces, the path must be enclosed in quotation marks, but in this case, the directory name must not end with a "\" character. The default value is: %LOCALAPPDATA%\1C\1Cv8(%USERPROFILE%\Local Settings\Application Data\1C\1Cv8 for Windows XP and Windows Server 2003).
-seclev<уровень> The security level of the cluster agent process. Specifies the security level of connections established with the ragent process. Level can take values:
  • 0 – connections are not secure;
  • 1 – secure connections only for the duration of user authentication;
  • 2 - always secure connections.

Default value: 0.

-instsrvc Registering the cluster agent as a Windows service. If ragent is started with this switch, it registers itself in the list of Windows services and exits. The -instsrvc switch is incompatible with the -rmsrvc switch.
-rmsrvc Unregister the cluster agent as a Windows service. If ragent is started with this switch, it unregisters itself from the list of Windows services and exits. The -rmsrvc switch is incompatible with the -instsrvc switch.
-usr<имя>
-pwd<пароль>
Name and password Windows user, which should run ragent as a Windows service. Can only be used in conjunction with the -instsrvc switch when registering ragent as a Windows service.
-srvc Run the ragent process as a Windows service and transfer control to the service manager.
-start Start ragent registered as a windows service. Starts ragent, previously registered as a Windows service, and then exits.
-stop Stop ragent registered and running as a windows service. Stops ragent, previously registered and running as a Windows service, and then exits.
-agent Use as 1C:Enterprise Server Agent

The parameter name and value must be separated by a space character.

3. Launching the 1C:Enterprise server agent

On startup, the Server Agent searches for a list of registered this computer servers using the parameters passed to it at startup. If the list of clusters is found, the agent receives from them information about the worker processes that should be launched in each of the clusters and starts them.

If the list of clusters is not found, the agent creates a default cluster. The default cluster has the following characteristics:

  • Network port number - 1541;
  • Network port range - 1560:1591;
  • Support for many workflows is disabled;
  • One worker process, the port number is set from the specified range.

The Server Agent can be run as either a service or an application.

4. Launching the 1C:Enterprise server agent as an application

To run the server agent as an application, run the command agent.exe

Ragent.exe -debug -port<порт>-regport<порт>-range<диапазоны>-seclev<уровень>-d<каталог>

Stopping the server agent running as an application is done by pressing the Ctrl + C keys.

5. Launching the 1C:Enterprise server agent as a service

If during installation the option of launching the agent as a service was selected, then this service will be registered and started automatically, and will also be started at startup operating system.

If the Server Agent was installed as an application (and also if the service was uninstalled), it is possible to manually register the service and then start it. To register a service, run the command agent.exe with the following possible options (if any option is not specified, the default value will be used):

Ragent.exe -instsrvc -usr<имя>-pwd<пароль>-debug -port<порт>-regport<порт>-range<диапазоны>-seclev<уровень>-d<каталог>

When registered, the server agent creates a service named:

  • 1C:Enterprise 8.3 Server Agent - for the 32-bit version of the 1C:Enterprise server version 8.3
  • 1C:Enterprise 8.3 Server Agent (x86-64) - for the 64-bit version of the 1C:Enterprise server version 8.3
  • 1C:Enterprise 8.2 Server Agent - for the 32-bit version of the 1C:Enterprise server version 8.2
  • 1C:Enterprise 8.2 Server Agent (x86-64) - for the 64-bit version of the 1C:Enterprise server version 8.2

To unregister a service (remove a service), run the following command:

Ragent.exe -rmsrvc

To start the service, run the command:

Ragent.exe -start

To stop the service, the command is:

Ragent.exe -stop

Did this article help you?

I won’t describe anything in detail here, and I don’t do network administration, it’s better for a master of his craft, a system administrator, to do this.

2. Block the start of sessions

We launch the 1C:Enterprise server administration console, open the properties of the infobase and check the box for the property Session start blocking enabled. Please note that as soon as you apply this property, the start of any sessions will be blocked, therefore, in order to perform the next step, the configurator must be launched before applying the property.

3. Making a backup

Here, as your soul tells you. As for me, the easiest and most reliable way to create a backup is to unload the infobase through the configurator.

4. Set local security policies

Open the "Local Security Policy" console (type secpol.msc in the command line). Go to the section Local Policies -> User Rights Assignment and add the domain user to the policies (see Figure 1):
  • Login as a batch job(Log on as batch job) - ensures the functioning of the Task Scheduler without the need for the user to personally log into the computer under his account;
  • Sign in as a service(Log on as service) - allows you to run on behalf of the user any process as a service.
Additionally, if required, the user can be added to policies:
  • Accessing a computer from the network(Access this computer from the network) - the user has the right to connect to the computer from the network;
  • Local logon y (Allow log on locally) - the user has the right to start an interactive session on the computer;
  • Allow login through Remote Desktop Service(Allow log on through Remote Desktop Services) - the user has the right to log on to a remote computer through a connection to Remote Desktop Services.

5. Add a domain user to groups

Open the "Computer Management" console, go to the section Utilities -> Local Users -> Users and look at which groups the local user belongs to, on whose behalf the "Server Agent 1C: Enterprise" service works (usually this is the user USR1CV8) (see Figure 2).
We add the domain user to the same groups.

6. Run the agent on behalf of the domain user

Open the "Services" console, find the "Server Agent 1C: Enterprise" service in the list and open its properties. On the tab Are common stop the service, on the tab Login instead of a local user, specify a domain user (see Figure 3).
Go back to the tab Are common and start the service. If everything is configured correctly, the service starts without problems.

You can say that the 2nd and 3rd points are redundant, but it is better to overdo it than to underdo it. The instruction is valid not only for a domain user, but also for a local one.

Practical tips for setting up and working with a 1C 8 server

  1. 1. How to run more than one 1C service for parallel operation with different versions of the 1c platform 8.0, 8.1, 8.2 8.3, etc.

When installing 1C on the server, we do the following:

When installing the second version for parallel operation, the installation is similar, except for the point:

Remove the flag "Install 1C:Enterprise 8 server as a Windows service (recommended)"

We use: sc create

The line looks like:

sc create"<Агент сервера 1С:Предприятия 8.Х.Х.ХХХХ>"binpath="<место расположения ragent.exe>"-srvc -agent -regport 1641 -port 1640 -range 1660:1591 -d \"<место расположения папки сервера 1С>""

<Агент сервера 1С:Предприятия 8.Х.Х.ХХХХ>- Specify the name of the service. The main thing is that both you and those who have to support the 1C server can easily identify it in the future.

<место расположения ragent.exe>"-srvc -agent -regport 1641 -port 1640 -range 1660:1691 -d \"<место расположения папки сервера 1С>

The service line is all as usual:

<место расположения ragent.exe>

If port 1540 is already occupied (if one server is already installed as a service), then we put the next one or any one you like, for example, instead of:

15 41-port 15 40-range 15 60:15 91

16 41-port 16 40-range 16 60:16 91

Instead of<место расположения папки сервера 1С>specify the line where we plan to place the folder with the server files. I recommend not to store this folder on the C:\ drive. Divide the server disk into 2. Under the system and under the 1C server. Then, if the log files take up all the space on the disk, you can easily log into the server and clean them up. What can not be said if you take up all the space on the system disk with your log files.

And we execute the command:

sc create "1C:Enterprise Server Agent 8.Х.Х.ХХХХ" binpath= "\"C:\Program Files\1cv8\8.Х.Х.ХХХХ\bin\ragent.exe\" -srvc -agent -regport 1741 -port 1740 -range 1760:1591 -d \"E:\1C_Bases\srvinfo_8_X_X_XXXX\""

As a result, we get the service:

If the service does not appear, click the Refresh button.))))

If you change your mind, you can delete the newly created service:

sc delete"<Агент сервера 1С:Предприятия 8.Х.Х.ХХХХ>"

Where<Агент сервера 1С:Предприятия 8.Х.Х.ХХХХ>- service name

Set the switch to "With system account"

Hooray, everything is ready!

  1. 2. How to restart the server?


And in this case, you can clear the cache (this can be useful for all sorts of incomprehensible behavior of 1C)

You can delete these files only when the service is stopped.

If you stopped the service, and the files are not deleted, then you need to go to the Task manager and check it for hung:

If found, execute end task.

  1. 3. How to transfer a database from platform to platform without losing the log?

After you install (see point 1.) a new version of the server, you will have a desire to transfer one or all databases from the current version of the platform (server) to the one you just installed.

This is easy to do: open the properties of the database on the current server

A necessary component of the 1C client-server configuration of older versions: "1C Server Agent Service" is a separate module included in the delivery of the server software of the software package and functioning as a service of the Windows operating system.

The purpose of the service is to manage user and system jobs. The 1C Server Agent service can be a source of unforeseen problems of various kinds. Some of them can be easily dealt with by changing the service settings, for which there is a separate user interface. But what to do if the service does not start at all.

In version 8.2, the occurrence of such a situation is signaled by error 1C, accompanied by the following explanatory text: “ Error when starting the server agent service 1c enterprise 8.2».

Typically, such an error occurs either during the installation of a new instance of 1C on the server, or when trying to simultaneously launch two 1C application servers at once: 8.1 and 8.2 on the same physical server. Let's consider each of the options separately.

Error during installation

The reason for the error in this case is the lack of rights of the user trying to install and run Windows service. Administrator rights are required to perform these actions. That is why the installation new version 1C and the start of the "1C server agent" service must be performed on behalf of a user with administrative rights. If this problem occurs, cancel the installation and run it again as a system administrator.

Simultaneous launch of two configurations

As mentioned above, the problem also arises when 1C users have a desire to install 1C 8.2 and retain access to version 8.1. The cause of the error is an attempt by the same services of both versions to gain simultaneous access to the same port on the computer. To avoid this conflict, you need to re-register one of the services on a different port. This can be done directly at the time of service startup by adding the -port option to the ragent.exe -instsrvc startup command with the corresponding numeric value.
Loading...