Unable to iniitalize cBioPortal off Docker

273 views
Skip to first unread message

Samuel Kellen

unread,
Mar 27, 2024, 4:44:19 PM3/27/24
to cBioPortal for Cancer Genomics Discussion Group
Hello all,

Having issues setting up the docker container using the steps provided on the GitHub page, I am getting a repetition of this error: I have fully purged and reinstalled the containers and their volumes.
See logs below


'@'172.18.0.5' (using password: YES)   | 2024-02-05T20:40:59.122677Z 16 [Note] Access denied for user 'cbio_user
cbioportal-container                   | Database connection success
cbioportal-container                   | Migrating database if necessary...
cbioportal-container                   | (1146, "Table 'cbioportal.patient_list' doesn't exist")
cbioportal-container                   | Running statements for version: 1.1.0
cbioportal-container                   |        Executing statement: CREATE TABLE sample_list LIKE patient_list;
cbioportal-container exited with code 1
cbioportal-container                   | db_user=cbio_user
cbioportal-container                   | db_password=somepassword
cbioportal-container                   | db_connection_string=jdbc:mysql://cbioportal-database:3306/cbioportal
cbioportal-container                   | mysqladmin: [Warning] Using a password on the command line interface can be insecure.
'@'172.18.0.5' (using password: YES)   | 2024-02-05T20:41:12.285751Z 18 [Note] Access denied for user 'cbio_user
cbioportal-container                   | Database connection success
cbioportal-container                   | Migrating database if necessary...
cbioportal-container                   | (1146, "Table 'cbioportal.patient_list' doesn't exist")
cbioportal-container                   | Running statements for version: 1.1.0
cbioportal-container                   |        Executing statement: CREATE TABLE sample_list LIKE patient_list;
cbioportal-container exited with code 1
cbioportal-container                   | db_user=cbio_user
cbioportal-container                   | db_password=somepassword
cbioportal-container                   | db_connection_string=jdbc:mysql://cbioportal-database:3306/cbioportal
cbioportal-container                   | mysqladmin: [Warning] Using a password on the command line interface can be insecure.
'@'172.18.0.5' (using password: YES)   | 2024-02-05T20:41:38.260007Z 20 [Note] Access denied for user 'cbio_user
cbioportal-container                   | Database connection success
cbioportal-container                   | Migrating database if necessary...
cbioportal-container                   | (1146, "Table 'cbioportal.patient_list' doesn't exist")
cbioportal-container                   | Running statements for version: 1.1.0
cbioportal-container                   |        Executing statement: CREATE TABLE sample_list LIKE patient_list;
cbioportal-container exited with code 1


Zeynep Karagöz

unread,
Mar 28, 2024, 12:10:11 PM3/28/24
to Samuel Kellen, cBioPortal for Cancer Genomics Discussion Group
Hi Samuel,

Thanks for reaching out to us. 
I see that you might be missing seed data, example config and/or example study from datahub. Could you confirm that you ran ./init.sh at the root of cbioportal-docker-compose folder? 

Please reply-all to this email so the community can also follow our conversation.

Best,

Zeynep Karagöz

Data Engineer


E zey...@thehyve.nl

T +31 30 700 9713

M +31 627 121 63

W thehyve.nl

   




--
You received this message because you are subscribed to the Google Groups "cBioPortal for Cancer Genomics Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cbioportal+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cbioportal/10e792ae-8359-45fd-ba09-a2548e041d56n%40googlegroups.com.

Samuel Kellen

unread,
Mar 29, 2024, 11:30:59 AM3/29/24
to cBioPortal for Cancer Genomics Discussion Group
Hi, Zeynep,

Yes, I have run init.sh, and the files it downloads (cdgs.sql and others) are all present within the folder.
As far as I know, I am also running off the default portal.properties config.

Thanks,
Samuel Kellen

Tim Kuijpers

unread,
Mar 29, 2024, 12:52:25 PM3/29/24
to cBioPortal for Cancer Genomics Discussion Group
Dear Samuel,

From the error logs it becomes clear that the user cbio_user  cannot log in (access denied error) and the password seems to be incorrect. Did you change the password after you ran the init script?
If this is not the case, can you retry and follow the steps from the documentation page?

Best,
Tim

Samuel Kellen

unread,
Apr 26, 2024, 1:35:26 PM4/26/24
to cBioPortal for Cancer Genomics Discussion Group
Hello, Tim

I've tried redoing the steps from the documentation after purging the images and volumes from my server. Still, I receive the same errors, even with the default configuration.

Thanks,
Samuel Kellen

Shengbing Huang

unread,
Jan 9, 2025, 8:59:38 AMJan 9
to cBioPortal for Cancer Genomics Discussion Group
I am having similar issue on our Google Cloud virtual machine without internet access. I manually uploaded the seed data to VM. 
cbioportal-container keeps repeating this portion and the container restarts itself repeatedly:
cbioportal-container                   | Database connection success
cbioportal-container                   | Migrating database if necessary...
cbioportal-container                   | /core/scripts/migrate_db.py:270: SyntaxWarning: invalid escape sequence '\s'
cbioportal-container                   |   line_parts = re.split("--\s", line)

cbioportal-container                   | (1146, "Table 'cbioportal.patient_list' doesn't exist")
cbioportal-container                   | Running statements for version: 1.1.0
cbioportal-container                   |        Executing statement: CREATE TABLE sample_list LIKE patient_list;
cbioportal-container                   | Running Migrate DB Script
cbioportal-container                   | Using database config:
cbioportal-container                   | spring_datasource_username=cbio_user
cbioportal-container                   | spring_datasource_password=somepassword
cbioportal-container                   | spring_datasource_url=jdbc:mysql://cbioportal-database:3306/cbioportal

cbioportal-container                   | mysqladmin: [Warning] Using a password on the command line interface can be insecure.
cbioportal-container                   | Database connection success
cbioportal-container                   | Migrating database if necessary...

In addtion I see this that looks suspecious:
cbioportal-database-container          | /usr/local/bin/docker-entrypoint.sh: line 75: /docker-entrypoint-initdb.d/cgds.sql: Permission denied
cbioportal-database-container exited with code 0

Jason Pollock

unread,
Oct 7, 2025, 11:30:07 AM (9 days ago) Oct 7
to cBioPortal for Cancer Genomics Discussion Group
Hi,

I'm interested in working on this project, and I'm also running into this problem.

uname -a:
Linux dude 6.14.0-32-generic #32-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 29 14:21:26 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

My process was:

# cd cbioportal-docker-compose/
# sudo ./init.sh
# sudo docker compose up

The docker command quickly ends up in a loop:

cbioportal-container                   | Running Migrate DB Script
cbioportal-container                   | Using database config:
cbioportal-container                   | spring_datasource_username=cbio_user
cbioportal-container                   | spring_datasource_password=somepassword
cbioportal-container                   | spring_datasource_url=jdbc:mysql://cbioportal-database:3306/cbioportal
cbioportal-container                   | mysqladmin: [Warning] Using a password on the command line interface can be insecure.
cbioportal-container                   | mysqld is alive

cbioportal-container                   | Database connection success
cbioportal-container                   | Migrating database if necessary...
cbioportal-container                   | /core/scripts/migrate_db.py:270: SyntaxWarning: invalid escape sequence '\s'
cbioportal-container                   |   line_parts = re.split("--\s", line)
cbioportal-container                   | (1146, "Table 'cbioportal.patient_list' doesn't exist")
cbioportal-container                   | Running statements for version: 1.1.0
cbioportal-container                   | Executing statement: CREATE TABLE sample_list LIKE patient_list;
cbioportal-container exited with code 1 (restarting)


Is this because the database is being seeded in parallel behind the scenes? Is there something else I should be doing? I thought I was following the instructions from https://docs.cbioportal.org/deployment/docker/#quick-start

Any hints/tips would be appreciated. If we can figure it out, then I might even be able to help keep others from falling into the trap.

Thanks!

Benjamin Gross

unread,
Oct 7, 2025, 3:02:56 PM (9 days ago) Oct 7
to Jason Pollock, cBioPortal for Cancer Genomics Discussion Group
Hi Jason,

The steps you are running are all you should need to do.  Based on the provided snippet it looks like the MySQL cBioPortal database was not initialized properly.  There are a few ways to confirm this:

1) View the logs of the cbioportal mysql container and verify that mysql is properly stepping the database schema and loading the seed database:

Run:

docker logs cbioportal-database-container 2>&1 | grep initdb

You should get something back like:

2025-10-07 18:34:57+00:00 [Note] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/cgds.sql
2025-10-07 18:34:58+00:00 [Note] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/seed.sql.gz

2) If you see this above entries, take it one step farther and confirm that the database and tables exist within the cbioportal-database-container:

Run:

docker exec -it cbioportal-database-container bash

Then inside the container run:
mysql -u root -p$MYSQL_ROOT_PASSWORD -e "SHOW DATABASES;”

You should get a “Database” listing back that includes “cbioportal”

If you see the cbioportal database, you can then run:

mysql -u root -p$MYSQL_ROOT_PASSWORD cbioportal -e "SHOW TABLES;”

This will return a list of about 50 tables, beginning with “allele_specific_copy_number” and ending with “users”.

If you’ve confirm that the database was not initialized properly, you will have to bring down the docker containers and remove the persistent volume (where MySQL stores the cbioportal database).  Removing the persistent volume is essential.   This will force MySQL to reinitialize the cBioPortal database on startup.

Stop and remove containers and volumes:

docker-compose down -v

Restart fresh:

docker-compose up -d

After doing this, you should be able to go though steps 1) and 2) above to confirm the proper database initialization.  If this doesn’t work, it could be that the MySQL container cannot find the schema and seed database files (the container log file may confirm this).  I would check that cgds.sql and seed.sql.gz were properly downloaded and placed in the /data subdirectory.  Note, the MySQL container is programmed to look in the docker-entry point-initdb.d directory inside the container the first time it is started, so its important the .sql files have been downloaded and placed in the correct directory as they get mapped to this location in the container per docker-compose.yml:

 - ./data/cgds.sql:/docker-entrypoint-initdb.d/cgds.sql:ro
 - ./data/seed.sql.gz:/docker-entrypoint-initdb.d/seed.sql.gz:ro

After all this, if you are still having an issue, send me the output of the docker logs command and I can try to determine the issue.

Good luck,
-Benjamin

Reply all
Reply to author
Forward
0 new messages