Skip to content
Gabor Szarnyas edited this page Apr 25, 2023 · 19 revisions

APOC CSV loader

  • Error:

    Failed to invoke procedure `apoc.import.csv`:
      Caused by: java.lang.IllegalStateException: No match found 
    org.neo4j.graphdb.QueryExecutionException: Failed to invoke procedure `apoc.import.csv`:
      Caused by: java.lang.IllegalStateException: No match found
  • Solution: Double-check the header of the CSV file and the provided delimiter.

Graph Data Science library

  • Error:

    Caused by: java.lang.NullPointerException: Configured default provider: `native-btree-1.0` not found. Available index providers: [].
  • Solution: The problem is mixed versions such as using GDS 1.2 with Neo4j 3.5 (instead of 4.0).

Import tool erros with "directory does not exist"

  • Error: The neo4j-admin import tool fails with:

    Directory of /some/path/to/file.csv doesn't exist
  • Solution: A likely cause of this problem is using Neo4j 3.x importer with the arguments intended for Neo4j 4.x.

Start Neo4j in Docker

Use a similar command:

docker run --rm \
    --user="$(id -u):$(id -g)" \
    --publish=7474:7474 \
    --publish=7687:7687 \
    --detach \
    ${NEO4J_ENV_VARS} \
    --volume=${NEO4J_DATA_DIR}:/data \
    --volume=${NEO4J_CONTAINER_ROOT}/logs:/logs \
    --volume=${NEO4J_CONTAINER_ROOT}/import:/var/lib/neo4j/import \
    --volume=${NEO4J_CONTAINER_ROOT}/plugins:/plugins \
    --env NEO4JLABS_PLUGINS='["apoc", "graph-data-science"]' \
    --env NEO4J_AUTH=none \
    --name ${NEO4J_CONTAINER_NAME} \
    neo4j:${NEO4J_VERSION}

To run the Enterprise edition, consult the license agreement and pass:

export NEO4J_VERSION=4.4.2-enterprise
export NEO4J_ENV_VARS="--env=NEO4J_ACCEPT_LICENSE_AGREEMENT=yes"

The Enterprise edition supports the parallel runtime. To use this, preprend the query with CYPHER runtime=parallel:

CYPHER runtime=parallel MATCH (p:Person) RETURN count(p)

Copy-paste snippet (v4.4.2 Community Edition) with ephemeral (non-mounted) directories:

docker run --rm \
    --user="$(id -u):$(id -g)" \
    --publish=7474:7474 \
    --publish=7687:7687 \
    --detach \
    --env NEO4JLABS_PLUGINS='["apoc", "graph-data-science"]' \
    --env NEO4J_AUTH=none \
    neo4j:4.4.2

Too many open files

  • Error:

    The problem occurs when Neo4j is run in Docker.

    ERROR StatusLogger Unable to create file /var/lib/neo4j/metrics/neo4j.dbms.pool.bolt.total_size.csv
    java.io.IOException: Too many open files
            at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method)                       
            at java.base/java.io.File.createNewFile(File.java:1035)   
  • Solution:

    Add --ulimit nofile=40000:40000 to the docker run command.

    To confirm that the default limit for the number of open files is indeed too low, run docker exec -it <container_name> /bin/bash and issue ulimit -n. If this is returns 1024, the problem is indeed the too low limit.

Permission issues when mounting on macOS

  • Error:

    Version 4.4.3+ displays the following when run in Docker on macOS:

    Folder /data is not accessible for user: 501 or group 20 or groups 20, this is commonly a file permissions issue on the mounted folder.
  • Solution:

    ?

Plugin not writeable when using APOC from Docker

When adding --env NEO4J_PLUGINS='["apoc"]' or --env NEO4JLABS_PLUGINS='["apoc"]' to the Docker image, the following error is displayed:

Installing Plugin 'apoc' from /var/lib/neo4j/labs/apoc-*-core.jar to /plugins/apoc.jar
Plugin at '/plugins/apoc.jar' is not readable

This happens because Neo4j v5 has APOC built-in, so there is no need to install it.

Clone this wiki locally