How to resolve the error "This connection has already been closed (NOSQL)"


I ran into a logical error “This connection has already been closed (NOSQL).” while running Grid DB Shell commands on Docker.
Following the documentation on the installation of Grid DB on Docker, I ran the command

docker exec -it griddb-server gs_sh

to start my Grid DB server on Docker and attempt to run some GridDB shell command

showcontainer

However, I didn’t get the list of container on the Grid DB database. I expect a response that show a table list of containers (available or not available) on the Grid DB database but got the response “This connection has already been closed (NOSQL).”

I tried other Grid Shell commands and some SQL commands but got the same response.

I have been able to resolve this issue.

I realize that the error occurs due to starting the Grid Shell on root user instead of gsadm on your environment (most likely docker when running docker exec -it griddb-server gs_sh)

If you are using the docker environment, I will recommend you follow the steps below;

  1. docker exec -it griddb-server gs_stat -u admin/admin To start the griddb-server
  2. docker exec -it griddb-server /bin/bash To enter the griddb server environment
  3. su gsadm To change to the user gsadm where we can access the griddb-server
  4. gs_sh To enter the griddb shell and run successfully Grid DB command

While on other environment; You need to ensure you run the following commands before running SQL or TQL commands;

sudo su gsadm
gs_sh