CogStack/CogStack-NiFi

Sample DB docker not populated with data on startup

Closed this issue · 7 comments

I am deploying the Cogstack on Windows 10 machine for testing.

The Sample BD which is supposed to get populated with following data is empty. Leading to workflows not being run.
patients - structured patient information,
encounters - structured encounters information,
observations - structured observations information,

image

Any thoughts ????

Hello,

I presume that the code you are running is from the master branch. I am not experiencing the same issue, could you try deleting the containers and their volumes and re-creating them ?

Are there any log messages you can share from the db container ?

Thanks

Hi,

I have deleted and created the containers and volumes many times with the same result.
( I am on Windows 10)

Can you let me know where to find the logs in the db container ?

I see that the two files are copied/accessible from the containers;

      - ../services/pgsamples/db_dump/db_samples-pdf-text-small.sql.gz:/data/db_samples.sql.gz:ro
      - ../services/pgsamples/init_db.sh:/docker-entrypoint-initdb.d/init_db.sh:ro
  - 

So I tried to run them from the container (/docker-entrypoint-initdb.d # ./init_db.sh) and got the below error;

Creating database: db_samples and user: test
psql: FATAL:  role "root" does not exist

Thanks,

Hi,

Below is the only log on the container;

2021-11-23 19:22:47.743 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2021-11-23 19:22:47.743 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2021-11-23 19:22:47.764 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2021-11-23 19:22:47.828 UTC [48] LOG:  database system was shut down at 2021-11-23 19:22:47 UTC
2021-11-23 19:22:47.846 UTC [1] LOG:  database system is ready to accept connections

Thanks,

Hello,

Make sure you are using the latest version of the repository.
The last thing I can suggest is making sure you have read/write/execute permissions on those files.

If you delete the volumes using docker volume rm deploy_samples-vol and recreate the container, could you post the log again using docker logs cogstack-samples-db ?

Hi,

I think the below was missing in the master branch services.yml

  environment:
      # PG env vars
      - POSTGRES_USER=test
      - POSTGRES_PASSWORD=test

With it the DB was created.
(The tool HeidiSQL has issues showing data from Postgres.)

So will check and come back.

Thanks for the support.

Hello,

If there no further updates I will close the ticket.