我试图在orientdb中使用pyorient打开一个数据库,它在分布式模式下配置和启动。 但是数据库的打开并没有发生,因为该过程没有完成,也没有抛出任何错误。 我能够使用HTTP端口打开并访问节点 - 2480.但是当我尝试使用二进制端口--2424时,我遇到了这个问题。
import pyorient client = pyorient.OrientDB("localhost", 2424) session_id = client.connect( "xxxx", "xxxxx") client.db_open( "orient_poc", "xxxx", "xxxx")
怎么解决这个?
I am trying to open a database using pyorient in orientdb which was configured and started in distributed mode. But the opening of database is not happening as the process is not completing as well as not throwing any error. I am able to open and access the nodes using the HTTP port - 2480. But when I try to use the binary port - 2424, I am getting this issue.
import pyorient client = pyorient.OrientDB("localhost", 2424) session_id = client.connect( "xxxx", "xxxxx") client.db_open( "orient_poc", "xxxx", "xxxx")
How to resolve this ?
最满意答案
这是因为pyorient的CSV序列化程序中存在错误。 您无法以分布式模式连接到OrientDB。
OrientSerialization.CSV无法解析orientDB协议并进入无限循环。
目前有一个关于pyorient的开发分支,它实现了缺少的二进制序列化器(OrientSerialization.Binary)。
安装它:
pip install https://github.com/mogui/pyorient/tarball/develop#egg=pyorient设置序列化器如下:
client = pyorient.OrientDB("localhost", 2424, serialization_type=pyorient.OrientSerialization.Binary)这对我有用。
This is because of a bug in pyorient's CSV serializer. You can't connect to OrientDB in distributed mode.
The OrientSerialization.CSV can't parse the orientDB protocol and goes into an infinite loop.
There is currently a development branch on pyorient that implements the missing binary serialiser (OrientSerialization.Binary).
Install it with:
pip install https://github.com/mogui/pyorient/tarball/develop#egg=pyorientSet your serialiser as follows:
client = pyorient.OrientDB("localhost", 2424, serialization_type=pyorient.OrientSerialization.Binary)That worked for me.
更多推荐
发布评论