Search code examples
dockerdocker-composecluster-computingorientdb

How to access orientDB docker-compose set cluster?


I am trying to set Orientdb cluster with docker, here is docker-compose.yaml file:

version: "3"
services:
  odb1:
    image: orientdb:2.2.30
    command: dserver.sh
    volumes:
      - ./var/odb1/config:/orientdb/config
      - ./var/odb1/databases:/orientdb/databases
    environment:
      ORIENTDB_ROOT_PASSWORD: root
      ORIENTDB_NODE_NAME: odb1
    ports:
      - 2480:2480
      - 2424:2424

  odb2:
    image: orientdb:2.2.30
    command: dserver.sh
    volumes:
      - ./var/odb2/config:/orientdb/config
      - ./var/odb2/databases:/orientdb/databases
    environment:
      ORIENTDB_ROOT_PASSWORD: root
      ORIENTDB_NODE_NAME: odb2
    depends_on:
      - odb1

It runs fine with

docker-compose up

Returns message:

odb2_1  | 2017-11-28 12:47:48:069 INFO  OrientDB Studio available at http://localhost:2480/studio/index.html [OServer]

But I can't access this url: "This connection was reset", although it worked fine for one node mode. As well I did not found clear answer how to access cluster in console, except of this, but it does not work for docker container.


Solution

  • As described on dockerhub, accessing the console can be done via:

    docker run --rm -it orientdb /orientdb/bin/console.sh