Can not start Scidb 18.1 on a docker container


#1

Hello, I’m trying to use scidb on docker. Using 1 master, 1 slave for testing.
[scidb.py initall scidb] succeeded but [scidb.py startall scidb] can not be executed.
So I used only one cluster to get the exact cause, but the ‘startall’ still does not run.

  • Error message

2018-02-28 08:00:31.000253 [0x7f1cab59bec0] [ERROR]: Could not get the remote IP from connected socket to/from s0-i1 (1): Transport endpoint is not connected (system:107)
2018-02-28 08:00:31.000253 [0x7f1cab59bec0] [ERROR]: Network error #system:32 (Broken pipe) in handleSendMessage, peer s0-i1 (1)
2018-02-28 08:00:31.000253 [0x7f1cab59bec0] [ERROR]: NetworkManager::handleConnectionError: Connection error - aborting ALL queries
2018-02-28 08:00:36.000253 [0x7f1cab59bec0] [ERROR]: Could not get the remote IP from connected socket to/from s1-i3 (4294967299): Transport endpoint is not connected (system:107)
2018-02-28 08:00:36.000253 [0x7f1cab59bec0] [ERROR]: Network error #system:32 (Broken pipe) in handleSendMessage, peer s1-i3 (4294967299)
2018-02-28 08:00:36.000253 [0x7f1cab59bec0] [ERROR]: NetworkManager::handleConnectionError: Connection error - aborting ALL queries

Here is scidb config.

  • docker command

docker run --tty --interactive -p 8080:8080 -p 1234:1234 -p 1239:1239 -p 2345:5432 --name scidb_master rvernica/scidb:18.1 bash

  • config.ini

[scidb]
base-path=/opt/scidb/18.1/DB-scidb
base-port=1239
ssh-port=1234
pg-port=2345
db_user=scidb
install_root=/opt/scidb/18.1
logconf=/opt/scidb/18.1/share/scidb/log4cxx.properties
pluginsdir= /opt/scidb/18.1/lib/scidb/plugins
server-0=192.168.10.156,1

The following are the modifications to the postgresql config.

  • pg_hba.conf

host all all 127.0.0.1/32 trust
host all all ::1/128 trust
host all all 0.0.0.0/0 trust

  • postgresql.conf

listen_addresses = ‘*’

Please help me. Thanks,


#2

Meanwhile I tried running the following

docker ps
# confirming that no scidb containers are running

docker run --tty --interactive -p 8080:8080 -p 1234:1234 -p 1239:1239 -p 2345:5432 --name scidb_master rvernica/scidb:18.1 bash
# i.e. your exact command

I got the scidb container to start up OK.

Some thoughts:

  1. Maybe make sure you have the latest images locally. You can update using docker pull
  2. What is your OS on which you are trying this? Mine used Docker on Mac.
  3. Do try starting only one scidb docker while you debug this.

Tagging @rares on this question (he built the original Docker images).


#3

Does your docker image indeed have an ip4 address of 192.168.10.156 ?

# If you have a CIDR of 192.168.10.156/24 for the internal IP in the 
# docker container, then you should see something like this
$ docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}/{{.IPPrefixLen}}{{end}}' CONTAINER_ID
192.168.10.156/24

If that is the case, then you will also need to add this to the pg_hba.conf

host    all             all             192.168.10.0/24           trust

#4

The rvernica/scidb images are intended to run standalone, emulating a SciDB cluster. They each start a PostgreSQL server and two SciDB instances by default. The number of SciDB instances can be adjusted.

I think what you are trying to do is have one SciDB instance per container and use separate containers to form a SciDB cluster. If that is the case a few things to consider are:

  • The Docker image only exposes ports 1239, 8080, and 8083, see here. If you need more ports to be exposed you might need to expand the image and add the extra ports that you need.
  • Have PostgreSQL run only once and have all SciDB instances connect to it.
  • There might be other issues you will have to deal with.

#5

Thanks for the answer.
So if I install multiple doorker in each of the clusters and want to run scidb in them, do i need to modify the Dockerfile?


#6

Yes, as they are the rvernica/scidb images cannot be used in a cluster setup. You would have to modify the Dockerfile and rebuild the images.