Neo4j Установите APOC и алгоритмы графа Neo.ClientError.Procedure.ProcedureRegistrationFailed

У меня проблемы с плагинами APOC и Graph Algorithms. Я выполнил инструкции, чтобы поместить .jars в {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.

Может ли кто-нибудь указать, где в моих настройках идет не так? Спасибо.


person mlo0424    schedule 13.02.2018    source источник


Ответы (2)


Измените эти строки:

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

to:

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

и перезапустите службу Neo4j.

person Bruno Peres    schedule 13.02.2018

После ответа @ bruno-peres я столкнулся с аналогичными проблемами (доступ / использование Neo4j APOC / Algorithms) в Arch Linux с Neo4j 3.4.0.

Я использую APOC (удивительные процедуры для Neo4j) и Эффективные алгоритмы построения графиков для 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 Установите APOC и графические алгоритмы ...

Мне нужно было внести следующие изменения в мой файл "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 принимает один

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
person Victoria Stuart    schedule 31.05.2018