Updated on 2023-11-30 GMT+08:00

Failed to Start Hive

The most common cause of the Hive startup failure is that the MetaStore instance cannot connect to DBService. The error information is printed in the MetaStore log.

Possible Causes

  1. DBService does not properly initialize the Hive metabase hivemeta.
  2. The floating IP address of DBService is incorrect. As a result, the IP address of the MetaStore node fails to connect to or build mutual trust with the floating IP address, causing the MetaStore startup failure.

Procedure 1

  1. Run the following commands:

    source /opt/Bigdata/MRS_XXX/install/dbservice/.dbservice_profile

    gsql -h DBService floating IP address -p 20051 -d hivemeta -U hive -W Hive user password

  2. If the interaction interface cannot be properly displayed, database initialization fails. If the following error information is displayed, the hivemeta configuration may be lost in the configuration file of the node where DBService is located.

    org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "192.168.0.146", database "HIVEMETA"

  3. Edit /srv/BigData/dbdata_service/data/pg_hba.conf by adding host hivemeta hive 0.0.0.0/0 sha256 to the file.
  4. Run the source /opt/Bigdata/MRS_XXX/install/dbservice/.dbservice_profile command to configure environment variables.
  5. Run gs_ctl -D $GAUSSDATA reload # to make new configurations take effect.

Procedure 2

The floating IP address of DBService must be an IP address that is not used in the same network segment and cannot be pinged before configuration. Change the floating IP address of DBService.