Unable to start GPtext with a host down in Greenplum
search cancel

Unable to start GPtext with a host down in Greenplum

book

Article ID: 296969

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

There is a host on the cluster down or offline and you want to start GPtext.

gptext-start tries to start all of the Solr instances on all of the hosts, but when it is unable to start one, it fails with the following error message:
20200603:10:23:24:178825 gptext-start:mdw1:gpadmin-[ERROR]:-Error start GPText: No JSON object could be decoded
20200603:10:23:24:178825 gptext-start:mdw1:gpadmin-[WARNING]:-Please run 'gptext-state' to check whether all instances are working.


Environment

Product Version: Other

Resolution

To start the gptext, you need to manually start each Solr instance of the other hosts separately.

To do this you can use the following command:
SOLR_INCLUDE=$data_dir/solr.in.sh $GPTXTHOME/../greenplum-solr/bin/solr start
e.g.
SOLR_INCLUDE=/data/gptext/primary2/solr0/solr.in.sh /opt/greenplum-text-3.1.0/../greenplum-solr/bin/solr start

Once all instances on good hosts are started, then check the gptext state to make sure it is green:
gptext-state -D


You can use the following script that will generate all of the commands needed.

Note: Change the GPTXTHOME and downHost with the correct parameters.

$ cat test.sh
GPTXTHOME="/opt/greenplum-text-3.1.0"
downHost="gp-sdw-02"

for line in `cat $MASTER_DATA_DIRECTORY/gptext.conf | grep -v $downHost | grep -v "^id"`
do
    host=`echo $line | awk -F',' '{print $2}'`
    dataFolder=`echo $line | awk -F',' '{print $4}'`
    echo "ssh $host \"SOLR_INCLUDE=$dataFolder/solr.in.sh $GPTXTHOME/../greenplum-solr/bin/solr start\""
done