Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
07-06-2020 04:58 AM
Hi Team
I have setup Neo4j on AWS. To this DB i am able to connect and fetch data using Bolt protocol via python code , however trying to connect to DB from Javascript results in below error.
Neo4jError: Unknown Bolt protocol version: 0
Are there any things i should keep in mind and configuration that needs to be done with nodejs(javascript) code , for it to be able to successfully connect to DB ?
Facing same error while trying to connecting from "Neo4j Browser" from local system.
Solved! Go to Solution.
07-15-2020 12:43 AM
Ran into a similar issue with GrapheneDB using neo4j-driver 4.1.0, downgraded to neo4j-driver 4.0.2 and got it to work (uses Bolt v1).
neo4j-driver 4.1.0 uses Bolt 2+, but GrapheneDB Neo4j (3.5.5) does not work with neo4j-driver 4.1.0 yet, perhaps AWS does not either. Downgrading to an earlier version of neo4j-driver may do the trick, see https://github.com/neo4j/neo4j-javascript-driver/issues/595
07-07-2020 07:15 AM
Without modification your instance will only connect to localhost with no ability to connect from outside. You can enable this in the /etc/neo4j/neo4j.conf file. Look for the LISTEN parameters.
Note that you need to restart after changes. Also note that your AWS instance is probably protected by their default firewall.
You can modify as needed or use a ssh tunnel if you need a temporary connection.
07-07-2020 07:24 AM
Hi Webtic
I have modified parameters in neo4j.conf file and restarted Neo4j so those parameter changes take effect. As mentioned , I am able to connect to DB via python code and query it , however facing issue specifically with connecting from NodeJs code. I have installed required neo4j-driver libraries on my code but still facing issue.
07-07-2020 07:29 AM
Both Python and JS are running on the same host as the Neo4J instance?
Then you ignore my ramblings on the network config
Are you on 3.5 or 4.x ? Is your JS driver matching the Neo4J version?
07-08-2020 11:55 PM
Neo4J version 3.5 and yes both python and NodeJs code are in same host as the instance of Neo4j.
About JS Driver Version. Tried JS driver of both 1.7.0 and 4.1.0 but faced same issue.
07-09-2020 03:31 AM
Its safe to assume there is some issue with the JS driver, I am not familiar enough with it to be of any assistance. Perhaps you can find useful info in the release info at https://github.com/neo4j/neo4j-javascript-driver/wiki
07-11-2020 07:22 AM
Did you manage to resolve the issue already? If not could you share the code which initialises the driver?
Here is a working example I have used:
var neo4j = require("neo4j-driver");
const driver = neo4j.driver(
"bolt://localhost:7687",
neo4j.auth.basic("neo4j", "")
);
07-12-2020 10:38 AM
Hi Kalin
My code snippet is fairly similar to your example.
I am trying to connect to Neo4j version 3.5.17 and have installed Javascript driver version 4.1.0.
However while trying to run the code i am either getting either of these error.
Bolt Protocol Version:0
or
Service Unavailable
07-15-2020 12:43 AM
Ran into a similar issue with GrapheneDB using neo4j-driver 4.1.0, downgraded to neo4j-driver 4.0.2 and got it to work (uses Bolt v1).
neo4j-driver 4.1.0 uses Bolt 2+, but GrapheneDB Neo4j (3.5.5) does not work with neo4j-driver 4.1.0 yet, perhaps AWS does not either. Downgrading to an earlier version of neo4j-driver may do the trick, see https://github.com/neo4j/neo4j-javascript-driver/issues/595
07-15-2020 06:51 AM
This worked like a charm.
I had GraphenedDB(3.5.17) running on heroku and was using 4.1.0 Neo4j Driver which was throwing original issue.
Downgrading driver to 4.0.2 helped resolved issue.
All the sessions of the conference are now available online