Running Multiple Instances of s-Server

<< Click to Display Table of Contents >>

Navigation:  Administering SQLstream Blaze >

Running Multiple Instances of s-Server

Previous pageReturn to chapter overviewNext page

You may install multiple instances of s-Server on a single host machine, in order for multiple developers to have their instances of s-Server on a multi-tenant deployment. You may also install multiple instances for testing, as well as for validation of federated/distributed deployment of SQLstream Blaze suite of products in a multinode cluster.

In order to run multiple instances of s-Server on the same system, you need to change the way you install a second instance of s-Server.

When you run the installer as root or with sudo privileges, the installer does several things that interfere with running a second instance with the same settings:

1.The installer creates a user with the default username of "sqlstream" and installs s-Server and s-Server clienttools as this user.
2.The installer installs s-Server as a linux service, s-serverd. The linux service starts up s-Server as the "sqlstream" user.
3.The installer uses the default installation directory /opt/sqlstream/ and default tracelog directory /var/log/sqlstream.

Only one instance of SQLstream s-Server can be set up to start/stop as a linux service. As a result, if you try to install a second instance with root privileges, the installer will overwrite earlier the installation of the linux service unless the installer is instructed not to install as a service.

So, to install a second instance using a super-user, you need to make changes in the steps below. You can also run this installer form the command line and pass in these properties. See Appendix: Command-line Installation for more details.

The Installation Directories page. Here, you need to change the installation directories. For example, you might change these to the following:

inst_multi_inst_installation_directories

The Server Port Number page. By default, port is set to 5570. You need to change it to something like 5670. Note: Make sure the new port is not in use.

inst_multi_inst_port

The Service/Daemon page. Here, you need to deselect the Create the s-serverd Service option:

inst_multi_inst_noserver

The Server User page. Here, you need to change the name of the user to be created by the installer, to something like sqlstream2:

inst_multi_inst_difft_user

The WebAgent Service/Daemon page appears. Here, you need to deselect the Create the webagentd Service option. In order to run webAgent with a second instance of s-Server, you will need to change its default port. See the topic webAgent in the Integration Guide for more details.

inst_multi_inst_nowebagent

The Create Dashboard Service page. Here, you need to deselect the Create the s-dashboardd Service option. In order to run s-Dashboard with a second instance of s-Server, you will need to change its default port. See the s-Dashboard Guide for more details.

inst_multi_inst_nosdashboardservice

Once you install s-Server, you will need to manually start it.

To do so:

1.Navigate to the second instance's installation directory, such as /opt/sqlstream2/5.1.0.
2.Navigate to s-Server/bin
3.Enter su <the user you created>, such as su sqlstream2
4.Enter ./s-Server

To start this instance in the background, you will need to use a Linux command such as nohup. This command lets the instance continue to run in the background after the terminal is closed. See http://en.wikipedia.org/wiki/Nohup for more details.

Installing a Second Instance as a User Without Root Privileges

Installing as a user without root privileges avoids these problems. First, when the installer is run without superuser privileges, it cannot be installed as a linux service. When you install as a regular user, the default location for trace logs is set relative to "installation directory" rather than /var/log/sqlstream.

Having said all that, the problem with installing as a regular user is that you will need to create that user on your system first. Since installing with root privileges creates a new user, it may be advantageous to take the steps described above.

When you install an instance as a regular user, you will need to start it in the foreground through a terminal. To start this instance in the background, you will need to use a Linux command such as nohup. This command lets the instance continue to run in the background after the terminal is closed. See http://en.wikipedia.org/wiki/Nohup for more details.

Parameters for Separate Instance

For all instances, you need to make sure the following definitions are unique:

First, each instance needs to have a unique installation directory.
Second, each new instance needs a unique port number. From the command line, you can change this number by changing the property "--serverPort <portnumber>".  The s-Server, when started, uses that portNumber to accept JDBC connections.
Third, each instance needs to have a unique trace log directory.

See the topic Configuring SQLstream in the SQLstream Adminstrator Guide for more information.