Connection closed by server

:bug: Bug Report

Description

When executing a CREATE command CLI, the server is shut down, is there a reason and any workaround for this? This is specifically happening for ‘execute:’

Steps to reproduce

  1. Step 1. docker load -i ./lib/memgraph-1.6.1-community-docker.tar.gz

  2. Step 2. docker run -p 7687:7687 -v mg_lib:/var/lib/memgraph -v mg_log:/var/log/memgraph -v mg_etc:/etc/memgraph memgraph

  3. Step 3… use command line docker run -it --entrypoint=mgconsole memgraph --host 1XX.X.X.2 --use-ssl=False

  4. Step 4…
    CREATE (execute:Methods { name: "execute", returnType: "void", classname: "SimpleJob", packagename: "jobs"}) RETURN execute.name;

Expected behavior

Create the relationship as per the query and no error on the console

Actual behavior

The DB server (docker) is shut down with below message in console

mg_raw_transport_recv: connection closed by server
Client received exception: failed to receive chunk size
Trying to reconnect
Connection failure: couldn't connect to host: Connection refused
inside the container log /var/log/memgraph folder 
[memgraph_log] [critical] Assertion failed with message: 'Token position must be present in container'

Your environment local

  • Memgraph version used v1.6.1-community
  • Operating system and version (e.g., Ubuntu 20.04.2 LTS) mac bigsur

Hello @vamsi!
Thank you very much for reporting this bug. :grinning_face_with_smiling_eyes:
It seems that the problem arises because of the variable name execute. Our engineering team is looking into it and will roll out a fix as soon as possible.
In the meantime, try to use another variable name if possible. This should mitigate the error.

Hi @vamsi, thanks for reporting the bug!
We managed to locate the problem and fix it. The fix will be shipped with the next release that will be coming very soon!

If you’re wondering where the problem was, it’s connected to the CREATE TRIGGER query and its EXECUTE keyword that we handle slightly different from other keywords.

1 Like

@idespot @toni Thanks for quick response. Yes, unfortunately, I do not have control over the variable names and hence cannot change, but nonetheless I am happy that the issue is going to get fixed, will wait for the new release.
Additionally, I have another issue , not sure if you want me to open another issue. I am getting invalid query for a MATCH statement which looks valid to me.

memgraph> MATCH (abc:ClassVariable { name: "abc", type: "String", modifiers: "[@Value("#{systemEnvironment['ABC']}"), private]"}) RETURN abc.name;
Client received exception: Invalid query.

the value of modifiers ("[@Value("#{systemEnvironment['ABC']}"), private]") has quotes inside of it, closing the string earlier. You would need to escape all internal quotes to make the query work:
MATCH (abc:ClassVariable { name: "abc", type: "String", modifiers: "[@Value(\"#{systemEnvironment['ABC']}\"), private]"}) RETURN abc.name;

2 Likes

Hey @vamsi, we released a new version of Memgraph that includes a fix for your problem with the execute name.
Please try it out and tell us if you need more help!

1 Like

Thanks, tried the 2.0.0 tar gz. Fix seems to be working. I see you removed ‘community’ from the name of tarball. Will the docker image be updated soon docker pull memgraph/memgraph still at 1.6.1?

2 Likes

Hi @vamsi!
Glad to hear that the fix is working for you. :slightly_smiling_face:
We will update the image on Docker Hub to the newest version as soon as possible.
Until then, you can always download the image from the Memgraph download page.

1 Like

Just to expand on the community part.
Two major things happened with 2.0 release:

  • Memgraph became Source Available
  • we decided to ship a single binary and protect the Enterprise features with a license key (the reason why there is no community word anymore)

Thanks for verifying the fix and I hope everything else works as it should. If not, you know where to find us. :smiley:

1 Like