1

I'm trying to connect to my MemgraphDB instance using mgconsole but I'm unable to connect to my DB instance.

I'm on an Apple M1 and wanted to run memgraph on my local machine. I followed the "Getting started" documentation and did the following steps:

  1. Installed and started Memgraph Platform: docker run -it -p 7687:7687 -p 7444:7444 -p 3000:3000 -v mg_lib:/var/lib/memgraph memgraph/memgraph-platform

I get the following output:

Memgraph Lab is running at localhost:3000

mgconsole 1.3
Connected to 'memgraph://127.0.0.1:7687'
Type :help for shell usage
Quit the shell by typing Ctrl-D(eof) or :quit
memgraph>
  1. When I open the Memgraph Lab at localhost:3000, I get a "Memgraph Not Detected" message. Now, as I have the mgconsole running, I run the query CREATE (u:User {name: "Alice"})-[:Likes]->(m:Software {name: "Memgraph"}); and I get the following response:
mg_raw_transport_send: Broken pipe
Client received exception: failed to send chunk data
Trying to reconnect
mg_raw_transport_recv: Connection reset by peer
Connection failure: failed to receive handshake response
Connection failure: couldn't connect to host: Connection refused
Connection failure: couldn't connect to host: Connection refused
Couldn't connect to: 'memgraph://127.0.0.1:7687'

What I tried next: I followed MacOS Installation Troubleshooting:

  1. Replace HOST with host.docker.internal and ran docker run -it --entrypoint=mgconsole memgraph/memgraph-platform --host host.docker.internal. The output I got:
mg_raw_transport_recv: connection closed by server
Connection failure: failed to receive handshake response
  1. I also ran only MemgraphDB as a docker container and then started mgconsole as ./mgconsole --host 127.0.0.1 --port 7687. The output I got:
Connection failure: couldn't connect to host: Connection refused

I am unable to debug what the problem is here.

EDIT: Additional info: I am using Rancher Desktop

Note: This is my first time asking question here, so any feedback is welcomed :)

  • Can you try running the command without the volume? This would be the command: docker run -it -p 7687:7687 -p 7444:7444 -p 3000:3000 memgraph/memgraph-platform – KWriter Aug 11 '23 at 17:30
  • @KWriter Tried without the volume. I'm getting the same error – Manav Chirania Aug 16 '23 at 04:10
  • Can you try pulling the image that has only MemgraphDB with docker pull memgraph/memgraph. Run that image with docker run -p 7687:7687 -p 7444:7444 -p 3000:3000 memgraph/memgraph. If you see the message that Memgrpah is running, download the Memgraph Lab from memgraph.com/download. There is a version for Mac M1. – KWriter Aug 16 '23 at 07:21
  • Nope. It could not detect the Memgraph. Also, I am using Rancher Desktop instead of Docker Desktop. I will add that in the question itself – Manav Chirania Aug 16 '23 at 14:38

1 Answers1

0

Your problem might be related to improper port forwarding. An example of how to set up port forwarding can be found in the Rancher nginx configuration page. You'll need to create similar rules for all the Memgraph ports.

Since Rancher Desktop is a local Kubernetes service and compatible with Helm, you can utilize the Helm chart provided by Memgraph. On top of that, try using -mage image and download the standalone Memgraph Lab app to access it afterward.

KWriter
  • 1,024
  • 4
  • 22