5

I have a docker-compose.yml to build a Neo4j container with neo4j plugin apoc:

neo4j:
    image: neo4j:4.4.14
    container_name: neo4j
    ports:
      - 7473:7473
      - 7474:7474
      - 7687:7687
    volumes:
      - "../data/neo4j:/var/lib/neo4j/data"
      - "../data/neo4j-plugins:/var/lib/neo4j/plugins"
    environment:
      - NEO4J_AUTH=neo4j/letoai
      - NEO4J_ACCEPT_LICENSE_AGREEMENT=yes
      - NEO4JLABS_PLUGINS=["apoc"]
      - NEO4J_dbms_security_procedures_whitelist=apoc.*
      - NEO4J_dbms_security_procedures_unrestricted=apoc.*

I have a Macbook M2 machine.

The problem is that I got the following error every time that i run docker compose up.

 Plugin at '/var/lib/neo4j/plugins/apoc.jar' is not readable

The thing is that the .jar that contains the plugin is downloaded in the path that is expected to be, but as a result of the installation failing the neo4j exits with status code 1.

  • what if you delete the existing plugin and try again? Why do you even expose the plugins directory? Are you using any custom plugins? – Tomaž Bratanič Jan 06 '23 at 11:14
  • I think the problem is related to some permission problems in the folder where the file.jar that contains the plugin is installed. Because I removed everything related to the container and the first time is installed perfectly. Then when i try to run again the container the same problem appears. – Santiago Galiano Segura Jan 07 '23 at 10:03
  • have you solved this issue? – Tuucan Mar 24 '23 at 08:14
  • The thing is that building the container the first times works properly, but when you try to restart o rebuild and you have the plugin downloaded fails. – Santiago Galiano Segura Apr 12 '23 at 08:41
  • the issue is "obviuosly" with the file permissions of `/var/lib/neo4j/plugins` (..and of course, when it comes to it with `/var/lib/neo4j/data` ..i.e. your "mounted volumes") My assumption: Windows (docker compose) client on a linux docker host... Fix best: `docker volume create --name neo4j_data`... (use this in docker-compose `volumes.foo_bar.external:true`) and "access" it under `\\wsl.localhost\docker-desktop-data\data\docker\volumes\neo4j_data\_data` (in your file browser/client system) ... https://docs.docker.com/storage/volumes/ , ... – xerx593 May 28 '23 at 15:33
  • https://stackoverflow.com/questions/47444533/docker-compose-external-volume-path – xerx593 May 28 '23 at 15:37

1 Answers1

0

Removing the plugins volume worked for me (neo4j > 5.0).

volumes:
  ./plugins:/plugins # Remove this

Edit: apoc works without the volume. Haven’t tested with other plugins. And since you use v4 this may not help :/

mattorp
  • 31
  • 6