CogStack / CogStack-NiFi

Building data processing pipelines for documents processing with NLP using Apache NiFi and related services
https://hub.docker.com/r/cogstacksystems/cogstack-nifi/
Other
37 stars 19 forks source link

Sample DB docker not populated with data on startup #14

Closed chamiw2008 closed 2 years ago

chamiw2008 commented 2 years ago

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 ????

vladd-bit commented 2 years ago

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

chamiw2008 commented 2 years ago

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,

chamiw2008 commented 2 years ago

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,

vladd-bit commented 2 years ago

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 ?

chamiw2008 commented 2 years ago

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.

vladd-bit commented 2 years ago

Hello,

If there no further updates I will close the ticket.

chamiw2008 commented 2 years ago

Hi,

Thanks. Got it working with the environment settings added.

No further updates.

On Wed, Nov 24, 2021 at 5:45 PM Vlad Dinu @.***> wrote:

Hello,

If there no further updates I will close the ticket.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CogStack/CogStack-NiFi/issues/14#issuecomment-978096158, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARKLPIS4SJPQ7KZT7YN4XLUNUQEHANCNFSM5IT6TUMQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Dr. Chaminda Weerabaddana MBBS(Kelaniya), MSc(BMI), MD(Health Informatics) RSTI (USA) Certified PACS Master & TOGAF 9 Certified Enterprise Architect

Visiting Academic Clinical Informatics Research Unit University of Southampton Southampton General Hospital Tremona Road, Southampton SO16 6YD United Kingdom

+44-7751295718 (Mobile) +94-773303353 (Mobile)

IMPORTANT NOTICE; This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is intended for the addressee only. Any unauthorized disclosure, use, dissemination, copying, or distribution of this message or any of its attachments or the information contained in this e-mail, or the taking of any action based on it, is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail and delete this message.