Cypher-shell works remotely but not locally

I'm running 4.1 enterprise using the latest EC2 AMI (ami-0afe90add2767a91c).
When I ssh in, I'm unable to connect using cypher-shell locally:

$ cypher-shell -u neo4j -p -----------
Unable to connect to localhost:7687, ensure the database is running and that there is a working network connection to it.

But I can connect remotely and successfully query via the data browser or using cypher-shell:

$ cypher-shell -a --.--.--.-- -u neo4j -p ------------

So I'm pretty sure that there's a connection and the database is working.

Any suggestions much appreciated.

I noticed that the journal indicates:

Bolt enabled on --.--.--.--:7687.

I found that I can indeed connect locally using that address. But I don't see reference to the need to do that in the documentation. Is this something new or related to the AMI?

Change the config to




When you give a specific IP address the server will bind to only that IP address. By specifying, the server will try to bind to all the available network addresses of the server.

1 Like

First, thanks @anthapu!

I'm actually having trouble changing the config.

It seems that with a VM one cannot modify neo4j.conf directly, but rather neo4j.template, as shown here: Neo4j Cloud Virtual Machines - Developer Guides.

The template contains this line:


Based on the documentation link above, I understand that it should be possible to modify the value of $dbms_default_listen_address by using a VM tag. This is an EC2 instance, so I set the tag per Tag your Amazon EC2 resources - Amazon Elastic Compute Cloud. Specifically, I created a tag with the name "dbms.default_listen_address" and a value of "".

But even after rebooting, neo4j.conf is being generated as before.

Of course, I could just hard-code "" into the template. But that would defeat the purpose of a template.

Does anyone know what I have to do to set this VM tag correctly? Or barring that, from where the default value is being set if there is no tag?

As per documentation in the link provided I think you need to provide the tag as


Since that is the value template is looking for


where as you are creating tag as

Specifically, I created a tag with the name "dbms.default_listen_address" and a value of "".

You are using "dbms." change it to "dbms_" and try.

Thanks again @anthapu. Yes, you caught an error there. But changing it still doesn't seem to have an impact. I've asked the question also here: NEO4J ENTERPRISE: neo4j.conf gets overwritten - #8 by yyakovson613.