I'm using py2neo in wsl and trying to connect to neo4j instance on Windows.
from py2neo import Graph
graph = Graph('bolt://localhost:7687', user="neo4j", password="12345678")
the terminal returns with the error
Traceback (most recent call last): File "/home/tranminhq420/.local/lib/python3.8/site-packages/py2neo/client/init.py", line 806, in acquire cx = self._free_list.popleft() IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/tranminhq420/.local/lib/python3.8/site-packages/py2neo/wiring.py", line 62, in open s.connect(address) ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/home/tranminhq420/.local/lib/python3.8/site-packages/py2neo/client/bolt.py", line 355, in open wire = cls._connect(profile, on_broken=on_broken) File "/home/tranminhq420/.local/lib/python3.8/site-packages/py2neo/client/bolt.py", line 369, in _connect wire = Wire.open(profile.address, keep_alive=True, on_broken=on_broken) File "/home/tranminhq420/.local/lib/python3.8/site-packages/py2neo/wiring.py", line 64, in open raise_from(WireError("Cannot connect to %r" % (address,)), error) File "", line 3, in raise_from py2neo.wiring.WireError: Cannot connect to IPv4Address(('localhost', 7687))
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "graph.py", line 3, in graph = Graph('bolt://localhost:7687', user="neo4j", password="12345678") File "/home/tranminhq420/.local/lib/python3.8/site-packages/py2neo/database.py", line 288, in init self.service = GraphService(profile, **settings) File "/home/tranminhq420/.local/lib/python3.8/site-packages/py2neo/database.py", line 119, in init self._connector = Connector(profile, **connector_settings) File "/home/tranminhq420/.local/lib/python3.8/site-packages/py2neo/client/init.py", line 960, in init self._add_pools(*self._initial_routers) File "/home/tranminhq420/.local/lib/python3.8/site-packages/py2neo/client/init.py", line 982, in _add_pools pool = ConnectionPool.open( File "/home/tranminhq420/.local/lib/python3.8/site-packages/py2neo/client/init.py", line 649, in open seeds = [pool.acquire() for _ in range(init_size or cls.default_init_size)] File "/home/tranminhq420/.local/lib/python3.8/site-packages/py2neo/client/init.py", line 649, in seeds = [pool.acquire() for _ in range(init_size or cls.default_init_size)] File "/home/tranminhq420/.local/lib/python3.8/site-packages/py2neo/client/init.py", line 813, in acquire cx = self._connect() File "/home/tranminhq420/.local/lib/python3.8/site-packages/py2neo/client/init.py", line 764, in _connect cx = Connection.open(self.profile, user_agent=self.user_agent, File "/home/tranminhq420/.local/lib/python3.8/site-packages/py2neo/client/init.py", line 174, in open return Bolt.open(profile, user_agent=user_agent, File "/home/tranminhq420/.local/lib/python3.8/site-packages/py2neo/client/bolt.py", line 364, in open raise_from(ConnectionUnavailable("Cannot open connection to %r" % profile), error) File "", line 3, in raise_from py2neo.errors.ConnectionUnavailable: Cannot open connection to ConnectionProfile('bolt://localhost:7687')
I have suspected there's a problem with the conf of neo4j and have tried to uncomment the line
server.default_listen_address=0.0.0.0
to no avail. I have also tried to add the line
dbms.connector.bolt.address=0.0.0.0:7687
but still can't get it to connect, here's my conf file, what should I do here