Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
10-28-2022 03:49 AM
After upgrading neo4j to version 5.1.0 (from 4.4.x) the server does not start anymore.
Error Message:````
Failed to read config /etc/neo4j/neo4j.conf: Unrecognized setting. No declared setting with name: apoc.export.file.enabled
But there is exactly this entry in my neo4j.conf
#*****************************************************************
# Neo4j configuration
#
# For more details and a complete list of settings, please see
# https://neo4j.com/docs/operations-manual/current/reference/configuration-settings/
#*****************************************************************
# The name of the default database
#dbms.default_database=neo4j
# Paths of directories in the installation.
dbms.directories.data=/var/lib/neo4j/data
dbms.directories.plugins=/var/lib/neo4j/plugins
dbms.directories.logs=/var/log/neo4j
dbms.directories.lib=/usr/share/neo4j/lib
#dbms.directories.run=run
#dbms.directories.transaction.logs.root=data/transactions
# This setting constrains all `LOAD CSV` import files to be under the `import` directory. Remove or comment it out to
# allow files to be loaded from anywhere in the filesystem; this introduces possible security problems. See the
# `LOAD CSV` section of the manual for details.
dbms.directories.import=/var/lib/neo4j/import
# Whether requests to Neo4j are authenticated.
# To disable authentication, uncomment this line
#dbms.security.auth_enabled=false
# Enable this to be able to upgrade a store from an older version.
dbms.allow_upgrade=true
#*******************************************************************
# APOC settings
#*******************************************************************
apoc.ttl.enabled=true
# should be 24 hours
apoc.ttl.schedule=86400
dbms.security.procedures.unrestricted=apoc.*
apoc.export.file.enabled=true
So I don't really get the error message an how the config file can be updated properly.
Solved! Go to Solution.
10-28-2022 04:25 AM
Hello @BairDev
Neo4j 5 uses stricter checking on the neo4j.conf file by default - the error message is saying that you need to remove that setting. Does commenting that setting make the error go away?
10-28-2022 04:25 AM
Hello @BairDev
Neo4j 5 uses stricter checking on the neo4j.conf file by default - the error message is saying that you need to remove that setting. Does commenting that setting make the error go away?
10-28-2022 06:19 AM
Yes, that works!
Together with commenting out apoc.ttl.enabled
#*******************************************************************
# APOC settings
#*******************************************************************
## apoc.ttl.enabled=tru
# should be 24 hours
# apoc.ttl.schedule=86400
dbms.security.procedures.unrestricted=apoc.*
# apoc.export.file.enabled=true
11-03-2022 02:39 AM
Hi,
I ran into the same error and commented out the relevant lines but then got an error. I also tried following the instructions on the apoc readme: https://github.com/neo4j/apoc#using-apoc-with-the-neo4j-docker-image.
Error:
"""
ERROR Failed to start Neo4j on 0.0.0.0:7474.
java.lang.RuntimeException: Error starting Neo4j database server at /data/databases
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:255) ~[neo4j-5.1.0.jar:5.1.0]
....
Failed to build kernel extension Extension:RegisterComponentFactory[ApocRegisterComponent] because it is compiled with a reference to a class, method, or field, that is not in the class path: ''org.neo4j.logging.Log org.neo4j.logging.internal.LogService.getUserLog(java.lang.Class)''. The most common cause of this problem, is that Neo4j has been upgraded without also upgrading allinstalled extensions, such as APOC. Make sure that all of your extensions are build against your specific version of Neo4j.
"""
docker_compose.yml after commenting out for error.
"""
services:
neo4j:
image: neo4j
build: ./neo4j
ports:
- 7474:7474
- 7687:7687
environment:
#- NEO4J_apoc_import_file_use__neo4j__config=true
#- NEO4J_dbms_security_procedures_unrestricted=apoc.\\\*
#- NEO4J_apoc_export_file_enabled=true
#- NEO4J_apoc_import_file_enabled=true
#- NEO4J_dbms_shell_enabled=true
- NEO4J_PLUGINS=["apoc"]
"""
11-04-2022 04:43 AM
Looks like a version mismatch - did you get the correct version of apoc for your version of neo4j?
11-18-2022 02:07 PM
What's the recommended way to export if this is disabled?
for example, apoc.export.graphml.query fails with:
Failed to invoke procedure `apoc.export.graphml.query`: Caused by: java.lang.RuntimeException: Export to files not enabled, please set apoc.export.file.enabled=true in your apoc.conf.
Otherwise, if you are running in a cloud environment without filesystem access, use the `{stream:true}` config and null as a 'file' parameter to stream the export back to your client.
11-18-2022 02:10 PM
If you wanted graphml export, then it seems like you would want to enable? It's probably best to open a new thread and provide the full details of what's going on to get the best help.
11-18-2022 02:17 PM
I can open a new thread but it's exactly the same issue. Commenting out the line allows the docker image/neo4j to start but obviously disables exporting altogether, including it results in the error described in the original post
sg_neoloc='somdirectory'
docker run \
--user=$(id -u):$(id -g) \
-p7474:7474 -p7687:7687 \
-v $sg_neoloc/data:/data \
-v $sg_neoloc/logs:/logs \
-v $sg_neoloc/import:/var/lib/neo4j/import \
-v $sg_neoloc/plugins:/plugins \
-v $sg_neoloc/conf:/var/lib/neo4j/conf \
-env NEO4J_apoc_export_file_enabled=true \
-env NEO4J_apoc_import_file_enabled=true \
-env NEO4J_apoc_import_file_use__neo4j__config=true \
--env NEO4J_AUTH=neo4j/test \
--env NEO4J_PLUGINS='["apoc", "graph-data-science"]' \
--env NEO4J_server_memory_heap_initial__size='23000m' \
--env NEO4J_server_memory_heap_max__size='23000m' \
--env NEO4J_server_memory_pagecache_size='20g' \
--env NEO4J_server_jvm_additional='-XX:+ExitOnOutOfMemoryError' \
neo4j:5.1.0
11-18-2022 02:20 PM
OK I gotcha now. I'm looking at the docs for 5.0, and I don't see that procedure anymore. Let me reach out internally and see what I can find.
11-21-2022 05:55 AM
Apparently if you use "-e apoc.export.file.enabled=true" in your docker run it should work. I also got myself twisted around and was looking at the apoc labs docs and not the core docs. It's in there - the "-e apoc.export.file.enabled=true" is a workaround for now.
11-22-2022 01:48 PM
I wasn't able to get it to work through docker env. I had to create an apoc.conf as described here:
https://community.neo4j.com/t5/neo4j-graph-platform/setting-apoc-import-file-enabled-true-in-your-ne...
All the sessions of the conference are now available online