Product start/stop

Starting & Stopping services


Starting qbo insights requires two steps.

First, you must ensure that the environment of the current shell is properly configured. This is accomplished by invoking the script that performs this task:

$ $UNSCRAMBL_HOME/bin/environment_setter

Note

  • Modifying the PATH environment variable in user’s .bashrc file

  • The environment_setter script loads the user’s .bashrc file (if it exists) and, subsequently, validates that the execution environment is not modified inadvertently with respect to the needs of qbo insights.

  • Specifically, the environment_setter validates that the executables for the Java Virtual Machine (java), the Node.js interpreter (node), and the Python interpreter (python) are consistent with the ones needed by qbo insights.

  • In case an inconsistency is flagged due to a modification of the user’s PATH environment variable in .bashrc, an error message will be emitted and two corrective alternatives are possible.

  • If it happens to be an irrelevant/unintended misconfiguration, you can simply eliminate it from your .bashrc file.

  • If the original behavior needs to be preserved, this can be accomplished by conditionally making the following modification to the PATH environment variable:

  • environment variable modification
        if [[ -z ${UNSCRAMBL_PRODUCT:-} ]]; then
            export PATH=<path_to_custom_node_js>:<path_to_custom_jdk>:$PATH
        fi
    
  • UNSCRAMBL_PRODUCT is an environment variable defined by qbo insights in the new instance of the Bash shell the environment_setter starts.

  • By checking for this environment variable and conditionally updating the PATH variable only when it is not defined, the conflicting settings will not affect qbo insights’s runtime environment. Yet, when a regular shell is instantiated, those PATH settings will still remain active.

You can start the qbo insight services via:

$ $UNSCRAMBL_HOME/bin/services_manager start

At this point, it is possible to open a browser on any computer with access to the server where qbo insights is installed and access its web user interface by pointing the browser to the appropriate URL: https://unscrambl.acme.com/chai. If the web interface is not enabled, then one of the messaging-based channels can be used to access qbo, depending on the channels that were enabled (see Configuration of other Channels).

You can check the status of the qbo insights services (services running or not) via:

$ $UNSCRAMBL_HOME/bin/services_manager check

The output would look as:

services_manager check
performing the 'check' operation on the 'QueryBots' service group
performing the 'check' operation on the 'AbcQueryBot' service
- AbcQueryBot: the service was healthy at 2019-11-12T04:42:46.250Z[Etc/UTC]
performed the 'check' operation on the 'AbcQueryBot' service in 0.02s
performed the 'check' operation on the 'QueryBots' service group in 0.02s
performing the 'check' operation on the 'Unscrambl chAI NLP services' service group
performing the 'check' operation on the 'Rasa NLU server' service
- Rasa NLU server: the service was healthy at 2019-11-12T04:42:46.714Z[Etc/UTC]
performed the 'check' operation on the 'Rasa NLU server' service in 0.46s
performed the 'check' operation on the 'Unscrambl chAI NLP services' service group in 0.46s
performing the 'check' operation on the 'Unscrambl chAI core services' service group
performing the 'check' operation on the 'Unscrambl chAI bot server' service
- Unscrambl chAI bot server: the service was healthy at 2019-11-12T04:42:46.737Z[Etc/UTC]
performed the 'check' operation on the 'Unscrambl chAI bot server' service in 0.02s
performed the 'check' operation on the 'Unscrambl chAI core services' service group in 0.02s

Finally, you can stop the qbo insights services via:

$ $UNSCRAMBL_HOME/bin/services_manager stop

To find the URL at which the qbo insights is running at:

If you have configured https, the URL is likely to be: https://<domain name used in https>/chai
If you have not configured http, the URL is likely to be: http://hostname:port/chai
where port can be found from chai.json
Example: $UNSCRAMBL_HOME/etc/chai.json

Logs


Logs can be found at:

$UNSCRAMBL_INSTANCE_HOME/service_management/core_services/bot_service/logs/chai-(Date).log*

There is one log file generated on each date. The logs will give details of errors encountered in different components of qbo insights.

Common errors


Let’s see some common errors that you may get with qbo insights:

  • License expired.

  • Dev environment should be active.

Attention

Contact Unscrambl to get a new license. Once you receive license run command:

license_updater -f /tmp/user_based_license.json