How to connect to remote Graph?

Hi, i try to connect in remote to my colleague graph, but i don't know how to do it. When i insert the credential comes this error: Unable to establish remote connection: Database is unreachable with specified configuration. I want to know if is possible to connect to a graph not in local, and if yes how we can. Thanks for help

1 Like

how are you connecting? Via the Neo4j Browser at http://:7474 ?
or through one of the Neo4j Bolt drivers and thus bolt://:7678

Connecting to a remote graph is definitely possible

1 Like

I'm trying to connect via Neo4jDesktop-> add graph -> connect to remote graph. i don't know if this is correct, but i don't know other way to connect, and my collegue doesn't know what's the correct connect url that have to give to me.

the correct connect url is bolt://<ip address of remote graph>:7687, for example if Neo4j is running on a remote instance at 192.168.1.2, then the connect url would be bolt://192.168.1.2:7687. Make sure Neo4j is running at 192.168.1.2. Also the remote graph is going to need to allow non-local connections and this is achieved by updating conf/neo4j.conf and define parameter dbms.connectors.default_advertised_address=0.0.0.0. After making this change Neo4j will need to be restarted on the remote instance for it to take effect

1 Like

When i start the graph it run on IP ADDRESS: localhost... so my colleague can't connect to my graph, there's a way to change the ip address where the graph is running?

Hi, I am also looking for some option to connect to neo4j database from different systems. I am using Neo4j Desktop version. My IP Address: localhost too. Could you help me how to connect to the database in my system from my friend's computer.

Thanks

I have downloaded Neo4j Community edition and I am trying to connect to my system's database from other system in chrome browser by giving bolt://:7687 . It didnt work. I tried http://:7687 , This also dint work.

???? http:// listens on http://:7474, for example http://192.168.2.22:7474. The same for bolt as it listens on bolt://:7687, and for example bolt://192.168.2.22:7687.

and obviously the reference above to 192.168.2.22 is an example, presumably your IP address of the running Neo4j instance is different

Hi,

I have downloaded Neo4j Community Edition. I opened command prompt and connected to Neo4j console by following command.
<NEO4J_HOME>\bin\neo4j console
I got this in command prompt
2019-11-21 06:37:11.980+0000 INFO ======== Neo4j 3.5.12 ========
2019-11-21 06:37:11.984+0000 INFO Starting...
2019-11-21 06:37:20.951+0000 INFO Bolt enabled on 127.0.0.1:7687.
2019-11-21 06:37:22.462+0000 INFO Started.
2019-11-21 06:37:23.730+0000 INFO Remote interface available at http://localhost:7474/

I opened google chrome browser and opened http://localhost:7474/ I changed the pwd and connected to bolt://127.0.0.1:7687
I created some nodes and relationships in the database.
I wrote below python program(KB.py)
image

When I ran KB.py in my system, it gave me results.

Now i want to connect to this database from other system.
I followed your comments in this forum and changed the neo4j.conf file by updating define parameter dbms.connectors.default_advertised_address=0.0.0.0 . After making this change I restarted Neo4j in command prompt again by command <NEO4J_HOME>\bin\neo4j console
This time it gave me this in command prompt
D:\neo4j\bin>neo4j console
2019-11-21 06:52:02.666+0000 INFO ======== Neo4j 3.5.12 ========
2019-11-21 06:52:02.682+0000 INFO Starting...
2019-11-21 06:52:11.286+0000 INFO Bolt enabled on 127.0.0.1:7687.
2019-11-21 06:52:12.723+0000 INFO Started.
2019-11-21 06:52:13.551+0000 INFO Remote interface available at http://0.0.0.0:7474/

Now i am running KB.py from another machine without changing any code in KB.py. But it is not giving any results from another machine. It gives below error
Traceback (most recent call last):
File "C:\Python\Python37\lib\site-packages\neobolt\direct.py", line 835, in connect
s.connect(resolved_address)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:/Python_games/kb1/KB.py", line 22, in
kb = KB()
File "E:/Python_games/kb1/KB.py", line 13, in init
self.driver = GraphDatabase.driver(uri=uri, auth=(author,password))
File "C:\Python\Python37\lib\site-packages\neo4j_init
.py", line 120, in driver
return Driver(uri, **config)
File "C:\Python\Python37\lib\site-packages\neo4j_init_.py", line 161, in new
return subclass(uri, **config)
File "C:\Python\Python37\lib\site-packages\neo4j_init_.py", line 235, in new
pool.release(pool.acquire())
File "C:\Python\Python37\lib\site-packages\neobolt\direct.py", line 719, in acquire
return self.acquire_direct(self.address)
File "C:\Python\Python37\lib\site-packages\neobolt\direct.py", line 612, in acquire_direct
connection = self.connector(address, error_handler=self.connection_error_handler)
File "C:\Python\Python37\lib\site-packages\neo4j_init_.py", line 232, in connector
return connect(address, **dict(config, **kwargs))
File "C:\Python\Python37\lib\site-packages\neobolt\direct.py", line 976, in connect
raise last_error
File "C:\Python\Python37\lib\site-packages\neobolt\direct.py", line 966, in connect
s = _connect(resolved_address, **config)
File "C:\Python\Python37\lib\site-packages\neobolt\direct.py", line 847, in _connect
raise ServiceUnavailable("Failed to establish connection to {!r} (reason {})".format(resolved_address, error))
neobolt.exceptions.ServiceUnavailable: Failed to establish connection to ('127.0.0.1', 7687) (reason [WinError 10061] No connection could be made because the target machine actively refused it)
Process finished with exit code 1

When I run from KB.py my machine it is giving results. Could you please help me how can I connect to the neo4j database in my machine from another machine.

Thank you

The issue is resolved now after updating IP_Adress of machgine in which Neo4j is running in place of 0.0.0.0 in neo4j.conf file.

Database is unreachable with specified configuration.

I got this error when i try to connected with my data. I used the bolt://6787

1 Like

dbms.connectors.default_advertised_address=0.0.0.0 This doesn't exist in any of my neo4j.conf or neo4j.conf-default files.