cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Cannot Get Neo4j CE to listen on a different port

jhowes
Node Link

Ubuntu 18, tar installation of 4.1.1.

I have updated neo4j.conf to listen on my public NIC on a different port:

% cat conf/neo4j.conf | grep dbms.connector.bolt
dbms.connector.bolt.enabled=true
#dbms.connector.bolt.tls_level=DISABLED
#dbms.connector.bolt.listen_address=:7687
dbms.connector.bolt.listen_address=0.0.0.0:7688

But when I start the process it listens on the default port:

% bin/neo4j console
...
2020-08-17 23:22:09.374+0000 INFO  Bolt enabled on localhost:7687.

How do I get the process to listen on the port I have specified in neo4j.conf?

I get the same behaviour for my localhost NIC as well. Just listens on the default port.

Thanks!

1 REPLY 1

jhowes
Node Link

Truly a newbie question! Simple fix...

I had set the environment variable NEO4J_HOME to a different directory, so the binary was using that home directory instead of my current working directory.

The output of bin/neo4j console helped diagnose the problem:

% bin/neo4j console
Directories in use:
  home:         /bad/path/neo4j_community/latest
  config:       /bad/path/neo4j_community/latest/conf
  ...
  run:          /bad/path/neo4j_community/latest/run
Starting Neo4j.

Setting the correct home directory fixed the issue:

% export NEO4J_HOME=/good/path/neo4j_community/latest

Also it was best to update all the following settings in neo4j.conf for my specific situation (I wanted a colleague to be able to connect from his dev box):

dbms.default_advertised_address=mylocaldnshostname
...
dbms.connector.bolt.listen_address=:7688
dbms.connector.bolt.advertised_address=:7688
...
dbms.connector.http.listen_address=:7475
dbms.connector.http.advertised_address=:7475