Running SciDB

You can set up SciDB Enterprise Edition as a Linux service that restarts each time the OS starts, just like other services.   The examples below use version 19.x to generically indicate a version 19 point release; specify the actual version you are using when running the commands.

After configuring SciDB to run as a service, you can enable SciDB's security features.  See Enabling Security Mode.

Requirements

  • When running SciDB as a service, each host requires password-less ssh access to itself.
  • If you plan to run the SciDB service using a non-local Linux account (for example, an account authenticated using PAM and an external service such as LDAP), you will need to ensure that the authentication service starts before the SciDB service.  Instructions on configuring systemd for this situation can be found below.


Important!

Once SciDB is running as a service, you should only use scidbctl.py start-server and scidbctl.py stop-server commands to start and stop the cluster.  If you use ordinary scidbctl.py start and scidbctl.py stop commands, you will break systemd's handle on the running SciDB processes, resulting in an ungraceful shutdown with possible loss of user data.

Installing the SciDB Service and Registering the Cluster

To install SciDB as a service, do the following:

  1. On every server in the cluster:
    • Ubuntu only: You must create the following symbolic link:

      $ sudo ln -s /usr/lib/insserv/insserv /sbin/insserv
  2. On every server in cluster,  after installing the Enterprise Edition, run the following command:

    $ sudo /opt/scidb/19.x/bin/scidbctl.py --config <config.ini> enable-service --user <scidb_user>


    where scidb_user is the scidb user account, typically scidb.  Running enable-service will create the file /etc/sudoers.d/scidb to allow the scidb user to run "service scidb start/stop" or "systemctl start/stop scidb".

  3. Register the cluster by running the following command  as the scidb user:

    $ /opt/scidb/19.x/bin/scidbctl.py --config <config.ini> register-service <cluster_name>

    where

    • cluster_name is the name of your SciDB cluster
    • config_file is the complete path to your config.ini file.
       
  4. Start SciDB by running the following command  as the scidb user:

    $ /opt/scidb/19.x/bin/scidbctl.py --config <config.ini> start-server <cluster_name>


Notes:

  • For multiple clusters running on the same ports, make sure you only register one cluster at a time. That is, when changing from cluster_1 to cluster_2, unregister cluster1. Otherwise conflicts occur when the clusters reboot. If your clusters all use different ports, register all of them.

  • To see help for the p4_system service_add script, run with the -h option:e

    $ sudo /opt/scidb/19.x/bin/scidbctl.py enable-service -h

Starting the SciDB Cluster

Start the SciDB cluster by running:

$ scidbctl.py --config <config.ini> start-server <cluster_name>

To run SciDB in namespace mode, see Enabling Security Mode.

Stopping the SciDB Cluster 

Stop the SciDB cluster by running:

$ scidbctl.py --config <config.ini> stop-server <cluster_name>

Non-local scidb User

If you plan to run the SciDB service using a non-local Linux account (for example, an account authenticated using PAM and an external service such as LDAP), you will need to ensure that the authentication service starts before the SciDB service.  To do this, edit the /usr/lib/systemd/system/scidb.service file and add the following lines:

Wants=nss-user-lookup.target
After=nss-user-lookup.target

See Red Hat sytemd ticket 1445093 for more information.

Unregistering the SciDB Cluster

Should you no longer wish to run SciDB as a service, you must unregister the cluster.

Unregister the cluster by running:

$ scidbctl.py --config <config.ini> unregister-service <cluster_name>

where you:

replace <cluster_name> with the section name found in the config.ini that is enclosed in square brackets.

replace <config_file> with the path to the config.ini file.