Product start/stop

Start & stop services


Starting Qbo requires two steps.

Check shell environment configuration

First, invoke the environment_setter script to configure the environment of the current shell:

Note: Assuming Qbo is installed at location /opt/unscrambl/chai/rhel07.

$ /opt/unscrambl/chai/rhel07/chai/bin/environment_setter

The environment_setter script loads the user’s .bashrc file (if it exists) and checks that the execution environment meets the needs of Qbo. It 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.

If it finds an inconsistency due to a modification of the user’s PATH environment variable in .bashrc, it will display an error message. To fix this:

  • If it is an irrelevant or unintended misconfiguration, remove the problem setting from your .bashrc file.

  • If the original behavior needs to be preserved, make 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 in the new instance of the Bash shell that the environment_setter starts.

This allows the shell to use a different PATH variable when Qbo is running, and your usual configuration when it isn’t.

Start Qbo services

To start Qbo services:

$ $UNSCRAMBL_HOME/bin/services_manager start

Issues while starting the service:

1. If IPv6 is disabled:

Error:

Caused by: java.net.SocketException: Protocol family unavailable
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at org.apache.thrift.transport.TSocket.open(TSocket.java:221)

Solution:

To verify the IPv6 on the machine -

If IPv6 is in an enabled state, the output would be “0”

# cat /sys/module/ipv6/parameters/disable
0

If IPv6 is in a disabled state, the output would be “1”

# cat /sys/module/ipv6/parameters/disable
1

If IPv6 is disabled then go-to chai/etc/runtime_environment.json file, change ipV6Available to false and usingIpV4 to true, after changing it should look like as below.

"network": {

    "interface": "eth0",
    "ipV6Available": false,
    "usingIpV4": true
}

2. Missing locale in the machine:

Error:

$UNSCRAMBL_HOME/bin/services_manager start
ERROR: the execution failed, details:
com.unscrambl.foundation.commons.Main$UnsupportedLocaleException: the 'null' locale does not match the supported locale 'en_US.UTF-8'

Solution:

If command locale | grep LC_ALL is showing blank LC_ALL then add the below entry in ~/.bashrc file of the same user from which you are starting the services.

export LC_ALL=en_US.UTF-8

Save the file and source the .bashrc (source ~/.bashrc) file again to make the effect of the change.

Check that Qbo services are running

Open a browser on any computer with access to the Qbo server and navigate to the URL you configured for its web user interface. For example, https://unscrambl.example.com/chai.

Check access using one of the messaging-based channels you enabled (see Configuration of other Channels).

Alternatively, check the status of the Qbo services (services running or not) on the command line:

$ $UNSCRAMBL_HOME/bin/services_manager check

The output looks like this:

services_manager check
performing the 'check' operation on the 'Unscrambl chAI Name Service group' service group
performing the 'check' operation on the 'Name Service' service
- Name Service: the service was healthy at 2021-08-26T11:47:12.921Z[Etc/UTC] (started at 2021-08-18T00:55:50.035Z[Etc/UTC])
performed the 'check' operation on the 'Name Service' service in 0.04s
performed the 'check' operation on the 'Unscrambl chAI Name Service group' service group in 0.04s
performing the 'check' operation on the 'QueryBots' service group
performing the 'check' operation on the 'qbo' service
- qbo: the service was healthy at 2021-08-26T11:47:12.941Z[Etc/UTC] (started at 2021-08-18T00:55:50.142Z[Etc/UTC])
performed the 'check' operation on the 'qbo' service in 0.02s
performed the 'check' operation on the 'QueryBots' service group in 0.02s
performing the 'check' operation on the 'Unscrambl chAI REST services' service group
performing the 'check' operation on the 'Elasticsearch' service
- Elasticsearch: the service was healthy at 2021-08-26T11:47:13.469Z[Etc/UTC] (started at 2021-08-18T00:56:03.302Z[Etc/UTC])
performed the 'check' operation on the 'Elasticsearch' service in 0.53s
performing the 'check' operation on the 'Analytics management' service
- Analytics management: the service was healthy at 2021-08-26T11:47:13.493Z[Etc/UTC] (started at 2021-08-18T00:56:04.900Z[Etc/UTC])
performed the 'check' operation on the 'Analytics management' service in 0.02s
performing the 'check' operation on the 'DataFetcher' service
- DataFetcher: the service was healthy at 2021-08-26T11:47:13.513Z[Etc/UTC] (started at 2021-08-18T00:56:06.886Z[Etc/UTC])
performed the 'check' operation on the 'DataFetcher' service in 0.02s
performed the 'check' operation on the 'Unscrambl chAI REST services' service group in 0.57s
performing the 'check' operation on the 'Unscrambl chAI Free-form service group' service group
performing the 'check' operation on the 'Free-form load balancer' service
- Free-form load balancer: the service was healthy at 2021-08-26T11:47:13.534Z[Etc/UTC] (started at 2021-08-18T00:56:09.310Z[Etc/UTC])
performed the 'check' operation on the 'Free-form load balancer' service in 0.02s
performing the 'check' operation on the 'Free-form service' service
- Free-form service: the service was healthy at 2021-08-26T11:47:13.550Z[Etc/UTC] (started at 2021-08-18T00:56:11.689Z[Etc/UTC])
performed the 'check' operation on the 'Free-form service' service in 0.02s
performed the 'check' operation on the 'Unscrambl chAI Free-form service group' service group in 0.04s
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 2021-08-26T11:47:13.567Z[Etc/UTC] (started at 2021-08-18T00:56:14.160Z[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

Stop Qbo services

To stop the Qbo services:

$ $UNSCRAMBL_HOME/bin/services_manager stop

To find the URL at which the Qbo is running:

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 located in ``chai.json``.
For 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*

One log file is generated per date. The logs will provide details of any errors encountered in Qbo components.

Common errors


Common errors encountered with Qbo include:

  • License expired.

  • Dev environment should be active.