GSQL shell command and GSQL process

Here are 2 issues I met:

  1. When trying to check some data through command, it is weird that somehow I couldn’t count the number of vertices. It’s always complaining an error, while I could see the attribute of the vertex and I could see the Graph statistics from Graph Studio UI. Please see below. I was wondering why and where I could find the GSQL logs.

GSQL > select count() from Gnode
Encountered " "
" "* “” at line 1, column 14.
Was expecting:
“)” …

GSQL > select Vm from Gnode limit 1
[{
“v_id”: “28”,
“attributes”: {“Vm”: 0},
“v_type”: “Gnode”
}]

  1. Another thing is that when trying to see the processes status with command “gadmin status”, GSQL is always showing as down. The snapshot would be in my comment.

Any insight would be really appreciated.
Thank you very much!

Here is the snapshot for the 2nd issue.

I’ve tried to run “gadmin restart -y” multiple time, GSQL process is always showing as DOWN.

@tigergraph_for_fun regarding your first issue - count() is deprecated in version 3.0
you can use count(*) or approx_count(*)
https://docs.tigergraph.com/faqs/change-log-1/v3.0-removal-of-previously-deprecated-features#built-in-queries

1 Like

In some rare cases, the process ID of GSQL server becomes invalid and gadmin cannot see the status (but it’s still working and ou can fire up the queries).

you can stop the gsql server with (gadmin gsql stop), find the process ID of GSQL server (ps fax | grep gsql_server) and kill it (tg_killtree -9)

then start gsql server again (gadmin start gsql)

Which version of TigerGraph are you using?
In 3.0.0 it works as expected:

GSQL > select count(*) from v
[{
  "count": 16,
  "v_type": "v"
}]

Thank you @Bruno and @SzilardTG for your reply.
I tried to run “select count(*) from v” on 2.5, and it’s working ok.
I tried to force kill gsql_server process, and started with “gadmin start gsql”, but GSQL is still showing as DOWN and I even couldn’t find gsql_server with “ps -ef|grep -i gsql_server”. However, it’s still working and queries could be fired up.

Just checked the version and found that it was GSQL 2.3.
Maybe it is too old. Anyway, I’ll update it to a newer version.

Have a great day!

Thank you.