【问题标题】:Neo4j Install APOC and Graph Algorithms Neo.ClientError.Procedure.ProcedureRegistrationFailedNeo4j 安装 APOC 和图形算法 Neo.ClientError.Procedure.ProcedureRegistrationFailed
【发布时间】:2018-07-24 05:14:43
【问题描述】:

我在使用 APOC 和图形算法插件时遇到了一些问题。 我按照说明将 .jar 放入 {NEO4j_HOME}/plugins 并更改了我的 {NEO4j_HOME}/conf/neo4j.conf 中的设置

dbms.directories.data=/Users/mlo/neo4j-community-3.3.1/data
dbms.directories.plugins=/Users/mlo/neo4j-community-3.3.1/plugins
dbms.directories.certificates=/Users/mlo/neo4j-community-3.3.1/certificates
dbms.directories.logs=/Users/mlo/neo4j-community-3.3.1/logs
dbms.directories.lib=/Users/mlo/neo4j-community-3.3.1/lib
dbms.directories.run=/Users/mlo/neo4j-community-3.3.1/run

dbms.security.auth_enabled=false
dbms.security.procedures.unrestricted=algo.*
dbms.security.procedures.unrestricted=apoc.*

一些程序可以工作。

CALL apoc.help('dijkstra')
CALL algo.list()

但是,大多数存储过程根本不起作用。

Neo.ClientError.Procedure.ProcedureRegistrationFailed
algo.unionFind 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.
algo.pageRank 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.

有人能指出我的设置哪里出了问题吗?谢谢。

【问题讨论】:

    标签: neo4j neo4j-apoc neo4j-plugin


    【解决方案1】:

    根据@bruno-peres 的回答,我在带有 Neo4j 3.4.0 的 Arch Linux 上遇到了类似的问题(访问/使用 Neo4j APOC/算法)。

    我使用APOC (Awesome Procedures for Neo4j)Efficient Graph Algorithms for Neo4j,与 适当版本的.jar 文件下载到我的 Neo4j 插件目录;即,

    /mnt/Vancouver/apps/neo4j/neo4j-community-3.4.0/plugins/apoc-3.4.0.1-all.jar
    /mnt/Vancouver/apps/neo4j/neo4j-community-3.4.0/plugins/graph-algorithms-algo-3.4.0.0.jar
    

    但是,当我尝试运行此命令时,

    CALL algo.pageRank.stream('Metabolism', 'yields',
    {iterations:20, dampingFactor:0.85})
    YIELD node, score
    RETURN node,score order by score desc limit 20
    

    在我的 Neo4j 浏览器中,我收到了这个错误:

    Error: Neo.ClientError.Procedure.ProcedureRegistrationFailed
    
    Neo.ClientError.Procedure.ProcedureRegistrationFailed: algo.pageRank 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.
    

    根据此处接受的答案 (SO 48773505) Neo4j Install APOC and Graph Algorithms...

    我需要对我的“neo4j.conf”文件进行以下编辑,

    /mnt/Vancouver/apps/neo4j/neo4j-community-3.4.0/conf/neo4j.conf
    

    取消注释这一行,

    dbms.directories.plugins=plugins
    

    并添加/编辑这一行,

    dbms.security.procedures.unrestricted=apoc.trigger.*,apoc.*,algo.*
    

    注意(上图),neo4j.conf 似乎接受 one

    dbms.security.procedures.unrestricted=...
    

    行!有单独的行,例如

    dbms.security.procedures.unrestricted=apoc.trigger.*,apoc.*
    dbms.security.procedures.unrestricted=algo.*
    

    导致... is unavailable because it is sandboxed and has dependencies outside of the sandbox ... 错误!

    最后,重启你的 Neo4j 服务器/实例,

    neo4j restart
    

    【讨论】:

      【解决方案2】:

      更改这些行:

      dbms.security.procedures.unrestricted=algo.*
      dbms.security.procedures.unrestricted=apoc.*
      

      到:

      dbms.security.procedures.unrestricted=algo.*,apoc.*
      

      并重启 Neo4j 服务。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2019-05-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2022-10-04
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多