OHDSI Home | Forums | Wiki | Github

OHDSI WebAPI setup and Atlas dashboard configuration

We are in the process of setting up Broadsea 3.0 along with WebAPI, utilizing specific Docker images. These images include ohdsi/broadsea-atlasdb:2.0.0, ohdsi/webapi:latest, and ohdsi/atlas:latest. All corresponding Docker containers are successfully up and operational.

Upon accessing the website via the local host IP address (127.0.0.1), we are directed to the OHDSI Broadsea 3.0 landing page as expected. When we proceed to select the “Atlas” option, we are subsequently redirected to the ATLAS dashboard located at http://127.0.0.1/atlas/#/. At this point, we encounter an error displayed on the web portal’s dashboard.

The error message reads: “Application initialization failed. The current WebAPI has no sources defined. Please add one or more on the configuration page.”

Attempting to resolve this issue, we navigated to the “Configuration” tab within the ATLAS dashboard. However, we found it limited to only two available options: “Clear Configuration Cache” and “Tag Management.” Unfortunately, there’s no ‘Add’ button present to facilitate the addition of new configurations.

Could you provide guidance on how to configure the ATLAS settings properly to rectify this issue?

**


**

Does the atlasdb container report any errors? How about the ohdsi-webapi container?

This is the ERROR stack trace on atlasDB container logs:

=============================================================================
2023-09-20 15:58:13.947 UTC [18190] ERROR: cannot truncate a table referenced in a foreign key constraint
2023-09-20 15:58:13.947 UTC [18190] DETAIL: Table “source_daimon” references “source”.
2023-09-20 15:58:13.947 UTC [18190] HINT: Truncate table “source_daimon” at the same time, or use TRUNCATE … CASCADE.
2023-09-20 15:58:13.947 UTC [18190] STATEMENT: truncate webapi.source;
2023-09-20 15:58:14.089 UTC [18190] ERROR: null value in column “is_cache_enabled” of relation “source” violates not-null constraint
2023-09-20 15:58:14.089 UTC [18190] DETAIL: Failing row contains (1, OHDSI Eunomia Demo Database, EUNOMIA, jdbc:postgresql://broadsea-atlasdb:5432/postgres?user=postgres&p…, postgresql, null, null, PASSWORD, null, null, null, null, null, null, null, null, null).
2023-09-20 15:58:14.089 UTC [18190] STATEMENT: INSERT INTO webapi.source( source_id, source_name, source_key, source_connection, source_dialect)
VALUES (1, ‘OHDSI Eunomia Demo Database’, ‘EUNOMIA’,
‘jdbc:postgresql://broadsea-atlasdb:5432/postgres?user=postgres&password=’, ‘’);
2023-09-20 15:58:21.338 UTC [22] LOG: checkpoint starting: time
2023-09-20 15:58:22.836 UTC [22] LOG: checkpoint complete: wrote 14 buffers (0.1%); 0 WAL file(s) added, 0 removed, 0 recycled; write=1.304 s, sync=0.104 s, total=1.498 s; sync files=10, longest=0.080 s, average=0.011 s; distance=37 kB, estimate=37 kB
2023-09-20 16:05:39.775 UTC [18819] ERROR: cannot truncate a table referenced in a foreign key constraint
2023-09-20 16:05:39.775 UTC [18819] DETAIL: Table “source_daimon” references “source”.
2023-09-20 16:05:39.775 UTC [18819] HINT: Truncate table “source_daimon” at the same time, or use TRUNCATE … CASCADE.
2023-09-20 16:05:39.775 UTC [18819] STATEMENT: truncate webapi.source;
2023-09-20 16:05:39.866 UTC [18819] ERROR: null value in column “is_cache_enabled” of relation “source” violates not-null constraint
2023-09-20 16:05:39.866 UTC [18819] DETAIL: Failing row contains (1, OHDSI Eunomia Demo Database, EUNOMIA, jdbc:postgresql://broadsea-atlasdb:5432/postgres?user=postgres&p…, postgresql, null, null, PASSWORD, null, null, null, null, null, null, null, null, null).
2023-09-20 16:05:39.866 UTC [18819] STATEMENT: INSERT INTO webapi.source( source_id, source_name, source_key, source_connection, source_dialect)
VALUES (1, ‘OHDSI Eunomia Demo Database’, ‘EUNOMIA’,
‘jdbc:postgresql://broadsea-atlasdb:5432/postgres?user=postgres&password=’, ‘postgresql’);
2023-09-20 16:08:19.114 UTC [19040] ERROR: cannot truncate a table referenced in a foreign key constraint
2023-09-20 16:08:19.114 UTC [19040] DETAIL: Table “source_daimon” references “source”.
2023-09-20 16:08:19.114 UTC [19040] HINT: Truncate table “source_daimon” at the same time, or use TRUNCATE … CASCADE.
2023-09-20 16:08:19.114 UTC [19040] STATEMENT: truncate webapi.source;
2023-09-20 16:08:19.211 UTC [19040] ERROR: null value in column “is_cache_enabled” of relation “source” violates not-null constraint
2023-09-20 16:08:19.211 UTC [19040] DETAIL: Failing row contains (1, OHDSI Eunomia Demo Database, EUNOMIA, jdbc:postgresql://broadsea-atlasdb:5432/postgres?user=postgres&p…, postgresql, null, null, PASSWORD, null, null, null, null, null, null, null, null, null).
2023-09-20 16:08:19.211 UTC [19040] STATEMENT: INSERT INTO webapi.source( source_id, source_name, source_key, source_connection, source_dialect)
VALUES (1, ‘OHDSI Eunomia Demo Database’, ‘EUNOMIA’,
‘jdbc:postgresql://broadsea-atlasdb:5432/postgres?user=postgres&password=’, ‘postgresql’);
2023-09-20 16:08:22.023 UTC [22] LOG: checkpoint starting: time
2023-09-20 16:08:23.420 UTC [22] LOG: checkpoint complete: wrote 13 buffers (0.1%); 0 WAL file(s) added, 0 removed, 0 recycled; write=1.204 s, sync=0.101 s, total=1.397 s; sync files=12, longest=0.076 s, average=0.009 s; distance=40 kB, estimate=40 kB
2023-09-20 16:09:41.755 UTC [19163] ERROR: cannot truncate a table referenced in a foreign key constraint
2023-09-20 16:09:41.755 UTC [19163] DETAIL: Table “source_daimon” references “source”.
2023-09-20 16:09:41.755 UTC [19163] HINT: Truncate table “source_daimon” at the same time, or use TRUNCATE … CASCADE.
2023-09-20 16:09:41.755 UTC [19163] STATEMENT: truncate webapi.source;
2023-09-20 16:09:41.877 UTC [19163] ERROR: null value in column “is_cache_enabled” of relation “source” violates not-null constraint
2023-09-20 16:09:41.877 UTC [19163] DETAIL: Failing row contains (1, OHDSI Eunomia Demo Database, EUNOMIA, jdbc:postgresql://broadsea-atlasdb:5432/postgres?user=postgres&p…, postgresql, null, null, PASSWORD, null, null, null, null, null, null, null, null, null).
2023-09-20 16:09:41.877 UTC [19163] STATEMENT: INSERT INTO webapi.source( source_id, source_name, source_key, source_connection, source_dialect)
VALUES (1, ‘OHDSI Eunomia Demo Database’, ‘EUNOMIA’,
‘jdbc:postgresql://broadsea-atlasdb:5432/postgres?user=postgres&password=’, ‘postgresql’);
2023-09-20 16:11:36.511 UTC [1] LOG: received fast shutdown request
2023-09-20 16:11:36.599 UTC [1] LOG: aborting any active transactions
2023-09-20 16:11:36.601 UTC [1] LOG: background worker “logical replication launcher” (PID 27) exited with exit code 1
2023-09-20 16:11:36.607 UTC [22] LOG: shutting down
2023-09-20 16:11:36.652 UTC [22] LOG: checkpoint starting: shutdown immediate
2023-09-20 16:11:36.975 UTC [22] LOG: checkpoint complete: wrote 13 buffers (0.1%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.098 s, total=0.369 s; sync files=9, longest=0.083 s, average=0.011 s; distance=38 kB, estimate=40 kB
2023-09-20 16:11:36.981 UTC [1] LOG: database system is shut down

PostgreSQL Database directory appears to contain a database; Skipping initialization

===========================================================================

The stack trace shows that PostgreSQL is unable to truncate the source table because it is referenced by a foreign key constraint in the source_daimon table. This means that there are rows in the source_daimon table that point to rows in the source table. In order to truncate the source table, you must first truncate the source_daimon table, or drop the foreign key constraint.

The stack trace also shows that PostgreSQL is unable to insert a row into the source table because the is_cache_enabled column is not nullable. This means that you must provide a value for this column when inserting a new row into the table.

But we have tried to truncate those tables and it didn’t work.

Queries we tried:

TRUNCATE TABLE source, generation_cache, source_daimon;

TRUNCATE TABLE source, generation_cache, source_daimon CASCADE;

UPDATE source SET is_cache_enabled = true;
ALTER TABLE source DROP COLUMN is_cache_enabled;

TRUNCATE TABLE source_daimon CASCADE;

TRUNCATE TABLE source, source_daimon;

TRUNCATE TABLE source, source_daimon, generation_cache;

TRUNCATE TABLE source, source_daimon, generation_cache CASCADE;

TRUNCATE TABLE source_daimon, source CASCADE;

t