error while exporting neo4j to Graphml - neo4j

I'm trying to export Neo4j graph (with 4318 nodes & 8145 Relationships) for testing using gremlin-groovy-2.3.0 using:
g = new Neo4jGraph('/tmp/mygraph');
g.saveGraphML('mygraph.xml');
but getting list of errors when typing the 1st command in console (gremlin-groovy-2.3.0/bin/gremlin.bat), Last line of error:
Error: Component: 'org.neo4j.kernel.StoreLockerLifecycleAdapter#5e1a7112 was successfully initialized, but failed to start
I have copied the Neo4j database (\data\graph.db) to Gremli (gremlin-groovy-2.3.0/bin/tmp/mygraph).
Sometimes it runs without error but then shows below error:
how to export ?

Related

Issue connecting to Noe4j Aura with Python 'neo4j' driver

I attempted to connect neo4j aura database using Python but failed as "Unable to retrieve routing information".
from neo4j import GraphDatabase
from neo4j.debug import watch
uri = "neo4j+s://<id>.databases.neo4j.io"
driver = GraphDatabase.driver(uri, auth=("neo4j", "<password>"))
def workload(tx):
return tx.run("RETURN 1 as n").data()
with watch("neo4j"): # enable logging
with driver.session() as session:
session.write_transaction(workload)
driver.close()
Running above python scripts returned the following log:
Attempting to update routing table from IPv4Address(('<id>.databases.neo4j.io', 7687))
[#0000] C: <RESOLVE> <id>.databases.neo4j.io:7687
[#0000] C: <OPEN> xx.xxx.xxx.xxx:7687
[#C000] C: <SECURE> <id>.databases.neo4j.io
[#0000] C: <CONNECTION FAILED> BoltSecurityError: [SSLCertVerificationError] Connection Failed. Please ensure that your database is listening on the correct host and port and that you have enabled encryption if required. Note that the default encryption setting has changed in Neo4j 4.0. See the docs for more information. Failed to establish encrypted connection. (code 1: Operation not permitted)
Failed to fetch routing info 35.xxx.xxx.xxx:7687
[#0000] C: <ROUTING> Deactivating address IPv4Address(('<id>.databases.neo4j.io', 7687))
[#0000] C: <ROUTING> table={None: RoutingTable(database=None routers={}, readers={}, writers={}, last_updated_time=0.235748575, ttl=0)}
Attempting to update routing table from
Unable to retrieve routing information
Transaction failed and will be retried in 1.1281720312998946s (Unable to retrieve routing information)
I looked into neo4j documentation and searched other places but none of the possible resolutions can be found.
Version:
Python 3.7.4
neo4j 4.4.2
I very much appreciate your input if you have ever experienced the same issues and found any way to resolve the issue.

Failed to read from defunct connection (Jupyter notebook, python driver )

I try to import data into a Neo4j VM in Azure.
This code works:
def create_article(tx):
tx.run("CREATE (a:ARTICLE)")
session.read_transaction(create_article)
But this code doesn't work:
def create_node_article(tx, id, title, label):
tx.run("CREATE (a:ARTICLE {id:$id, title:$title, label:$label})", id=id, title=title, label=label)
for index, row in df_article_ids.iterrows():
session.read_transaction(create_node_article, row['id'], row['cleaned_best_title'], row['label'])
I have the error:
Transaction failed and will be retried in 1.0608892687544587s (Failed
to read from defunct connection Address(host='IP', port=7687)
(Address(host='IP', port=7687)))
I don't know what I have to change or check. I also tried Neo4j Desktop and I have the same error.
Neo4j version: 4.1.3

Error when using export-graphml in Neo4j 2.2

I am trying to use the export-graphml function in Neo4j 2.2. I have downloaded neo4j shell tools and extract it into the lib directory. I am able to export the entire database as a graphml file. However, if I try to export a subset using a query, I receive the following error:
Error occurred in server thread; nested exception is:
java.lang.NoSuchMethodError: org.neo4j.cypher.export.CypherResultSubGraph.from(Lorg/neo4j/cypher/javacompat/ExecutionResult;Lorg/neo4j/graphdb/GraphDatabaseService;Z)Lorg/neo4j/cypher/export/SubGraph;
The statement I used is:
export-graphml -o /path/to/file/out.graphml match (n:Person)-[r:RELATIONSHIP]-() WHERE n.id = 12345 return n, r
I have tried different variations with the different options (-r, -t) and none work

Elasticsearch river plugin for Neo4j: NoClassSettingsException[Failed to load class with value [neo4j]]

I am trying to make ES work with Neo4j and I followed the steps you said on the documentation. The thing is that I am having difficulties getting the connection done. ES doesn't has the values of NEo4j.
When I check for indexes on the ES the "_river" index is well created but some errors appear when i do:
curl http://localhost:9200/_river/_search?pretty=true&q=:
Here is the error:
{"error":"NoClassSettingsException[Failed to load class with value
[neo4j]]; nested: ClassNotFoundException[neo4j];
","node":{"id":"2rDeNA46SJ63jYFlpoGfKQ","name":"Zip-Zap","transport_address":"inet[/10.140.28.166:9300]"}}
When i get all the indexes from ES
(curl http://localhost:9200/_aliases?pretty=1)
I get:
{
"_river" : {
"aliases" : { }
}
Do you have an idea about what is the problem?
PS: the version used was the 1.1.1
The error is:
NoClassSettingsException Failed to load class with value neo4j nested:
ClassNotFoundException neo4j
Complete response:
http://p.shrib.com/lsfnzF3H?v=nc&s=m
Thanks in advance
I got the same error, and I think the installation instructions are missing one step:
Download "elasticsearch-river-neo4j-1.2.1.1.jar" from Click here and copy it to "HOME_DIRECTORY_OF_ES/lib" folder.
Doing this and an elasticsearch restart solved it for me.
Found at: Examples about Integration of Elasticsearch with neo4j

What does this Neo4j batch loader error number mean

I've been using the Neo4j batch loader for a while now and tonight started running into issues building my graph from a fresh database export. Running it yields the following:
> java -servjava -server -Xmx4G -jar ~/Dev/github.com/jexp/batch-import/target/batch-import-jar-with-dependencies.jar ./graph.db nodes.csv rels.csv node_index entities exact entities_idx.csv
Usage: Importer data/dir nodes.csv relationships.csv [node_index node-index-name fulltext|exact nodes_index.csv rel_index rel-index-name fulltext|exact rels_index.csv ....]
Using: Importer ./graph.db nodes.csv rels.csv node_index entities exact entities_idx.csv
Using Existing Configuration File
........................
Importing 2412268 Nodes took 4 seconds
.....................
Total import time: 9 seconds
Exception in thread "main" org.neo4j.graphdb.NotFoundException: id=2412269
at org.neo4j.unsafe.batchinsert.BatchInserterImpl.getNodeRecord(BatchInserterImpl.java:917)
at org.neo4j.unsafe.batchinsert.BatchInserterImpl.createRelationship(BatchInserterImpl.java:471)
at org.neo4j.batchimport.Importer.importRelationships(Importer.java:136)
at org.neo4j.batchimport.Importer.doImport(Importer.java:214)
at org.neo4j.batchimport.Importer.main(Importer.java:78)
I was able to successfully run the batch loader for the nodes.csv and rels.csv that are included in its own repository, so I'm thinking that the issue is somewhere in my rels.csv file. However, it's a pretty big file and I would like to know what id=2412269 means, as it seems like the best starting point for diagnosing the failure.
Any ideas?
_howard
This means that in the rels.csv file, you are trying to create a relationship for a node referenced by id = 2412269 . But no such node has been created in your nodes.csv file.
After working through the issue with the author of the importer, it turns out that the issue was that I had single, unescaped quotes in my nodes.csv file. So the rels.csv record was pointing to a node that could not be created in nodes.csv. Unfortunately, the error reported on the console was not exactly the error causing the issue.

Resources