How to connect to neo4j on remote server using cytoscape neo4j plugin - neo4j

I installed cytoscape 3.8.2 and Cytoscape Neo4j Plugin (http://apps.cytoscape.org/apps/cytoscapeneo4jplugin). I've generated a small neo4j graph, which is situated on a remote server.
When trying to connect to neo4j using the plugin I get following error: "Cannot connect to neo4j"
What am I doing wrong? Is it not possible to connect to neo4j when the instance is situated on a remote server?

It certainly should work, but since Neo4J uses it's own port, which isn't opened by default on most hosts, you may need to tweak your server firewall.
-- scooter

Related

Trying to connect to Neo4j Desktop using py2neo and receiving ``ServiceUnavailable: Cannot connect to any known routers`" when I run a query

I renamed the existing example database from Movies RDBM to Movies and changed the password to pwd.
from py2neo import Graph
db=Graph("neo4j://neo4j:pwd#localhost:7687", name="Movies" )
No errors for the above
db.run("MATCH (n:Movie) RETURN n").to_table()
The above fails with
ServiceUnavailable: Cannot connect to any known routers
what am I doing wrong ?
I was using WSL and Jupyter Notebooks but Neo4j was running in Windows so 127.0.0.1 was pointing to the WSL loopback and there was nothing there to receive the API calls

How can I get neo4j to connect to local demo?

I have neo4j installed (& the conf file says that authentication is off.)
I start the movie demo --- and am told to connect to the server.
When I type
:server connect
with No Authentication
the browser tells me that there is a graph waiting for me but then gives the message "Unable to extract host form undefined."
If you simply want to run the movie demo, you might prefer to use the free Neo4j sandbox rather than Neo4j Desktop. It runs in a web browser and there is nothing to install.
https://sandbox.neo4j.com/
If you prefer to use Neo4j Desktop, confirm that your database has started.
https://www.markhneedham.com/blog/2018/03/20/neo4j-undefined-unable-to-extract-host-from-undefined/

neo4j database started via windows service not accessible remotely

I am setting up window service for my neo4j database. I am able to start that from service and I can do a http post cypher query using localhost. However, I can't connect to the neo4j db remotely.
If I start the neo4j db via neo4j Desktop, I can perform http post both locally and remotely.
When I compared the neo4j logs generated using service start vs neo4j desktop start, they are quite different but no error on the service one.
Any idea?
By default, Neo4j server is not accessible remotely.
You need to change $NEO4J_HOME/conf/neo4j.conf.
Find this line:
#dbms.connector.http.address=localhost:7474
And Replace it with:
dbms.connector.http.address=0.0.0.0:7474
Setting connector address to 0.0.0.0 makes it accessible remotely.

Have both Gremlin-Server AND NEO4J Server running at the same time

Current it seems we cannot run both Neo4J Server and Gremlin Server at the same time. Is there any way to have run both?
NEO4J is running and I try to start to Gremlin Server then I get the following error
java.lang.RuntimeException: GraphFactory could not instantiate this
Graph implementation [class
org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph].......................(truncated)
Gremlin Server is running and I try to start NEO4J Server then I get the following error
Caused by: org.neo4j.kernel.StoreLockException: Store and its lock
file has been locked by another process:
/home/galaxia/Documents/neo4j-gremlin/data/databases/graph.db/store_lock.
Please ensure no other process is using this database, and that the
directory is writable (required even for read-only access)
Versions
Neo4J 3.3.1
Gremlin 3.3.1
I realize it has been a while, but I finally figured this out and thought others should know. As Stephen Mallette said, you can use the Bolt implementation. To configure this for Gremlin Server, use the included gremlin-server-neo4j.yaml file and make the following change:
graphs: {
graph: conf/neo4j-bolt.properties}
Then create the neo4j-bolt.properties file with this content:
gremlin.graph=com.steelbridgelabs.oss.neo4j.structure.Neo4JGraph
#neo4j.graph.name=graph.db
neo4j.identifier=dummy
neo4j.url=bolt://localhost:7687
neo4j.username=neo4j
neo4j.password=<password>
neo4j.readonly=false
neo4j.vertexIdProvider=com.steelbridgelabs.oss.neo4j.structure.providers.Neo4JNativeElementIdProvider
neo4j.edgeIdProvider=com.steelbridgelabs.oss.neo4j.structure.providers.Neo4JNativeElementIdProvider
Remember to replace the password, and any other property with the correct values.
You cannot run them together that way (i.e. embedded mode), but it should be possible to run them together, if you either:
Configure the Neo4j graph in Gremlin Server to use HA mode as described here
Configure the Neo4j graph in Gremlin Server to use the Bolt implementation found here
Enable the Bolt protocol in the Neo4j properties file provided to Gremlin Server.
As an example of the third option, given the default Gremlin Server packaged configuration files for Neo4j, you can edit conf/neo4j-empty.properties to include:
gremlin.graph=org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph
gremlin.neo4j.directory=/tmp/neo4j
gremlin.neo4j.conf.dbms.connector.0.type=BOLT
gremlin.neo4j.conf.dbms.connector.0.enabled=true
gremlin.neo4j.conf.dbms.connector.0.address=localhost:7687
and then start Gremlin Server with bin/gremlin-server.sh conf/gremlin-server-neo4j.yaml at which point you can use standard TinkerPop drivers as well as standard Bolt connectivity against the same graph instance.

Starting Neo4j Server failed: Component was successfully initialized, but server failed to start

I was given a graph db I must open with Neo4j. Installed community version Neo4j-2.2.0-M02 on Win7 Ultimate laptop successfully. When I tried to start the server, after pointing to the graph db, I get the following error:
Starting Neo4j Server failed:
Component org.neo4j.server.database.LifecycleManagingDatabase#325ce05c was successfully initialized, but failed to start. Please see attached cause exception.
Logged in as windows local admin. Windows FWall is off. There's no antivirus SW installed on the machine. Local admin has full perms on entire root drive. When I point to the default db, Neo4j server starts normally and I can browse http://localhost:7474/ without a problem.
Any lead will be appreciated.
The aforementioned error message was the result of using a Neo4j version different to the one the graph db was originally developed. In particular, the original graph db was developed in ver 2.0.4 Community that due to my lack of knowledge I was trying to run on an installation of Neo4j ver. 2.2.0-M02 (for development only).
The code owner enlightened me to the fact and an attempt to bring up the graph db on ver. 2.0.4 Community was successful.
Thanks for your support.
Delete the folder "c:\Users\Yourname\MyDocuments\Neo4j"
I removed the plugins that were loaded from <NEO4J_HOME>/plugins as they were also loaded from under <DATABASE_HOME>/plugins

Resources