Contents
This topic describes the Windows service entry installed by StreamBase on Windows, and how to activate that service. The topic also discusses how to add your own Windows service entries with alternate service names, which lets you run multiple Windows services on the same machine.
A Windows service is an executable that can be set to run automatically when Windows is booted, and to remain running as a background process.
The StreamBase installer adds entries to the Windows registry, as described in StreamBase Registry Keys on Windows, that set up a Windows service. The installed service is set for Manual startup, which means it does not start by default. This lets the StreamBase service setup remain in place for activation as needed.
The default installed Windows service has the following characteristics:
-
It is set to run sbd –b, which runs StreamBase Server in background mode. See Server Background Mode and Logging for information on the effects of the
–boption. -
No application or containers are specified. Only the base server is started.
-
The service is set to run on the default TCP port, 10000.
When activating and using the default installed StreamBase service, you can either:
-
Start the base service as installed, then connect to it with sbadmin addContainer to add and configure the application to run.
-
Configure a registry setting to specify the exact container and application configuration you want to run as a service.
Configure the default service by editing one or more registry keys described in
StreamBase Registry Keys on Windows.
The simplest and recommended configuration is to edit the sbd. key to
change its value from the default n.mStartup–b to –b –f c:\, specifying the
absolute path to a StreamBase Server configuration file. In the configuration file,
specify the containers and applications to load, the port number, the location of any
resources required, and other details.
absolute\path\to\sbd.sbconf
To activate the default installed StreamBase service so that it starts at Windows boot time:
-
Open the Windows Services control panel, as shown in the example below.
-
Locate the StreamBase
n.mService entry. Notice that there is one such entry for each StreamBase release you have installed on this machine. Be sure to select the entry for the release you want to run. -
To start the service one time for testing, click the Start the service link on the left, or right-click and select Start.
|
-
To start the service every time Windows boots, follow these steps:
-
Double-click the entry. This opens the Properties dialog, like the example below.
-
In the Startup type drop-down list, select Automatic.
-
StreamBase lets you run more than one instance of StreamBase Server on the same Windows machine. Each application file is hosted by its own sbd process. If you want to run more than one application as a Windows service, you can create additional StreamBase services with different service names to host the applications.
Follow these steps:
-
Open a StreamBase Command Prompt.
Notes
-
On 64-bit Windows, to configure the 64-bit StreamBase Server as a service, be sure to open the StreamBase 64-bit Command Prompt.
-
On Windows Vista and Windows 7, you must open the StreamBase Command Prompt with the Run as administrator option. Otherwise, sbd --install-service fails silently. For instructions, see Running As Administrator on Windows Vista and Windows 7.
-
-
Run sbd with its
--install-serviceand--service-nameoptions. For example:sbd --install-service --service-name "sbd-alt,StreamBase Service Alternate"
If successful, StreamBase displays a confirmation message like the following:
sbd-alt installed with display name "StreamBase Service Alternate"Note
The first argument in the
--service-nameoption is used as a prefix in several Windows registry keys. The second argument, the service name, is used (as shown below) in the alphabetical display of Windows services in the control panel. We recommend that you start the display name with StreamBase to make it easier to locate and manage your StreamBase services in the Services control panel. -
Open the Services control panel and look for the display name of the service just added. For example:
-
Start
regeditor another registry editor. Navigate to the location described in StreamBase Registry Keys on Windows and locate the startup entry for the newly added service. For this example, we added a service namedsbd-alt, so we should find a new registry key namedsbd-altStartup:
-
Double-click the newly added startup key, and add
–fplus the full path to the server configuration file that describes the StreamBase application you want to run:
-
Close the registry editor.
-
Back in the Services Control Panel, locate the newly added service. Double-click its name, and set the Startup type to Automatic.
If you intend to use StreamBase authentication with your alternate service name,
create a sub-key with the same name as the alternate service. Use this sub-key as the
place to install the sbWindowsServiceUserName and
sbWindowsServicePassword keys used by the authentication
service. For example, for the service name sbd64-alt,
create a sub-key named sbd64-alt. See Placeholder
Sub-Keys for details.
If you need to remove a StreamBase service, use the --remove-service option on the sbd command line. To identify the service to
remove, use only the first argument you gave with the --install-service option. For example:
sbd --remove-service --service-name sbd-alt
The StreamBase uninstaller does not know about any manual edits you made to the StreamBase registry keys. Consequently, the StreamBase uninstaller does not remove any manually added StreamBase service entries. Under these circumstances, use regedit to search for and remove any obsolete keys.
Notes
-
On 64-bit Windows, to remove the 64-bit StreamBase Server as a service, be sure to run the sbd --remove-service command from the StreamBase 64-bit Command Prompt.
-
On Windows Vista and Windows 7, you must open the StreamBase Command Prompt with the Run as administrator option. Otherwise, sbd --remove-service fails silently. For instructions, see Running As Administrator on Windows Vista and Windows 7.
