Closed Harbing closed 3 years ago
change your plugins directory as:
/var/lib/neo4j/plugins
and add:
-e NEO4J_dbms_security_procedures_unrestricted=apoc.\*
What are you missing? The error message gives you good idea what's wrong:
Import from files not enabled, please set apoc.import.file.enabled=true in your neo4j.conf
If you want more verbose docs, we're more than happy to see your contribution.
The docker config allows you to select libraries like apoc directly:
-e NEO4J_LABS=["APOC"]
we should update our docs to reflect that. /cc @mneedham @JMHReif
I have some problem getting this to work. The docker command I have:
docker run --publish=7474:7474 --publish=7687:7687 --name neo4j --volume=$HOME/neo4j/data:/data -v $HOME/neo4j/import:/var/lib/neo4j/import -e NEO4J_AUTH=none -e NEO4JLABS_PLUGINS=\[\"apoc\"\] neo4j
I run it from powershell, on windows 10 with wsl 2.
Running the exact same command from my bash running in wsl 2 it works.
@mastoj don't know about quoting in WSL2 - can you please play around with adding/removing backslashes?
At the end of the day docker image's entrypoint script should "see" NEO4JLABS_PLUGINS=["apoc"]
@sarmbruster. I tried that but can try some more and see if I figure it out.
closed as a valid answer has been provided
The docker config allows you to select libraries like apoc directly:
-e NEO4J_LABS=["APOC"]
we should update our docs to reflect that. /cc @mneedham @JMHReif
This now returns: Failed to read config: Unrecognized setting. No declared setting with name: LABS.
In recent versions Neo4j (>=5.0.0) that variable is called NEO4J_PLUGINS
.
In recent versions Neo4j (>=5.0.0) that variable is called
NEO4J_PLUGINS
.
Thanks @sarmbruster Just tried that but am getting the error: | Plugin at '/plugins/apoc.jar' is not readable
I tried to manually install it.
I had followed this post and manually downloaded APOC 3.5.06 in the plugin folder. https://community.neo4j.com/t/how-can-i-install-apoc-library-for-neo4j-version-3-4-6-edition-community/1495/2 I also modified the mentioned lines and changed my run script. But it still does not work.
Then you can run the docker with the following command:( you may need to change the exact folder and docker image name sudo docker run -e NEO4J_dbms_security_procedures_unrestricted=apoc.\* --publish=7474:7474 --publish=7687:7687 --volume=$HOME/neo4j/data:/data --volume=$HOME/neo4j/import:/import --volume=$HOME/neo4j/plugins:/plugins harbing/literature_map:191221_apoc_install_test
Then I would like to run Bao's code in the browser(http://localhost:7474/browser/) to load json file: call apoc.periodic.iterate(' UNWIND range(1,9) as num call apoc.load.json("file:///2000-10-0"+num+"all_raw.json") yield value return value limit 500 ',' MERGE (page:PAGE {id:value.DOI}) ON CREATE SET page.title = value.title FOREACH (refer IN [p in value.reference WHERE p.DOI IS NOT NULL | p.DOI] | MERGE (reference:REFERENCE {name:refer}) MERGE (page)<-[r:REFERENCEBY]-(reference)) ',{batchSize:10000})
But it gives me an error of: Failed to invoke procedure
apoc.periodic.iterate
: Caused by: java.lang.RuntimeException: Import from files not enabled, please set apoc.import.file.enabled=true in your neo4j.confI am wondering if there is a more detailed guidance to install the docker version. Thanks.
Best Harbing