Reputation: 11
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:
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>
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:
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
./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 :)
Upvotes: 1
Views: 849
Reputation: 1180
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.
Upvotes: 0