Gsql-client.jar from bintray.com keeps retrying all version with GSQL_CLIENT_VERSION=v3_1_0

I am downloading gsql-client.jar from https://dl.bintray.com/tigergraphecosys/tgjars/com/tigergraph/client/gsql_client/3.1.0/gsql_client-3.1.0.jar automatically in my script, which is a lot better than getting it from TG installation.

It’s good this particular version is compatible with all older versions. However, even if I pass java -DGSQL_CLIENT_VERSION=v3_1_0, it still keeps trying all older version if it fails for whatever reason, which makes the output hard to read to find the problem. Is there a way to stop it from trying with older versions?

Below is the log:

+ java -DGSQL_CLIENT_VERSION=v3_1_0 -jar ../gsql_client.jar -u tigergraph -p tigergraph query.gsql
========================
Trying version: v3_1_0
Wrong password!
Supported Versions ( v3_1_0 v3_0_5 v3_0_0 v2_6_2 v2_6_0 v2_5_2 v2_5_0 v2_4_1 v2_4_0 v2_3_2 )
You may use 'GSQL_CLIENT_VERSION=v? java ...' or
'java -DGSQL_CLIENT_VERSION=v? ...' to specify the version
========================
Trying version: v3_0_5
It's most likely your TigerGraph server has been upgraded.
Please follow this document to obtain the corresponding GSQL client to the server:
https://docs.tigergraph.com/dev/using-a-remote-gsql-client
========================
Trying version: v3_0_0
It's most likely your TigerGraph server has been upgraded.
Please follow this document to obtain the corresponding GSQL client to the server:
https://docs.tigergraph.com/dev/using-a-remote-gsql-client
========================
Trying version: v2_6_2
It's most likely your TigerGraph server has been upgraded.
Please follow this document to obtain the corresponding GSQL client to the server:
https://docs.tigergraph.com/dev/using-a-remote-gsql-client

Got error: null
Please send the log file '/home/ywu/.gsql_client_log/log.305379' to TigerGraph.

========================
Trying version: v2_6_0
It's most likely your TigerGraph server has been upgraded.
Please follow this document to obtain the corresponding GSQL client to the server:
https://docs.tigergraph.com/dev/using-a-remote-gsql-client

Got error: null
Please send the log file '/home/ywu/.gsql_client_log/log.305379' to TigerGraph.

The format you used works perfectly for me.
Maybe it’s just “Wrong password”?

1 Like

Yes, GSQL_CLIENT_VERSION=v3_1_0 works if all goes well, no issue there.

For the particular log I posted, yes, the error was caused by I entered the wrong password, but I have to go back 10’s of lines to see the first “wrong password” message. What I am asking is that since I specify the specific version I want to use, why it keeps trying older versions?

1 Like

@jimwu try setting this as an environment value :

user@box$ export GSQL_CLIENT_VERSION=v3_1_0
user@box$ java -jar ../gsql_client.jar -u tigergraph -p password query.gsql

I had a look at the source code of the GSQL client, it seems that in case of wrong password the exception raised by the authentication error is handled, not propagated to the level where the version is tested and thus it is misinterpreted as version mismatch, so an earlier version is tried, but of course, that will indeed be a version mismatch, so an earlier version is tried, and so on.

I will report it as a potential bug.

3 Likes

Just so you know it’s not just wrong password. Looks like any exception is treated as version mismatch. Below is an example of what happens when a graph doesn’t exist.

+ java -DGSQL_CLIENT_VERSION=v3_1_0 -jar ../gsql_client.jar -u tigergraph -p Xilinx123 -g xgraph set query_timeout=240000000 run query 'cosinesim_ss_tg)'
========================
Trying version: v3_1_0
Graph 'xgraph' does not exist.
Supported Versions ( v3_1_0 v3_0_5 v3_0_0 v2_6_2 v2_6_0 v2_5_2 v2_5_0 v2_4_1 v2_4_0 v2_3_2 )
You may use 'GSQL_CLIENT_VERSION=v? java ...' or
    'java -DGSQL_CLIENT_VERSION=v? ...' to specify the version
========================
Trying version: v3_0_5
It's most likely your TigerGraph server has been upgraded.
Please follow this document to obtain the corresponding GSQL client to the server:
https://docs.tigergraph.com/dev/using-a-remote-gsql-client
========================
Trying version: v3_0_0
It's most likely your TigerGraph server has been upgraded.
Please follow this document to obtain the corresponding GSQL client to the server:
https://docs.tigergraph.com/dev/using-a-remote-gsql-client

Thanks for the update. I linked this discussion to the ticket, so dev will see it.