"Unauthorized User authentication failed" with RESTPP authentication enabled.

Possible issues

The error message relates to wrong authentication credentials for the RESTPP API call. In general, the system performs user authentication using two methods:

  1. User name and password (If the configuration value RESTPP.Factory.EnableAuth is false)

  2. Token (If RESTPP.Factory.EnableAuth is true)

In this issue, the RESTPP authentication is enabled.

Suggested troubleshooting methods

Run the following commands to confirm the TG_TOKEN is consistent across system components

  1. Find the AuthToken in the .tg.cfg file

    gadmin config dump | grep -i token
  2. Find the TG_TOKEN used in the Executor (EXE)

    cat /proc/$(pgrep tg_infr_exed)/environ
  3. Find the TG_TOKEN used in RESTPP

    cat /proc/$(pgrep tg_dbs_restd)/environ

If the above token results are different, process as follows.

  1. Stop all services

    gadmin stop all -y
  2. If needed, manually shut down the Executor process on each node

    kill $(pgrep tg_infr_exed) # if this doesn't work, use kill -9
  3. Start the Executor

    gadmin start exe
  4. Start other components

    gadmin start ctrl
    gadmin config apply --initial
    gadmin init kafka -y
    gadmin start ZK KAFKA IFM ETCD
    gadmin start
  5. Repeat the troubleshooting methods again to confirm TG_TOKEN is consistent