Automatic Start-up for vSEC:CMS Services

Anthony - Versasec Support
Anthony - Versasec Support
  • Updated

Introduction

In a production environment it is important that the vSEC:CMS services start-up after a server reboot. This guide will describe how you can configure the vSEC:CMS services to ensure that they start-up after a server reboot.

Depending on your requirements you could have the below services operational in your environment:

  • vSEC:CMS Service
  • vSEC:CMS - Operator Console Service
  • vSEC:CMS - User Self-Service
  • vSEC:CMS - Rest API Service
  • vSEC:CMS - RSDM Service

Where vSEC:CMS Service is the main core service. This services needs to be running before any of the other services can be started.

There are different ways to ensure that the services start-up which we will describe below.

Option 1 - Delayed Start

Note
This is the recommended way to ensure vSEC:CMS services start-up after a server reboot.

The main reason vSEC:CMS services do not start after a server reboot is because other dependencies that are needed to start the vSEC:CMS service are not available immediately after a reboot. This could be encountered if you are using an external SQL server for the vSEC:CMS database, such as MS SQL, and/or a HSM is used. 

On the server where vSEC:CMS is installed open Windows services console. Select the vSEC:CMS Service  and right click and select Properties. In the General tab for the Startup type select Automatic (Delayed Start). Click Apply and Ok to save and close the changes. 

Untitled.png

Repeat the same steps for all other vSEC:CMS services that you use.

Note
Starting Windows services is managed by Windows Service Control Manager (SCM). By default, the timeout value is 30000 milliseconds (30 seconds). This means that for whatever reason the vSEC:CMS services don't start within that 30 second period then the services will fail to start. It can be that in slow environments, where MS SQL and/or HSM is used, the services fail to start. The default timeout for SCM can be modified if this is the case. Open Regedit on the server and go to this location [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control]. Modify or add (DWORD) the registry setting ServicesPipeTimeout and set the value to 120000 decimal. This should give the system enough time to bring up the vSEC:CMS services after a reboot. 

Option 2 - Scripted Task Scheduler

It's imperative that the vSEC:CMS Service parent service be running before attempting to start any of the other services.

  1. Right-click the vSEC:CMS service that fails to boot up and select Properties.
  2. Copy the Service name from the General tab.
  3. Create a new text document and input the following:
@echo off
net start "SERVICE_NAME"
  1. Save the file as a .bat.
  2. Open Task Scheduler with taskschd.msc.
  3. Click 'Create Task...'
  4. Name the task and add a description.
  5. Under Security Options, click 'Change User or Group...'
  6. Confirm the hostname and enter SYSTEM, then click OK.
  7. Select the 'Triggers' tab and add a new trigger with 'New...'.
  8. Choose 'At startup' and delay for 30 seconds, then click OK.
  9. Go to the 'Actions' tab and add a new action with 'New...'.
  10. Browse and select the .bat files for the services. Click OK to finish.
Note
When multiple actions are specified under the 'Actions' tab, they are executed sequentially in the order they are listed.
Important
  • Each batch file must be created for each service because you can't start all services simultaneously.
  • Some environments may require different delay times depending on the system's speed, and this should be taken into consideration.
  • Please keep in mind that each environment is unique, and the settings may be configured according to the organization's preferences.