neo4j database started via windows service not accessible remotely - neo4j

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.

Related

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/

Attaching a Vagrant-hosted Gremlin-Server as a Data Source in PhpStorm

I am running the Gremlin-Server from this Tinkerpop Docker Image within a Vagrant box. I am trying to link this server as a data source so that I can utilize the "Graph Database Console" plugin in PhpStorm. I am attempting to do this through the driver wizard workflow.
However, in the class dropdown it won't give me any configuration options other than java.sql.Driver. It does give me the option of connecting custom driver files, but I am not sure which file I would need to attach from the Gremlin-Server docker image.
What steps would it take to connect a Gremlin-Server as a data-source in PhpStorm?
As it turns out, the TinkerPop3 stack does not offer a JDBC Driver, as it is not neccessarily a database in-and-of itself. There is a SQL port of Gremlin which is purportedly working on a JDBC driver for Gremlin-Server, but there is no option to currently reference a local hosted Gremlin-Server.
However in this instance there is a plugin for PhpStorm called Graph Database Support which allows you to then configure a Local Graph Database by pointing to your local environment and port. In my case it was a Vagrant IP address and a forwarded Docker port which meets that need.

Neo4j 3.0 setup issues

With neo4j 2.3.x community edition I use to set the ip address to local host and change the port to allow multiple instances for development.
#org.neo4j.server.webserver.address=0.0.0.0
org.neo4j.server.webserver.port=7384
Upon starting the instance, I use to have a confirmation message with ip and port.
Starting Neo4j Server...WARNING: not changing user
process [28531]... waiting for server to be ready........ OK.
http://localhost:7384/ is ready.
I would then upload data using a shell script and cypher commands.
$neo/bin/neo4j-shell -path $neo/data/graph.db -file upload.cypher
With neo4j 3.0, the server setup slightly changed. I turned on HTTP connection, CSV import, and shell connection.
dbms.connector.http.enabled=true
dbms.connector.http.address=localhost:7384
dbms.shell.enabled=true
# dbms.shell.host=127.0.0.1
dbms.shell.port=1387
When I start the instance, I get the following message in which the port is not correct.
Starting Neo4j.
Started neo4j (pid 28718). By default, it is available at http://localhost:7474/
There may be a short delay until the server is ready.
Uploading data with the same shell script as for neo4j-2.3.x works well, no error message and I can see the data using neo4j-shell.
./neo4j-3.0.0/bin/neo4j-shell -path neo4j-3.0.0/data/graph.db
However, when I connect using host and port instead, I see no data. Furthermore, when I connect using the web interface, I see no data either.
./neo4j-3.0.0/bin/neo4j-shell -host localhost -port 1387
Is there anything wrong in my database setup?
Thanks!
In 3.0 the location of the datastore has changed. 2.x used data/graph.db, in 3.0 it's by default in data/databases/graph.db. So you want to change your setup script to:
./neo4j-3.0.0/bin/neo4j-shell -path neo4j-3.0.0/data/databases/graph.db

spring data neo4j, how to access database by broswer when database is loaded by tomcat

I use <neo4j:config storeDirectory="/neo4j/target/data/db"> to config my neo4j database path,
and when tomcat started, the database files are locked by tomcat, and I can't start it using Neo4j official start tool, so how can I access my database in broswer like localhost:7474, or can spring connect a lunched neo4j server like mysql? and then I can access it through broswer.
You can work with one graph instance from one place only. If you are using it via tomcat in your code you wont be able to start it from the community tool. You would need to stop your tomcat and then run the tool to view it in the browser.

How to update the Neo4j webadmin without restarting the server?

I have a Neo4j server running on my machine and access the database via the webadmin interface. Then I run a java application which writes data to the database using the Java API and exists afterwards.
If I then try to see the new data in the webadmin, I have to restart the Neo4j server (refreshing doesn't help).
How can I refresh the webadmin without having to restart the server?

Resources