sorry to bother you. I am trying to set up an ecosystem for a graph database that is going to be used by an application.
I am going to use the gremlin-client container:
Gremlin-Console docker
Also i am going to use gremlin-server container:
Gremlin-Server container
And finally i want to use the neo4j container as the storage layer:
Neo4j container
I have read all the docker-files and i was able to connect the console with the server. But now i need to connect the gremlin server container to the neo4j container. I have several links on the web but i was not able to complete this task. It gives me an error of server failure when i tried to connect to neo4j through gremlin-server by running the gremlin-server.sh file .
I have downloaded the repository in order to change the docker-file to fit my needs. Does anyone has experience and knows the correct procedure on how to accomplish the connection between the neo4j container with the gremlin server container and making queries through the gremlin console container?
Please any help would be really appreciated.
Thanks in advance,
Juan Ignacio
Since you want to use Neo4j Server you're basically asking how to connect Gremlin Server to a Neo4j Server which was asked in this question. You must 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
Once you have Gremlin Server connected to Neo4j Server you can then connect Gremlin Console to Gremlin Server through "remoting" discussed here.
In your comments below, you alluded to the fact that you really just want to use Gremlin Console with Neo4j. I brought up the options above because you referenced use of Docker containers and specifically Neo4j Server. Note that you can get going very quickly with Neo4j in embedded mode directly in the Gremlin Console which is discussed in detail here. In that case there is no need for Docker, Neo4j Server, etc.
If you must use Neo4j Server/Docker for some reason and connect to it from the Gremlin Console, then you will still go with one of the two options discussed above, either (1) HA Mode or (2) neo4j-gremlin-bolt but you would simply create those Graph instances in Gremlin Console. For HA mode, that would mean the Gremlin Console would effectively become a node in the Neo4j cluster and for neo4j-gremlin-bolt your Graph instance would just connect over the Bolt protocol.
Related
I use Neo4j as the backend database for my web application. I'm looking at AWS Copilot to manage the services, migrating away from Docker Compose. For the last 5 years I've run Neo4j in a Docker container on an EC2 instance with the data persisted on an external EBS volume.
I'm finding the Copilot docs show how to set up a static website with no database, or (possibly) how to connect to one of their in-bred storage solutions like DynamoDB. On the Neo4j side, all I see is how to set up the Neo4j AMI from the AWS Marketplace.
Could anyone explain or point me to an example of how to use AWS Copilot to deploy Neo4j in a Docker container and link it to a web service? Or, if this is a bad idea, what would be a better approach?
Here is the scenario I want to resolve: I have two environments: a local machine and a virtual machine hosted in Azure
In the virtual machine I start a gremlin container which includes the gremlin client, server and connects to a cassandra graph database.
This is the information of the container running when i run the docker container ls command:
CONTAINER ID: 029095e26f53
IMAGE: 3f03c6bfb0a2
COMMAND: "/bin/sh -c /gremlin…"
CREATED: 2 weeks ago
STATUS: Up 2 weeks
PORTS: 0.0.0.0:8182->8182/tcp
NAME: gremlin
When I enter inside the container, I run the following command in order to run the gremlin client:
./bin/gremlin.sh
Once inside the gremlin console i run the following command to connect to the tinkerpop server:
:remote connect tinkerpop.server conf/remote.yaml
==>Connected - localhost/127.0.0.1:8182 ---> answer from gremlin console
If I run the following gremlin query:
:> g.V().count()
I get a number different from zero, telling me that there are a records on the graph database.
Now on the other side I have the Gephi client on my local machine which I want it to be able to show that graph database. Or at least, make Gephi to show the the visual data from a
graph = TinkerFactory.createModern()
running inside the gremlin container.
I want to do this because I need to choose a visualization tool for gremlin and titan ecosystem.
I tried to set up Gephi client feature to connect to the virtual machine's ip and the port 8182 but it shows me the red dot telling me that is not possible. What am i missing? I am pretty sure there are a few steps missing. Thanks in advance,
Juan Ignacio
If your graph is "remote" and not in-memory in the Gremlin Console then you have to devise a way to make it available locally that way. This situation is typical for Graphs that run in Gremlin Server or are wholly remote like CosmosDB, DSE Graph or Amazon Neptune.
They typical method to make it available locally is to use [subgraph()][1]-step to pull out just the portion of the graph that you care about and return that to the Gremlin Console. It will be returned as a TinkerGraph for graphs that support subgraph()-step (like Titan, though I assume you would use JanusGraph), so for your test which is using TinkerFactory and a tiny graph you could just do this:
gremlin> :remote connect tinkerpop.server conf/remote-objects.yaml
Note the configuration of "remote-objects.yaml" because that configuration will return actual objects - an actual TinkerGraph rather than a string representation of a TinkerGraph.
gremlin> :> TinkerFactory.createModern()
That will create the "modern" graph remotely and return the TinkerGraph to the Gremlin Console. You can access that result
gremlin> graph = result[0].object
The :> stores the response from the server in a variable named "result" and that contains your TinkerGraph in a List. This is explained in the reference documentation. From there you can use that "graph" object as you would using the standard Gephi instructions.
I'm a newbie with Neo4j and I am attempting to set up a local Neo4j Causal Cluster where all nodes are on the same machine (CENTOS6.6 x64). I can login to each node through Firefox browser using localhost:7474, localhost:7475, localhost:7476. However, when I try to create a node/database it just shows spinning wheel and never stops.
I tried using :sysinfo and it shows all nodes with correct leader and followers and port numbers.
I can use the cypher-shell and it allows me to create nodes and run match queries etc.
I've disabled firewall and stopped iptables and diabled proxy settings but it still won't let me create a node through the browser.
Any help would be greatly appreciated.
I am running two neo4j instance on one server but with different port. I changed port in neo4j.conf file, I am able to run it properly.
Now, when I execute the cypher query to create a node in the second instance from neo4j-shell, it is creating nodes in first instance.
I have not configured any database path. Assuming it will consider neo4j default database path i.e. data\databases\graph.db.
Please help me with my mistake.
I see a few option of neo4j-shell and It has -port. You can change it with used port or you review property such as path, file, config.
You should text ./neo4j-shell -help to see them.
I want to create a social network in django framework in Openshift then I need at least a graph db (like Neo4j)and a relational db (like Mysql). I had trouble in add Neo4j to my project because openshift has not any cartridge for it. then I decide to install it with DIY, but I don't understand the functionality of start and stop files in .openshift/action hooks.Then I doing the following steps to install neo4j on server:
1.ssh to my account:
ssh 1238716...#something-prolife.rhcloud.com
2.go in a folder that have permission to write (I go to app-root/repo/ and mkdir test in it) and download the neo4j package from here. and extract it to the test folder that I created before :
tar -xvzf neo4j-community-1.9.4-unix.tar.gz
3.and finally run the neo4j file and start it:
neo4j-community-1.9.4/bin/neo4j start
but I see these logs and can't run the neo4j:
process [3898]... waiting for server to be ready............ Failed
to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.
how can I run this database in openshift ? where I am wrong ? and where is the logs in please check the logs?
I've developed an openshift cartridge that fixes the permission issue in openshift. I had to change the class HostBoundSocketFactory and SimpleAppServer in neo4j just to bind without using the 0 port, but using an openshift available port.
You can check at: https://github.com/danielnatali/openshift-neo4j-cartridge
it's working for me.
I would also not place it in the app-root/repo but instead I would put it in app-root/data.
You also need to use the IP of the gear - I think the env. variable is something like OPENSHIFT_INTERAL_IP. 127.0.0.1 is not available for binding but I think the ports should be open.
There are 2 ways neo4j can run : embedded or standalone(exposed via a rest service).
Standalone is what you are trying to do. I think the right way to setup neo4j would be by writing a cartridge for openshift, and then add the cartridge to your gear. There has been some discussion about this, but it seems that nobody has taken the time to do this. Check https://www.openshift.com/forums/openshift/neo4j-cartridge. If you decide to write your own cartridge, i might assist. Here are the docs: https://www.openshift.com/developers/download-cartridges.
The other option is running in embedded mode, which i have used. You need to set up a Java EE application(because neo4j embedded mode libraries are available only with java), and put the neo4j libraries in your project. Then, you would expose some routes, check for parameters and run your neo4j queries inside the servlets.