neo4j-python-driver icon indicating copy to clipboard operation
neo4j-python-driver copied to clipboard

Protocol Error: Server closed connection

Open YoungLion opened this issue 9 years ago • 3 comments

I have been banging my head on this error for days. I am new to neo4j world. I have successfully used it on my macbook. Now I am deploying it on a remote Linux machine with the same setup. But I keep getting this Protocol error. What caused this issue?

Traceback (most recent call last):
  File "/root/dev/knowledgeGraphH/knowledge/media_entity_mapper.py", line 31, in <module>
    main()
  File "/root/dev/knowledgeGraphH/knowledge/media_entity_mapper.py", line 28, in main
    map_media_to_entities()
  File "/root/dev/knowledgeGraphH/knowledge/media_entity_mapper.py", line 7, in map_media_to_entities
    data_manager = DataManager()
  File "/root/dev/knowledgeGraphH/knowledge/data_manager/data_manager.py", line 13, in __init__
    self.graphDB = Neo4jManager()
  File "/root/dev/knowledgeGraphH/knowledge/neo4j_manager.py", line 10, in __init__
    self.session = self.driver.session()
  File "/root/dev/knowledgeGraphH/env/lib/python2.7/site-packages/neo4j/v1/session.py", line 148, in session
    session = Session(self)
  File "/root/dev/knowledgeGraphH/env/lib/python2.7/site-packages/neo4j/v1/session.py", line 461, in __init__
    self.connection = connect(driver.host, driver.port, driver.ssl_context, **driver.config)
  File "/root/dev/knowledgeGraphH/env/lib/python2.7/site-packages/neo4j/v1/connection.py", line 465, in connect
    return Connection(s, der_encoded_server_certificate=der_encoded_server_certificate, **config)
  File "/root/dev/knowledgeGraphH/env/lib/python2.7/site-packages/neo4j/v1/connection.py", line 237, in __init__
    self.fetch()
  File "/root/dev/knowledgeGraphH/env/lib/python2.7/site-packages/neo4j/v1/connection.py", line 326, in fetch
    self.acknowledge_failure()
  File "/root/dev/knowledgeGraphH/env/lib/python2.7/site-packages/neo4j/v1/connection.py", line 273, in acknowledge_failure
    fetch()
  File "/root/dev/knowledgeGraphH/env/lib/python2.7/site-packages/neo4j/v1/connection.py", line 311, in fetch
    raw.writelines(self.channel.chunk_reader())
  File "/root/dev/knowledgeGraphH/env/lib/python2.7/site-packages/neo4j/v1/connection.py", line 169, in chunk_reader
    chunk_header = self._recv(2)
  File "/root/dev/knowledgeGraphH/env/lib/python2.7/site-packages/neo4j/v1/connection.py", line 152, in _recv
    raise ProtocolError("Server closed connection")
neo4j.v1.exceptions.ProtocolError: Server closed connection

YoungLion avatar Jan 12 '17 07:01 YoungLion

It's hard to tell exactly just from that stack trace, but my guess is that you are using incorrect credentials and auth is failing.

technige avatar Jan 12 '17 09:01 technige

Closing due to inactivity. Please reopen if needed.

technige avatar Jan 23 '17 13:01 technige

I had the same issue when I passed in a dictionary of parameters without the quotation marks around the parameter name, when executing a query. @YoungLion

ryguyrg avatar Feb 08 '17 17:02 ryguyrg