2

I'm running Neo4j (v 3.1.3) within a Docker (v17.05.0-ce-rc1) container on OSX (v10.11.6) and I've "installed" the APOC jar file, see:

$ docker exec -it sandbox-db ls /plugins
apoc-3.1.3.6-all.jar

I also see the container is properly configured to pick up plugins from that location:

$ docker exec -it sandbox-db grep plugins conf/neo4j.conf
dbms.directories.plugins=/plugins

and I can see a reference in the logs to it:

$ docker exec -it sandbox-db grep apoc logs/debug.log
2017-04-26 17:26:13.744+0000 INFO  [o.n.k.i.DiagnosticsManager]  [classpath + loader.0] file:/plugins/apoc-3.1.3.6-all.jar

the complete logs: http://termbin.com/5i4q

yet, when I issue a call to an apoc procedure I get the following:

There is no procedure with the name apoc.periodic.iterate registered for this database instance. Please ensure you've spelled the procedure name correctly and that the procedure is properly deployed

what does "properly deployed" mean? and what could be wrong?

ekkis
  • 9,804
  • 13
  • 55
  • 105

3 Answers3

0

Works for me:

cp apoc-3.1.3.6-all.jar plugins/
docker run -v `pwd`:/data -v `pwd`/plugins:/plugins -p 7474:7474 neo4j:3.1.3

lists all apoc functions when I call apoc.help("") in browser.

Michael Hunger
  • 41,339
  • 3
  • 57
  • 80
0

ok. I figured it out. there was a apoc-3.1.3.6-all.jar file in the plugins/ directory but it did not contain a jar file! I must have downloaded it with curl and it failed but instead of letting me know, it wrote an HTML file with the error. grr...

did the download correctly and now everything works

ekkis
  • 9,804
  • 13
  • 55
  • 105
0

Answer in 2022

To enable APOC functions for neo4j when you run it in a container, set the NEO4JLABS_PLUGINS env variable to ["apoc"]. Take note the double quotes are part of the value, so you may need some escaping for them.

Example for docker run:

--env NEO4JLABS_PLUGINS='["apoc"]'

See https://neo4j.com/docs/operations-manual/current/docker/operations/#docker-neo4jlabs-pluginsneo4j.com

squall3d
  • 1,737
  • 14
  • 12