I'm currently facing an issue while trying to start a Docker container with the APOC plugin by following the instructions outlined in the Neo4j documentation: Installation - APOC Documentation.
The provided command is intended to run Neo4j 5.17.0 in a Docker container with the latest version of the APOC Library:
Your docker run worked when I tried it. What is the output if you add -e NEO4J_DEBUG=true ?
Another option is that whatever shell you're using doesn't like the escaping around the NEO4J_PLUGINS env. What happens if you try -e NEO4J_PLUGINS='["apoc"]' instead?
Thanks for the response. I have tried with and without escaping around the NEO4J_PLUGIN. I am getting the same error.
Blockquotedocker run --rm -p 7474:7474 -p 7687:7687 --name neo4j-apoc -e NEO4J_apoc_export_file_enabled=true -e NEO4J_apoc_import_file_enabled=true -e NEO4J_apoc_import_file_use__neo4j__config=true -e NEO4J_DEBUG=true -e NEO4J_PLUGINS='["apoc"]' neo4j:5.17.0
DEBUGGING ENABLED
Running as root user inside neo4j image
chowning /var/lib/neo4j recursively to neo4j:neo4j
Setting all files in /var/lib/neo4j/conf to permissions 600
checking /logs is writable
checking /data is writable
checking /data/databases is writable
checking /data/transactions is writable
One or more NEO4J_PLUGINS have been requested.
Checking requested plugins are known and can be installed.
parse error: Invalid numeric literal at line 1, column 2
parse error: Invalid numeric literal at line 1, column 2
Setting docker specific configuration overrides
Appended server.memory.pagecache.size=512M to /var/lib/neo4j/conf/neo4j.conf
Appended server.default_listen_address=0.0.0.0 to /var/lib/neo4j/conf/neo4j.conf
Applying configuration settings that have been set using environment variables.
Removing existing setting for server.directories.logs in /var/lib/neo4j/conf/neo4j.conf
Appended server.directories.logs=/logs to /var/lib/neo4j/conf/neo4j.conf
Appended apoc.import.file.use_neo4j_config=true to /var/lib/neo4j/conf/apoc.conf
Appended apoc.import.file.enabled=true to /var/lib/neo4j/conf/apoc.conf
Appended apoc.export.file.enabled=true to /var/lib/neo4j/conf/apoc.conf
Setting initial password from environment
getting full neo4j run command
exec su-exec neo4j:neo4j /opt/java/openjdk/bin/java -cp /var/lib/neo4j/plugins/:/var/lib/neo4j/conf/:/var/lib/neo4j/lib/* -XX:+UseG1GC -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:+UnlockExperimentalVMOptions -XX:+TrustFinalNonStaticFields -XX:+DisableExplicitGC -Djdk.nio.maxCachedBufferSize=1024 -Dio.netty.tryReflectionSetAccessible=true -Djdk.tls.ephemeralDHKeySize=2048 -Djdk.tls.rejectClientInitiatedRenegotiation=true -XX:FlightRecorderOptions=stackdepth=256 -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -Dlog4j2.disable.jmx=true -Dfile.encoding=UTF-8 org.neo4j.server.CommunityEntryPoint --home-dir=/var/lib/neo4j --config-dir=/var/lib/neo4j/conf --console-mode
2024-03-08 11:07:28.628+0000 INFO Logging config in use: File '/var/lib/neo4j/conf/user-logs.xml'
2024-03-08 11:07:28.653+0000 INFO Starting...
2024-03-08 11:07:29.418+0000 INFO This instance is ServerId{d62ab29b} (d62ab29b-7c83-4931-8206-6915edf46103)
2024-03-08 11:07:29.966+0000 INFO ======== Neo4j 5.17.0 ========
2024-03-08 11:07:32.482+0000 INFO Bolt enabled on 0.0.0.0:7687.
2024-03-08 11:07:33.030+0000 INFO HTTP enabled on 0.0.0.0:7474.
2024-03-08 11:07:33.030+0000 INFO Remote interface available at http://localhost:7474/
2024-03-08 11:07:33.034+0000 INFO id: BB9D573D02B05035658E6AC1365C0C09139C52C69F1655E8779309447F82D7DF
2024-03-08 11:07:33.034+0000 INFO name: system
2024-03-08 11:07:33.035+0000 INFO creationDate: 2024-03-08T11:07:30.585Z
2024-03-08 11:07:33.035+0000 INFO Started.
I have tried both windows CMD and powershell, could you please help me out?
It looks as though something is definitely going wrong when the image is trying to parse the NEO4J_PLUGINS string.
Inside the image, it parses NEO4J_PLUGINS using jq so echo NEO4J_PLUGINS='["apoc"]' | jq will reproduce the problem much quicker (although I don't know what the windows equivalent of that command would be).
Since you're using windows I recommend also checking that the double quote " hasn't been replaced with some similar looking kind of double quote.
I use docker compose (v2) on Linux and the notation of the env var turned out to be very sensitive.
I had to endure this error message:
neo4j-1 | parse error: Invalid numeric literal at line 1, column 2