SearchBlox

SearchBlox Developer Documentation

Welcome to the SearchBlox developer documentation. Here you will find comprehensive technical documentation to help you start working with SearchBlox as quickly as possible, as well as support if you get stuck. Let's jump right in!

Guides

Installing on Amazon Linux 2

Prerequisites

Recommended EC2 instance type is i3.xlarge.

  1. Install OpenJDK 11 by running the following command:
    amazon-linux-extras install -y java-openjdk11

  2. Install wget by running the following command:
    yum install wget

  3. Verify the installation by running the following command:
    java -version

  4. Increase the map count with the following command
    sysctl -w vm.max_map_count=262144
    set this permanently in /etc/sysctl.conf by adding the following line:
    vm.max_map_count=262144

  5. Increase ulimit value and test system settings

    To change the file descriptor setting, edit the file /etc/sysctl.conf.
    Add line fs.file-max=100000 to it.

    To apply the changes :
    sysctl -p

    To change the ulimit setting, edit the file /etc/security/limits.conf and set the hard and soft limits:
    * soft nofile 100000
    * hard nofile 100000

    After this value is changed please reboot the server.
    reboot

    Test the settings using the following command:
    ulimit -a

    To check the current open file descriptor limit:
    more /proc/sys/fs/file-max
    OR sysctl -a | grep fs.file-max

    To find out how many file descriptors are currently being used:
    more /proc/sys/fs/file-nr

    To find out how many files are currently open:
    lsof | wc -l

Installation

  1. Please login as root using sudo su if you are not the root user.

  2. Create a SearchBlox user
    sudo adduser searchblox
    sudo passwd searchblox

  3. SearchBlox has to be installed in /opt folder, so change directory to /opt
    cd /opt

  4. Download SearchBlox rpm package
    sudo wget https://d2fco3ozzrfhhd.cloudfront.net/v9.2.2/searchblox-9.2.2-0.noarch.rpm

  5. Install the rpm package
    sudo rpm -ivh searchblox-9.2.2-0.noarch.rpm

  6. Change permission for the following folders
    sudo chown -R searchblox:searchblox /opt/searchblox
    sudo chmod -R 755 /opt/searchblox/logs
    sudo chmod -R 755 /opt/searchblox/elasticsearch/logs
    sudo chmod -R 755 /opt/searchblox/bin

  7. To start Elasticsearch and SearchBlox services
    systemctl start sbelastic
    systemctl start searchblox

  8. To stop Elasticsearch and SearchBlox services
    systemctl stop sbelastic
    systemctl stop searchblox

Start Analytics Server

Start the Analytics server to display search query data on the Analytics page within SearchBlox Admin Console. The Analytics Server will use port 4000.

  1. Run the command to go to the analytics folder
    cd /opt/searchblox/analytics

  2. Run the command to start the analytics service in the background
    nohup ./cubejs &

Stop Analytics Server

  1. Find the process ID of Analytics server using the following command:
    ss -nutlp |grep 4000

  2. Run the following command to terminate the process:
    kill -9 <process-id> #please use the process id from the previous step

Running Analytics as Service

  1. Download sbanalytics.service file into /etc/systemd/system
    wget https://d2bs75lu2qxj7h.cloudfront.net/9.2/analytics/sbanalytics.service

  2. Enable sbanalytics.service using the command:
    systemctl daemon-reload

  3. Start Analytics service using the command:
    systemctl start sbanalytics

  4. View the status of the Analytics service using the command:
    systemctl status sbanalytics

  5. To stop the Analytics service run below command:
    systemctl stop sbanalytics

Verify Installation

Once you see the message "The service has started", wait for few seconds then go to http://localhost:8080/searchblox/admin/main.jsp to validate.

  • You can verify if SearchBlox has started successfully by viewing the status.log file in the <SEARCHBLOX_INSTALLATION_PATH>/webapps/searchblox/logs folder.

Please confirm the message "Started Successfully" is shown in the log. In case of any errors, this log will provide additional information for troubleshooting.

🚧

SearchBlox Admin Console Access using IP Address or Domain Name

Change SearchBlox Server Port

SearchBlox Server runs on port 8080 by default.

You can change the port by following the following steps:

  1. Stop SearchBlox

  2. Edit the file /opt/searchblox/start.ini at line number 163 as follows:
    jetty.http.port=8080

  3. Start SearchBlox

If it is not possible to run SearchBlox in a port less than 1024 since SearchBlox runs as a non-root user, you can enable port forwarding if required using :
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080

Uninstall

Run the following command to uninstall or remove SearchBlox:
yum remove searchblox

Updated about a month ago


What's Next

You can go through the related sections below

Faceted Search
Overview
Installation Tuning
SSL Setup
Monitoring
Cluster Setup on AWS

Installing on Amazon Linux 2


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.