MENU

Start CAMServer as a Windows Service

TOC

Overview of Windows Services

CAMServer can also be run as a Windows service. There are several advantages to running as a Windows service.

Advantages and Disadvantages

Advantages

  • When connecting to the server via remote desktop and logging off, CAMServer does not stop.
  • In the unlikely event that CAMServer crashes, you can automate the restart by using the "Recovery" feature of Windows services.

demerit

  • CAMServer cannot have a window while the service is running, so some management menus cannot be executed.
    *Functions that are always used can be executed remotely from the client.

Setup Method

Check win_service in the folder structure after installation

As a service registration/deletion/start/stop script,CAMServer/win_service are located.

The role of each script is as follows

  • installSvc.vbs---Registers CAMServer as a Windows service
  • removeSvc.vbs -- Removes CAMServer registered as a service from the service.
  • startSvc.vbs--Starts CAMServer as a service
  • stopSvc.vbs---Stop CAMServer started as a service

Registering for Windows Services

To run CAMServer as a service, you must first register it as a service in Windows only once.

To register it as a Windows service, manually click and launch camserver.exe in the unzipped folder. The main window will be displayed as usual, so go to "Administration Menu" -> "Services" -> "Install Service".

When executed, the service is registered to the service as a service name "CAMServerService".

After registration, to check if the service was registered successfully, open the Windows Services screen in the Control Panel.

control panel
You can also open the "Control Panel" from CAMServer.

Auto Start Windows Services

In the Windows Services screen, select the service name CAMServerService Double-click on the "Startup Type" and select "Automatic" under "Startup Type".

To start a Windows service at the same time as the Windows OS starts, set it to "Automatic Start."

OS user running the Windows service

If no settings are made for the OS user that the Windows service runs as, CAMServer, it will be a Windows local account.

To accommodate redundancyWhen placing the DB file on a network drivePlease change the OS user that the Windows service runs as (either a domain account or a dedicated local account).

For the above account,Set full control access rights to the CAMServer folder and the shared folder.This means that network drive access is possible even when running as a Windows service.

If the host OS on the share side is Windows Server 2019 or later, guest authentication is disabled by default, and you cannot access the network drive even with a UNC path. This is because the local account of the Windows service does not have authentication information, and the connection is blocked due to SMB protocol restrictions.

Automatic recovery in case of error

In the unlikely event that the CAMServer service stops, you can restart it automatically by using the Windows service recovery function.
Select CAMServer in the service settings of the administrative tools, and from the "Recovery" tab in the properties, select "Restart the service" on the first error, etc.

*There have been no confirmed cases of CAMServer crashing, so this setting is not necessary.

*Please refer to the following for the meaning of each setting.

First Error
If the CAMServer service should stop for some reason, you can use the Windows Service Recovery feature to automatically restart it, so select "Restart the service."
The following error
Specify the action to be taken if a forced termination occurs again after the "first error". Since restarting the service after the second time is unlikely to solve the problem, select "Do nothing".
Subsequent errors
Specify the action to be taken if a forced termination occurs again after the "next error". Since restarting the service after the second time is unlikely to solve the problem, select "Do nothing".
Resetting the error count
When a Windows service stops or fails, the number of failures is counted. Based on this count, you can set recovery actions for the "first failure," "second failure," and "any subsequent failures." "Reset the error count" means that this failure count will be reset (returned to 0) after a certain period of time. A setting value of 1 will reset the error count after one day, which is the minimum number of days that can eliminate exceptional cases such as intermittent forced terminations from an operational standpoint.
Restarting Services
The setting value for how many minutes after the first error occurs whether to restart the system.

Starting and Stopping Windows Services

Start as Windows Service

Start the service from the control panel, or execute "Admin Menu" -> "Service" -> "Start Service" in CAMServer.

Starting the service from the control panel

Note that it is not possible to start the service from the control panel while the camserver.exe screen is already running.

CAMServer's "Management Menu" service launched

After starting the service, camserver.exe with manually started windows will automatically stop

Stop Windows Service

Stop the service from the control panel or by manually running camserver.exe to safely stop the service and then start the screen.

Manually during service startup camserver.exe If you run the service, the running service will be stopped, and if you run it manually, the service will be stopped. camserver.exe It will be activated within a few seconds.

Notes on the service version

When migrating from the regular version, make sure that the startup startup of the regular version does not overlap with the "automatic startup" of the Windows service.

If the device is running during startup, the procedure for releasing the device is as shown in the figure on the right.

TOC