apoc.meta.graph is unavailable because it is sandboxed and has dependencies outside of the sandbox

In this post, I will explain a fix for a common problem with Neo4j installed on the docker container. If the parameter “dbms.security.procedures.unrestricted” is not set correctly and you try to run “CALL apoc.meta.graph()” in Neo4j Browser, it will give the following error message:apoc.meta.graph is unavailable because it is sandboxed and has dependencies outside of the sandbox. Sandboxing is controlled by the dbms.security.procedures.unrestricted setting. Only unrestrict procedures you can trust with access to database internals.

To fix this error, you need to update the configuration file of Neo4j and restart the Docker container.

Here are the steps to find the Neo4j configuration file on the Docker container and update it:

  • Find the container id/name using the following command:
docker ps -a
  • Start the Docker container by running the following command on the terminal (replace docker_name with your docker container where Neo4j is installed):
docker start <docker_name>
  • Use the following command to log in to the Docker container (Replace <container_id_or_name> with the actual ID or name of the container you want to log in to.):
docker exec -it <container_id_or_name> bash
  • Once inside the Docker container, find the configuration file of Neo4j using the following command:
find / -type f -name "neo4j.conf"
  • You might get more than one configuration file. Edit the file present in the folder “neo4j/conf/“. Add or update the parameter “dbms.security.procedures.unrestricted” and save the file.
  • Stop and start the Docker container, and the problem should be fixed.
docker stop <docker_name>
docker start <docker_name>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.