RADAR-base / RADAR-Docker

Integrated Docker Stack for the RADAR mHealth Streaming Platform Components
https://hub.docker.com/u/radarbase/dashboard/
Apache License 2.0
16 stars 16 forks source link

Radar-base Installation error in postgres #232

Open omarcr opened 3 years ago

omarcr commented 3 years ago

I am currently installing radar-base in an ubuntu server with a domain name with minimum specifications as detailed here: https://radar-base.org/index.php/2019/02/13/how-to-install-radar-base-using-radar-docker/

I have completed all steps until: bin/radar-docker install

While running that code I get the following error with the postgres service:

*******************************************
**  RADAR-base topics and schemas ready   **
*******************************************
Completed Updating config for entity: topic '_schemas'.
==> Configuring MongoDB Connector
==> Configuring HDFS Connector
==> Configuring Management Portal
Building radarbase-postgresql
Step 1/4 : ARG POSTGRES_VERSION=10.6-alpine
Step 2/4 : FROM postgres:${POSTGRES_VERSION}
 ---> 39895ca06dde
Step 3/4 : COPY ./multi-db-init.sh /docker-entrypoint-initdb.d/multi-db-init.sh
 ---> 5c71a7c9169f
Step 4/4 : COPY ./on-db-ready /usr/bin/on-db-ready
 ---> 4432f8a90032
Successfully built 4432f8a90032
Successfully tagged radarbase/postgres:10.6-alpine-1
Recreating radarcphadoopstack_radarbase-postgresql_1 ... 
Recreating radarcphadoopstack_radarbase-postgresql_1 ... done
Waiting for postgres database...
Database ready.
Multiple database creation requested: managementportal,restsourceauthorizer
psql: FATAL:  role "ubuntu" does not exist
Database managementportal does not exist
  Creating database 'managementportal' for user 'ubuntu'
psql: FATAL:  role "ubuntu" does not exist
### FAILURE ###
ubuntu@ip-172-26-14-128:~/RADAR-Docker/dcompose-stack/radar-cp-hadoop-stack$ 

I have tried changing the name of POSTGRES_USER in .env to the system user, a unique user, default user, and empty without success. Any recommendations on how to fix this?

Thank you

Hsankesara commented 3 years ago

Hi @omarcr,

I think it would work if you create a user name ubuntu. Try sudo -u postgres createuser ubuntu and rerun the bin/radar-docker install.

jimmafeni commented 3 years ago

Hello @omarcr @Hsankesara, I have a similar issue when I execute the command: bin/radar-docker install

Error: OS version: Linux radaremotion 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux docker version: Docker version 19.03.13, build 4484c46d9d docker-compose version: docker-compose version 1.27.4, build 40524192 ==> Creating docker network - hadoop Error response from daemon: Failed to Setup IP tables: Unable to enable DROP INCOMING rule: (iptables failed: iptables --wait -I DOCKER-ISOLATION-STAGE-1 -i br-4e7032a36bae ! -d 192.168.240.0/20 -j DROP: iptables: No chain/target/match by that name. (exit status 1))

FAILURE

omarcr commented 3 years ago

Hi @omarcr,

I think it would work if you create a user name ubuntu. Try sudo -u postgres createuser ubuntu and rerun the bin/radar-docker install.

Thank you for your response Hsankara. I receive the following message after running the command:

st login: Thu Dec  3 00:33:27 2020 from 72.21.217.153
ubuntu@ip-172-26-14-128:~$ sudo -u postgres createuser ubuntu
sudo: unknown user: postgres
sudo: unable to initialize policy plugin
ubuntu@ip-172-26-14-128:~$ postgress

Do you have any recommendations on how to fix this?

Thanks, Omar

omarcr commented 3 years ago

Hi everyone, I think the error was that I put my ubuntu user here in step one:

sudo usermod -G docker ${USER}

The fix is not to modify the line, just execute as-is. I hope this works for other's too.