It seems like the question of how to use the bolt protocol (or HTTP) with Neo4j is super common amongst newer Neo4j developers, especially when it produces errors, and it is most often searched by the phrase bolt://localhost:7687 or http://localhost:7474, or “Neo4j 7474”, or “Neo4j url”, especially when moving from Neo4j local access to Neo4j remote access (e.g. over network, in which case developers seem to search for “neo4j remote access bolt”).
COMMON ERROR: Accessing bolt://localhost:7687
Many times if a developer is trying to access Neo4j, they can get an error like this as they attempt to swap out bolt and HTTP/REST protocols in the URL, and that is usually because they use different default ports (see next section):
Exception in thread "main" org.neo4j.driver.v1.exceptions.ClientException: Unsupported URI scheme: http at org.neo4j.driver.internal.DriverFactory.createDriver(DriverFactory.java:125) at org.neo4j.driver.internal.DriverFactory.newInstance(DriverFactory.java:82) at org.neo4j.driver.v1.GraphDatabase.driver(GraphDatabase.java:136) at org.neo4j.driver.v1.GraphDatabase.driver(GraphDatabase.java:119) at org.neo4j.driver.v1.GraphDatabase.driver(GraphDatabase.java:94) at neo4j.Neo4j.<init>(Neo4j.java:19) at neo4j.Neo4j.main(Neo4j.java:50)
CORRECT SYNTAX: To Use Bolt Protocol to Access your Neo4j DB
There are actually two main ways to access your Neo4j database through the bolt protocol, or through HTTP/REST. They each use a different port, and here are syntax examples for each, with the correct ports:
- HTTP/REST: default Neo4j http port is 7474
- Neo4j URL syntax for HTTP / REST: http://localhost:7474 / rest://localhost:7474
- BOLT: default Neo4j bolt port is 7687
- Neo4j bolt URL syntax: bolt://localhost:7687
SOLUTION: For Accessing a Neo4j Database Over the Network
By default Neo4j is configured to simply listen on local, so almost always for Neo4j remote access, if you are unable to connect (and if you are using the correct port as described above) the issue is that there is a single line that is commented out in the neo4j.conf file. All you have to do is uncomment the following line, and it should work.
If you have questions on this or anything else related to Neo4j / Neo4j consulting or reselling, Hume / Hume consulting or reselling or anything about graph-based AppDev in general? Contact us today to catch up with one of our graph experts. Also check out Neo4j pricing and Hume pricing.
More Tech Resources
- Neo4j string to datetime (How to Use Neo4j string to datetime)
- bolt://localhost:7687 (How to use bolt protocol to access your Neo4j Database)
- https://neo4j.com/docs/graph-data-science/1.8/management-ops/ (Find Neo4j v1.8 GDS Graph Management)
- What is ChatGPT? (A Complete Explanation)
Still learning? Check out a few of our introductory articles to learn more:
- What is a Graph Database?
- What is Neo4j (Graph Database)?
- What Is Domo (Analytics)?
- What is Hume (GraphAware)?
- Hume consulting / Hume (GraphAware) Platform
- Neo4j consulting / Graph database
- Domo consulting / Analytics - BI
We would also be happy to learn more about your current project and share how we might be able to help. Schedule a consultation with us today. We can also discuss pricing on these initial calls, including Neo4j pricing and Domo pricing. We look forward to speaking with you!