cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Cannot install APOC on neo4j 4.0.4 running on docker

Hi team !
newbie here having some hard time trying to install APOC on neo4J running on docker container.

My setup:
Windows 10 version 1909
Neo4J 4.0.4 community edition
Docker desktop 2.3.0.3 (45519 stable) community edition

My goal: install APOC plugin in neo4j db running in container.

The problem: when i start my container i get the following error (parse error:Invalid numeric literal at line 1, column 6)

parse error: Invalid numeric literal at line 1, column 6
Directories in use:
  home:         /var/lib/neo4j
  config:       /var/lib/neo4j/conf
  logs:         /logs
  plugins:      /var/lib/neo4j/plugins
  import:       /var/lib/neo4j/import
  data:         /var/lib/neo4j/data
  certificates: /var/lib/neo4j/certificates
  run:          /var/lib/neo4j/run
Starting Neo4j.
2020-06-08 11:23:05.417+0000 INFO  ======== Neo4j 4.0.4 ========
2020-06-08 11:23:05.427+0000 INFO  Starting...
2020-06-08 11:23:10.419+0000 INFO  Bolt enabled on 0.0.0.0:7687.
2020-06-08 11:23:10.420+0000 INFO  Started.
2020-06-08 11:23:11.704+0000 INFO  Remote interface available at http://localhost:7474/

The container is up and running, Neo4J database is working (i can access it throuhg neo4 browser) however, APOC plugin is not installed :

call apoc.help("asdas")

#### Neo.ClientError.Procedure.ProcedureNotFound

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

I'm pretty sure the problem is related to the way I am setting up the environment variables .

I have tried the following:

docker run --name test --publish=7474:7474 --publish=7687:7687  --env='NEO4JLABS_PLUGINS=["apoc"]' --env=NEO4J_AUTH=none neo4j:latest
 docker run --name test --publish=7474:7474 --publish=7687:7687  --env 'NEO4JLABS_PLUGINS=["apoc"]' --env=NEO4J_AUTH=none neo4j:latest
 docker run --name test --publish=7474:7474 --publish=7687:7687  --env=NEO4JLABS_PLUGINS=["apoc"] --env=NEO4J_AUTH=none neo4j:latest

Can you guys point me the right direction ?

Best regards

Rui Madaleno

1 ACCEPTED SOLUTION

well after a few tries I've managed to run my neo4j container with APOC !!

I enclosed the NEO4JLABS_PLUGIN in single quote and escaped the double quote

'NEO4JLABS_PLUGINS=[\"apoc\"]'  --env=NEO4J_AUTH=none neo4j:latest

The result (log from my container)

Fetching versions.json for Plugin 'apoc' from https://neo4j-contrib.github.io/neo4j-apoc-procedures/versions.json
Installing Plugin 'apoc' from https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/4.0.0.13/apoc-4.0.0.13-all.jar to /var/lib/neo4j/plugins/apoc.jar
Applying default values for plugin apoc to neo4j.conf
Skipping dbms.security.procedures.unrestricted for plugin apoc because it is already set
Directories in use:
  home:         /var/lib/neo4j
  config:       /var/lib/neo4j/conf
  logs:         /logs
  plugins:      /var/lib/neo4j/plugins
  import:       /var/lib/neo4j/import
  data:         /var/lib/neo4j/data
  certificates: /var/lib/neo4j/certificates
  run:          /var/lib/neo4j/run
Starting Neo4j.
2020-06-08 11:59:51.246+0000 INFO  ======== Neo4j 4.0.4 ========
2020-06-08 11:59:51.256+0000 INFO  Starting...
2020-06-08 12:00:04.259+0000 INFO  Called db.clearQueryCaches(): Query cache already empty.
2020-06-08 12:00:04.368+0000 INFO  Bolt enabled on 0.0.0.0:7687.
2020-06-08 12:00:04.370+0000 INFO  Started.
2020-06-08 12:00:05.685+0000 INFO  Remote interface available at http://localhost:7474/

Thank you all for pointing me the right direction

Best regards

Rui Madaleno

View solution in original post

4 REPLIES 4

You're very close. The NEO4JLABS_PLUGIN env should be --env=NEO4JLABS_PLUGINS='["apoc"]'
bash doesn't like the square brackets.

I have the same issue regarding apoc running in docker.

I have the same issue How can I fix it ?

Here is the link : https://community.neo4j.com/t5/drivers-stacks/neo4j-with-shortestpath-by-using-many-cities-with-its-...

well after a few tries I've managed to run my neo4j container with APOC !!

I enclosed the NEO4JLABS_PLUGIN in single quote and escaped the double quote

'NEO4JLABS_PLUGINS=[\"apoc\"]'  --env=NEO4J_AUTH=none neo4j:latest

The result (log from my container)

Fetching versions.json for Plugin 'apoc' from https://neo4j-contrib.github.io/neo4j-apoc-procedures/versions.json
Installing Plugin 'apoc' from https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/4.0.0.13/apoc-4.0.0.13-all.jar to /var/lib/neo4j/plugins/apoc.jar
Applying default values for plugin apoc to neo4j.conf
Skipping dbms.security.procedures.unrestricted for plugin apoc because it is already set
Directories in use:
  home:         /var/lib/neo4j
  config:       /var/lib/neo4j/conf
  logs:         /logs
  plugins:      /var/lib/neo4j/plugins
  import:       /var/lib/neo4j/import
  data:         /var/lib/neo4j/data
  certificates: /var/lib/neo4j/certificates
  run:          /var/lib/neo4j/run
Starting Neo4j.
2020-06-08 11:59:51.246+0000 INFO  ======== Neo4j 4.0.4 ========
2020-06-08 11:59:51.256+0000 INFO  Starting...
2020-06-08 12:00:04.259+0000 INFO  Called db.clearQueryCaches(): Query cache already empty.
2020-06-08 12:00:04.368+0000 INFO  Bolt enabled on 0.0.0.0:7687.
2020-06-08 12:00:04.370+0000 INFO  Started.
2020-06-08 12:00:05.685+0000 INFO  Remote interface available at http://localhost:7474/

Thank you all for pointing me the right direction

Best regards

Rui Madaleno