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.

Neo4j Python Driver "Broken Pipe" issue

Hi,
While trying to write some edges between nodes from Python code using neo4j driver, I am encountering broken pipe issue. The error message is given below. How can this be resolved:

Sudipta

Error Message:

Connected to Neo4j Database

Loading similarity edges...
Traceback (most recent call last):
File "/opt/middleware/anaconda_python/3.5.4/lib/python3.6/site-packages/neo4j/init.py", line 822, in close
self.sync()
File "/opt/middleware/anaconda_python/3.5.4/lib/python3.6/site-packages/neo4j/init.py", line 787, in sync
self.session.sync()
File "/opt/middleware/anaconda_python/3.5.4/lib/python3.6/site-packages/neo4j/init.py", line 538, in sync
detail_count, _ = self._connection.sync()
File "/opt/middleware/anaconda_python/3.5.4/lib/python3.6/site-packages/neobolt/direct.py", line 526, in sync
self.send()
File "/opt/middleware/anaconda_python/3.5.4/lib/python3.6/site-packages/neobolt/direct.py", line 388, in send
self._send()
File "/opt/middleware/anaconda_python/3.5.4/lib/python3.6/site-packages/neobolt/direct.py", line 408, in _send
self.socket.sendall(data)
File "/opt/middleware/anaconda_python/3.5.4/lib/python3.6/ssl.py", line 975, in sendall
v = self.send(byte_view[count:])
File "/opt/middleware/anaconda_python/3.5.4/lib/python3.6/ssl.py", line 944, in send
return self._sslobj.write(data)
File "/opt/middleware/anaconda_python/3.5.4/lib/python3.6/ssl.py", line 642, in write
return self._sslobj.write(data)
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/middleware/anaconda_python/3.5.4/Navaneeth/simRelationBatch_II.py", line 265, in simInput
tx.commit()
File "/opt/middleware/anaconda_python/3.5.4/lib/python3.6/site-packages/neo4j/init.py", line 799, in commit
self.close()
File "/opt/middleware/anaconda_python/3.5.4/lib/python3.6/site-packages/neo4j/init.py", line 829, in close
self.session.commit_transaction()
File "/opt/middleware/anaconda_python/3.5.4/lib/python3.6/site-packages/neo4j/init.py", line 631, in commit_transaction
self._disconnect(sync=True)
File "/opt/middleware/anaconda_python/3.5.4/lib/python3.6/site-packages/neo4j/init.py", line 380, in _disconnect
self._connection.sync()
File "/opt/middleware/anaconda_python/3.5.4/lib/python3.6/site-packages/neobolt/direct.py", line 526, in sync
self.send()
File "/opt/middleware/anaconda_python/3.5.4/lib/python3.6/site-packages/neobolt/direct.py", line 388, in send
self._send()
File "/opt/middleware/anaconda_python/3.5.4/lib/python3.6/site-packages/neobolt/direct.py", line 408, in _send
self.socket.sendall(data)
File "/opt/middleware/anaconda_python/3.5.4/lib/python3.6/ssl.py", line 975, in sendall
v = self.send(byte_view[count:])
File "/opt/middleware/anaconda_python/3.5.4/lib/python3.6/ssl.py", line 944, in send
return self._sslobj.write(data)
File "/opt/middleware/anaconda_python/3.5.4/lib/python3.6/ssl.py", line 642, in write
return self._sslobj.write(data)
BrokenPipeError: [Errno 32] Broken pipe

1 REPLY 1

There's your problem right there. Neo4j is dropping the connection in the middle of whatever work you're doing.

The next thing you should do is go check your server logs (neo4j.log and debug.log) and look for the reason why. In particular look for exception stacktraces, and server restarts. What to do next depends on why the server is doing this.