UnicodeDecodeError while trying to restart server after enabling authentication

Recently we attempted to enable REST++ authentication. We created the Secret by issuing the following command:
$ gsql -u -g
GSQL > CREATE SECRET

We then worked on enabling REST++ authentication by issuing the following commands:
gadmin –configure RESTPP.Authentication
gadmin config-apply
gadmin restart restpp nginx vis –y

The restart command failed. Here is a capture from the terminal. Can someone help us to understand what went wrong and how to fix it?

gadmin --configure RESTPP.Authentication
gadmin config-apply

tigergraph@l:/tg
$ gadmin restart restpp nginx vis –y
Restart the service may take a while.
Do you want to continue(y/N):y
[RUN ] rm -rf /tg/tigergraph/logs/RESTPP*.pid
[RUN ] rm -rf /tg/tigergraph/logs/NGINX*.pid
[RUN ] rm -rf /tg/tigergraph/logs/VIS*.pid
Traceback (most recent call last):
File “/home/tigergraph/.gium/gsql_admin”, line 4281, in main
rc = cmd_func(args)
File “/home/tigergraph/.gium/gsql_admin”, line 2336, in cmd_restart
cmd_clean_pidfiles(comp)
File “/home/tigergraph/.gium/gsql_admin”, line 2906, in cmd_clean_pidfiles
run_localcmd(ssh_str, GSQLGlobal.DRY_RUN, GSQLGlobal.VERBOSE)
File “/tg/tigergraph/.gium/GSQL_LIB/Utils.py”, line 527, in run_localcmd
prompt_out2("[RUN ]", cmd)
File “/tg/tigergraph/.gium/GSQL_LIB/Utils.py”, line 48, in prompt_out2
print (colors.FG_BLUE + prmt +colors.ALL_OFF + " " + message)
File “/home/tigergraph/.venv/lib/python2.7/codecs.py”, line 369, in write
data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe2 in position 46: ordinal not in range(128)

ERROR:root:GA error: ‘ascii’ codec can’t decode byte 0xe2 in position 46: ordinal not in range(128)
tigergraph@apvrd28660:/tg

I had a look at it, and assume that the string to be printed on screen was not “encoded” as 7 bit US ASCII (as strongly suggested by range(128) ). But I can’t know what would have been printed after [RUN ] rm -rf /tg/tigergraph/logs/VIS*.pid ).
x0E2 can be a lot of different characters (e.g. â in ISO-8859-1/Windows-1252)).

1 Like

I tried restarting again and it worked successfully. I don’t know why it worked today and not yesterday.

I learned a long time ago that computers are far from being deterministic machines. Constellation of planets, external temperature or even the number of pigeons on the roof can influence their mood.