0

I'm using pyorient 1.5.4 and the docker for orientdb 2.2.5

If I use the browser to connect to the database, the server is clearly running. If I connect with pyorient, I get an error.

Here is the code I use to connect to the database:

import pyorient

database = pyorient.OrientDB('127.0.0.1', 2424)
database.db_open(
                'myDB',
                'root',
                'mypassword',
                db_type='graph'
            )

I get the following error:

pyorient.exceptions.PyOrientConnectionException: Server seems to have went down

I created the docker container with the following command:

docker run -d --name orientdb -p 2424:2424 -p 2480:2480 -v /home/myuser/Code/database:/orientdb/databases  -e ORIENTDB_ROOT_PASSWORD=mypassword orientdb:latest /orientdb/bin/server.sh  -Ddistributed=true

The server is running because connecting via the browser works fine.

It seems like the necessary ports are open so why does pyorient thinks the database is closed?

4

1 回答 1

2

我发现了我的问题。我正在启动 docker 容器:

-Ddistributed=true

删除参数使我能够很好地连接。

但是,我发现 pyorient 在尝试解析在分布式模式下从 orientDB 返回的数据包时会进入无限循环。这是由于 pyorient 上的一个错误造成的。该错误在此处进行了更详细的说明:

https://github.com/mogui/pyorient/issues/215#issuecomment-245007336

于 2016-07-20T21:47:23.923 回答