简体   繁体   English

NEO4J:无法在以下位置加载外部资源:文件:/ var / lib / neo4j / import /

[英]NEO4J: Couldn't load the external resource at: file:/var/lib/neo4j/import/

I am running Neo4J on Docker within Vagrant. 我正在Vagrant的Docker上运行Neo4J。

I am attempting to LOAD CSV WITH HEADERS from a file within the /import/ directory (I had to move my file there) via a cURL request. 我试图通过cURL请求从/ import /目录中的文件加载CSV WITH HEADERS(我必须将文件移到那里)。 My request looks something like this: 我的请求看起来像这样:

"LOAD CSV WITH HEADERS FROM \"file:///insert-neo4j.csv\" AS row ...

This provides me with the following error: 这为我提供了以下错误:

{"results":[],"errors [{"code":"Neo.ClientError.Statement.ExternalResourceFailed","message":"Couldn't load the external resource at: file:/var/lib/neo4j/import/insert-neo4j.csv"}]}

It is often suggested to me that I append the following to my '/conf/neo4j.conf' file, however this file DOES NOT EXIST, and creating it manually does not seem to work... 通常建议我将以下内容附加到我的'/conf/neo4j.conf'文件中,但是该文件不存在,手动创建它似乎不起作用...

dbms.directories.import=import
dbms.security.allow_csv_import_from_file_urls=true

So I created the file /conf/neo4j.conf with the above variables, and I also tried adding these as environment variables to my docker-compose file. 因此,我使用上述变量创建了文件/conf/neo4j.conf,我还尝试将它们作为环境变量添加到我的docker-compose文件中。 I seem to continuously have no luck uploading via CSV this way. 我似乎一直没有这种方式通过CSV上传的运气。

My questions are: 我的问题是:

  • Is there anything blatantky wrong with this implementation? 这个实现有什么公然的错误吗?
  • Why does my /conf/neo4j.conf file NOT exist and how can I get it created? 为什么我的/conf/neo4j.conf文件不存在,如何创建它?

Thank you 谢谢

(ps my insert-neo4j.csv has -rwxr-xr-x) (ps我的insert-neo4j.csv具有-rwxr-xr-x)

The error message indicates it found the file but there is an error in the CSV ... most likely the formatting. 错误消息表明找到了文件,但是CSV中有错误……很可能是格式错误。 Check this and if you can't see it, please post a few rows, including the header, of it so we might help. 选中此复选框,如果看不到它,请张贴几行,包括标题,以便我们提供帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM