Bercovici Adrian
Bercovici Adrian

Reputation: 9360

Connecting to dockerized Rethinkdb

Hello i am trying to connect to a RethinkDB container to no avail.I have downloaded the image and i can run it but it seems i cannot connect to it :

I am using:

docker run --name rth -p 8100:8080 -d rethinkdb

I have tried to connect to the browser client that exposes port 8080 to no avail.

P.S Knowing rethinkdb exposes a port for the driver and a port for the browser client i have also tried:
docker run --name rth -p 27000:27015 -p 8100:8080 -d rethinkdb
.I tried connecting from the browser to both 27000 and 8100 and none work.What am i missing?

P.S Using docker logs rth i get the following:

C:\Users\Adita>docker logs rth1
Recursively removing directory /data/rethinkdb_data/tmp
Initializing directory /data/rethinkdb_data
Running rethinkdb 2.3.6~0jessie (GCC 4.9.2)...
Running on Linux 4.9.93-boot2docker x86_64
Loading data from directory /data/rethinkdb_data
warn: Cache size does not leave much memory for server and query overhead (avail
able memory: 783 MB).
warn: Cache size is very low and may impact performance.
Listening for intracluster connections on port 29015
Listening for client driver connections on port 28015
Listening for administrative HTTP connections on port 8080 ////-----!!!!!!!
Listening on cluster addresses: 127.0.0.1, 172.17.0.3
Listening on driver addresses: 127.0.0.1, 172.17.0.3
Listening on http addresses: 127.0.0.1, 172.17.0.3
Server ready, "3acef1c420d2_acx" b0adc99e-19a9-4780-b336-40c2e2b38a5f

As you can see Listening for administrative HTTP connections on port 8080 .Why can't i connect from the browser?

Upvotes: 2

Views: 2485

Answers (2)

taygetos
taygetos

Reputation: 3040

create a config file "rethink.conf"

directory=/data/rethinkdb
log-file=/data/rethinkdb/log
bind=all
driver-port=28015
cluster-port=29015
http-port=8080

run the following command

docker run --name rethinkdb -d --net=host rethinkdb --config-file /path/to/rethinkdb.conf 

go to http://localhost:8080

Upvotes: 1

GraphicalDot
GraphicalDot

Reputation: 2821

Rethink db runs n port 28015 and UI on 8080.

docker run -d -h `hostname` -p 8080:8080 -p 28015:28015 -p 29015:29015 -v <data-dir>:/data dockerfile/rethinkdb rethinkdb -d /data --bind all --canonical-address `curl icanhazip.com`

Rethinkdb UI must now be accessible from your host at http://loclahost:8080/

Upvotes: 1

Related Questions