Welcome to Vestris Inc.
Internet Interactive Solutions Company



Software Documentation

Running Alkaline as a Windows NT/2000 Service

You may want to run Alkaline as a Windows NT service. This allows automatic Alkaline startup regardless whether a user interactively logs in or not, as well as a transparent control over the Alkaline's server start and termination. It also allows to run Alkaline under an account that has full rights to the relevant directories without having to grant any interactive user these rights.

Installation

Alkaline for Windows NT has service functions built in. The syntax is asearch service [command] [[port] ...] .

Note

Before attempting to install Alkaline as a Windows NT service, make sure that you are able to run it from command line, search and index in background.

  • To install Alkaline as a Windows NT service, run asearch service install ... . For example
    asearch service install 9999 as --no404
    This will create a service named AlkalineSE and set it's startup to Automatic , so that the service is started whenever the computer reboots. Alkaline will run from the directory you have installed it from.

  • To remove the Alkaline Windows NT service, run asearch service remove .

  • To start the Alkaline Windows NT service from command line, run asearch service start .

  • To stop the Alkaline Windows NT service from command line, run asearch service stop .

Note

Alkaline needs to load its indexes at startup, so it might take some time to start. You can check the asearch.exe process with the Task Manager.

Options

When performing service operations, such as install, remove, stop and start, you can specify various options:

  • --servicename=string : service name, default is AlkalineSE; this allows to install more than one service on the same server

  • --servicedisplayname=string : service display name, default is Alkaline Search Engine ; to specify strings with spaces, quote the entire option, for example "--servicedisplayname=Alkaline Search for Foo.com"

  • --serviceusername=domain\username : username to run the service with, default is localsystem; note that the account you are using must have Logon as a Service rights

  • --servicepassword=password : password to run the service with, default is none (localsystem password is controlled by the system)

  • --servicedescription=description : description for this service instance

To change existing options without removing and reinstalling the service, run regedt32.exe or regedit.exe and open the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AlkalineSE registry key.

  • During installation, Alkaline creates an ImagePath value which should never be changed. It's value is asearch service dispatch and tells Alkaline to run as a Windows NT service process.

  • The Parameters\StartDirectory key defines the initial directory to run Alkaline from. When the service is started, Alkaline will change the current directory to the one defined by this parameter.

  • The Parameters\StartArguments key defines the port value and the aliases to load when the search engine is started. This is typically something like 9999 alias1 alias2 .

  • The Parameters\StartOptions key defines all additional options to run Alkaline with. The values have the dashes stripped. This value might be empty.

The easiest way to change the Alkaline's startup parameters is to re-run it with the service install options. The service creation will fail with an error message, but the options will be updated.

Troubleshooting

CreateService failed. Overlapped I/O operation is in progress.

This error appears when attempting to install Alkaline. The service is already installed or has been removed and a Services Control Panel is still opened, which will mark the service for deletion but will remain pending till all instances of the service manager are closed. Close the registry editor and all Services Control Panels if any opened and retry.

Attempting to start AlkalineSE with no further error message.

This appears when attempting to start Alkaline as it is already running or when the service does not exist, no action has been performed.

ControlService failed. The service has not been started. The specified service does not exist as an installed service.

This error message appears when stopping the Alkaline service without starting it or when attempting to remove a service that does not exist.

Unable to start service, the parameter is incorrect.

One of the current directory, parameters or options contains an invalid value. Make sure that you have specified the correct parameters and that you can start Alkaline from the command line. Reinstall the service.