为什么cleandb扩展拒绝删除我的neo4j图形数据库? [英] Why does the cleandb extension refuse to delete my neo4j graph database?

查看:93
本文介绍了为什么cleandb扩展拒绝删除我的neo4j图形数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试清除 neo4j (1.8.2)时,请使用<一个href ="https://github.com/jexp/neo4j-clean-remote-db-addon" rel ="nofollow"> cleandb 扩展名(适用于neo4j 1.8),失败:

When trying to purge neo4j (1.8.2) with the cleandb extension (for neo4j 1.8), it fails:

[path] ? curl -v -X DELETE 'http://localhost:7475/db/cleandb/12sE$lkj3%'
* About to connect() to localhost port 7475 (#0)
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 7475 (#0)
> DELETE /db/cleandb/12sE$lkj3% HTTP/1.1
> User-Agent: curl/7.29.0
> Host: localhost:7475
> Accept: */*
> 
< HTTP/1.1 500 Internal Server Error
< Content-Length: 0
< Server: Jetty(6.1.25)
< 
* Connection #0 to host localhost left intact

显然,我不仅得到500错误代码,还没有清除数据库. 当然,插件的访问URL和秘钥"是按照curl请求中的设置进行设置的:

Obviously, I do not only get a 500 error code, also the db is not purged. Of course, access URL and "secret-key" of the plugin are set up as used in the curl request:

org.neo4j.server.thirdparty_jaxrs_classes=org.neo4j.server.extension.test.delete=/db/cleandb
org.neo4j.server.thirdparty.delete.key=12sE$lkj3%

我会方便地添加 cleandb 标记,但是我没有1500的声誉.

I would conveniently add the cleandb tag, but I lack the 1500 reputation.

有什么想法吗?预先感谢!

Any ideas? Thanks in advance!

编辑 (我使用cleandb的原因是为了在neo4django中设置单元测试). /EDIT

EDIT (The reason I use cleandb is to set up unittests in neo4django). /EDIT

推荐答案

嗯,我有cleandb扩展在本地针对1.8.2和1.9工作.例如,您可以运行

Hm, I have the cleandb extension working locally against 1.8.2 and 1.9. For example, you can run

from neo4django.db import connection
from pdb import set_trace; set_trace()
connection.cleandb()

并跟踪cleandb Python调用,它得到一个200及其伴随的响应主体,

and trace the cleandb Python call, and it gets a 200 and accompanying response body,

{\n  "node-indexes" : [ ],\n  "nodes" : 4,\n  "relationship-indexes" : [ ],\n  "relationships" : 0,\n  "maxNodesToDelete" : 1000\n}

我不确定curl和Python调用之间的区别是什么-您有任何机会可以在模块中尝试上述操作,运行并查看会发生什么情况?

I'm not sure what the difference between curl and the Python call might be- any chance you could try the above in a module, run it, and see what happens?

cleandb扩展名是不受管的,因此您不能(IIRC?)将URL设置为'/db/cleandb',它必须位于自己的根目录上-我使用'/cleandb'. LMK如果有帮助的话!

The cleandb extension is unmanaged, so you can't (IIRC?) set the URL to '/db/cleandb', it needs to be on its own root- I use '/cleandb'. LMK if that helps!

噢,不用理会,'/db/'网址似乎可以正常工作.也许您可以使用'install_local_neo4j.bash'脚本( https://github.com /scholrly/neo4django/blob/master/install_local_neo4j.bash )以安装Neo4j的副本并以相同的方式进行设置(如果对您有用)?如果是这样,也许我们可以看到设置有何不同...

Aw, disregard that, '/db/' urls seem to work fine. Maybe you could use the 'install_local_neo4j.bash' script (https://github.com/scholrly/neo4django/blob/master/install_local_neo4j.bash) to install a copy of Neo4j and set it up the same way, if that works for you? And if so, maybe we can see how the setups differ...

这篇关于为什么cleandb扩展拒绝删除我的neo4j图形数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆