anber anber - 10 months ago 83
Python Question

pyorient can't connect to orientdb docker

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('', 2424)

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/ -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?


I found my problem. I was starting the docker container with:


removing the parameter enabled me to connect just fine.

However, I have found that pyorient gets into an infinite loop when trying to parse the packets that's returned from orientDB under distributed mode. This is due to a bug on pyorient. The bug is explained in more detail over here: