"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:
-
User name and password (If the configuration value RESTPP.Factory.EnableAuth is false)
-
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
-
Find the AuthToken in the .tg.cfg file
gadmin config dump | grep -i token
-
Find the TG_TOKEN used in the Executor (EXE)
cat /proc/$(pgrep tg_infr_exed)/environ
-
Find the TG_TOKEN used in RESTPP
cat /proc/$(pgrep tg_dbs_restd)/environ
Recommended solution
If the above token results are different, process as follows.
-
Stop all services
gadmin stop all -y
-
If needed, manually shut down the Executor process on each node
kill $(pgrep tg_infr_exed) # if this doesn't work, use kill -9
-
Start the Executor
gadmin start exe
-
Start other components
gadmin start ctrl gadmin config apply --initial gadmin init kafka -y gadmin start ZK KAFKA IFM ETCD gadmin start
-
Repeat the troubleshooting methods again to confirm TG_TOKEN is consistent