SecurityError: Failed to establish secure connection to 'EOF occurred in violation of protocol (_ssl.c:841)'

I found the solution for people who might have the same issue. You need to add encrypted=False.

Instead of

from neo4j.v1 import GraphDatabase
driver = GraphDatabase.driver(uri="bolt://localhost:7687", auth=("neo4j", "12345"))

it should be:

driver = GraphDatabase.driver(uri="bolt://localhost:7687", auth=("neo4j", "12345"), encrypted=False)

Hope this will help someone


I had the same problem with the Object Graph Mapper Neomodel (connecting to neo4j v4). Adding the second line solved it:

config.DATABASE_URL = 'bolt://neo4j:password123@localhost:7687'
config.ENCRYPTED_CONNECTION = False