From: Tapia, A. C. <and...@uk...> - 2020-07-31 12:21:11
|
Hi, I am currently experimenting with setting up a Tripal site, and I wanted to know if it is still possible to use an external Chado database with Tripal v3.3. I tried adding the following code to my settings.php file (as suggested in https://sourceforge.net/p/gmod/mailman/message/34332841/). $databases['chado']['default'] = array( 'driver' => 'pgsql', 'database' => 'gmod-chado', 'username' => 'chado', 'password' => '*******', 'host' => 'localhost', 'prefix' => '', ); Although it seems that Tripal recognizes that Chado is installed when the above code is in settings.php, Tripal still warns that Drupal and Chado need to be prepared, and running the "Prepare Chado" job gives an error like the one below. Job execution failed: PDOException: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "db" does not exist [error] LINE 1: SELECT * FROM db WHERE name = 'NCIT' ^ in /var/www/html/includes/database/database.inc:2227 Stack trace: #0 /var/www/html/includes/database/database.inc(2227): PDOStatement->execute(Array) #1 /var/www/html/includes/database/pgsql/database.inc(111): DatabaseStatementBase->execute(Array, Array) #2 /var/www/html/includes/database/database.inc(2406): DatabaseConnection_pgsql->query('SELECT * FROM {...', Array, Array) #3 /var/www/html/sites/all/modules/tripal/tripal_chado/api/tripal_chado.query.api.inc(1808): db_query('SELECT * FROM {...', Array) #4 /var/www/html/sites/all/modules/tripal/tripal_chado/api/tripal_chado.query.api.inc(1612): chado_query('SELECT * FROM {...', Array) #5 /var/www/html/sites/all/modules/tripal/tripal_chado/api/modules/tripal_chado.db.api.inc(376): chado_select_record('db', Array, Array) #6 /var/www/html/sites/all/modules/tripal/tripal_chado/includes/setup/tripal_chado.setup.inc(78): chado_insert_db(Array) #7 /var/www/html/sites/all/modules/tripal/tripal_chado/includes/setup/tripal_chado.setup.inc(235): tripal_chado_load_ontologies() #8 /var/www/html/sites/all/modules/tripal/tripal/includes/TripalJob.inc(341): tripal_chado_prepare_chado(Object(TripalJob)) #9 /var/www/html/sites/all/modules/tripal/tripal/api/tripal.jobs.api.inc(419): TripalJob->run() #10 /var/www/html/sites/all/modules/tripal/tripal/tripal.drush.inc(236): tripal_launch_job(0, '34', -1, 0) #11 /root/.composer/vendor/drush/drush/includes/command.inc(361): drush_tripal_trp_run_jobs() #12 /root/.composer/vendor/drush/drush/includes/command.inc(212): _drush_invoke_hooks(Array, Array) #13 /root/.composer/vendor/drush/drush/includes/command.inc(180): drush_command() #14 /root/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(64): drush_dispatch(Array) #15 /root/.composer/vendor/drush/drush/drush.php(70): Drush\Boot\BaseBoot->bootstrap_and_dispatch() #16 /root/.composer/vendor/drush/drush/drush.php(11): drush_main() #17 {main} Likewise, attempting to load an OBO file gives this sort of error. SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "cv" does not exist LINE 1: SELECT * FROM cv CV ^ [site http://default] [TRIPAL ERROR] [TRIPAL_JOB] SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "cv" does not existLINE 1: SELECT * FROM cv CV Are external Chado databases still supported, or could this just be a problem with my configuration? Thanks, Andrew Tapia |
From: bradford c. <bra...@gm...> - 2020-08-02 21:00:39
|
To my knowledge Tripal 3.3 supports an external Chado database, and the Chado prepare DB job should be compatible with an external chado database. Have you verified that you are able to connect to your chado database with those credentials, and that a CV and DB table exists? Your configuration looks correct to me. > On Jul 31, 2020, at 7:46 AM, Tapia, Andrew C. <and...@uk...> wrote: > > Hi, > > I am currently experimenting with setting up a Tripal site, and I wanted to know if it is still possible to use an external Chado database with Tripal v3.3. > > I tried adding the following code to my settings.php file (as suggested in https://sourceforge.net/p/gmod/mailman/message/34332841/ <https://sourceforge.net/p/gmod/mailman/message/34332841/>). > > $databases['chado']['default'] = array( > 'driver' => 'pgsql', > 'database' => 'gmod-chado', > 'username' => 'chado', > 'password' => '*******', > 'host' => 'localhost', > 'prefix' => '', > ); > > Although it seems that Tripal recognizes that Chado is installed when the above code is in settings.php, Tripal still warns that Drupal and Chado need to be prepared, and running the "Prepare Chado" job gives an error like the one below. > > Job execution failed: PDOException: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "db" does not exist [error] > LINE 1: SELECT * FROM db WHERE name = 'NCIT' > ^ in /var/www/html/includes/database/database.inc:2227 > Stack trace: > #0 /var/www/html/includes/database/database.inc(2227): PDOStatement->execute(Array) > #1 /var/www/html/includes/database/pgsql/database.inc(111): DatabaseStatementBase->execute(Array, Array) > #2 /var/www/html/includes/database/database.inc(2406): DatabaseConnection_pgsql->query('SELECT * FROM {...', Array, Array) > #3 /var/www/html/sites/all/modules/tripal/tripal_chado/api/tripal_chado.query.api.inc(1808): db_query('SELECT * FROM {...', Array) > #4 /var/www/html/sites/all/modules/tripal/tripal_chado/api/tripal_chado.query.api.inc(1612): chado_query('SELECT * FROM {...', Array) > #5 /var/www/html/sites/all/modules/tripal/tripal_chado/api/modules/tripal_chado.db.api.inc(376): chado_select_record('db', Array, Array) > #6 /var/www/html/sites/all/modules/tripal/tripal_chado/includes/setup/tripal_chado.setup.inc(78): chado_insert_db(Array) > #7 /var/www/html/sites/all/modules/tripal/tripal_chado/includes/setup/tripal_chado.setup.inc(235): tripal_chado_load_ontologies() > #8 /var/www/html/sites/all/modules/tripal/tripal/includes/TripalJob.inc(341): tripal_chado_prepare_chado(Object(TripalJob)) > #9 /var/www/html/sites/all/modules/tripal/tripal/api/tripal.jobs.api.inc(419): TripalJob->run() > #10 /var/www/html/sites/all/modules/tripal/tripal/tripal.drush.inc(236): tripal_launch_job(0, '34', -1, 0) > #11 /root/.composer/vendor/drush/drush/includes/command.inc(361): drush_tripal_trp_run_jobs() > #12 /root/.composer/vendor/drush/drush/includes/command.inc(212): _drush_invoke_hooks(Array, Array) > #13 /root/.composer/vendor/drush/drush/includes/command.inc(180): drush_command() > #14 /root/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(64): drush_dispatch(Array) > #15 /root/.composer/vendor/drush/drush/drush.php(70): Drush\Boot\BaseBoot->bootstrap_and_dispatch() > #16 /root/.composer/vendor/drush/drush/drush.php(11): drush_main() > #17 {main} > > Likewise, attempting to load an OBO file gives this sort of error. > > SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "cv" does not exist > LINE 1: SELECT * FROM cv CV > ^ > [site http://default <http://default/>] [TRIPAL ERROR] [TRIPAL_JOB] SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "cv" does not existLINE 1: SELECT * FROM cv CV > > > Are external Chado databases still supported, or could this just be a problem with my configuration? > > Thanks, > > Andrew Tapia > _______________________________________________ > Gmod-tripal mailing list > Gmo...@li... <mailto:Gmo...@li...> > https://lists.sourceforge.net/lists/listinfo/gmod-tripal <https://lists.sourceforge.net/lists/listinfo/gmod-tripal> |
From: Tapia, A. C. <and...@uk...> - 2020-08-03 19:25:56
|
I can confirm that the command below works. PGPASSWORD='*******' psql -U chado -h localhost gmod-chado -c 'SELECT * FROM cv LIMIT 1; SELECT * FROM db LIMIT 1;' I tried logging the queries made as the "Prepare Chado" job runs, and it looks like Tripal is still trying to find the tables in the drupal database. I've pasted a few lines from the log below. 2020-08-03 14:34:12.568 EDT,"drupal","drupal",580,"127.0.0.1:57090",5f2858a4.244,90,"idle",2020-08-03 14:34:12 EDT,3/817,0,LOG,00000,"statement: SET search_path TO chado,public",,,,,,,,,"" 2020-08-03 14:34:12.568 EDT,"drupal","drupal",580,"127.0.0.1:57090",5f2858a4.244,91,"idle",2020-08-03 14:34:12 EDT,3/818,0,LOG,00000,"statement: SELECT * FROM db WHERE name = 'NCIT' ",,,,,\ ,,,,"" 2020-08-03 14:34:12.568 EDT,"drupal","drupal",580,"127.0.0.1:57090",5f2858a4.244,92,"SELECT",2020-08-03 14:34:12 EDT,3/818,0,ERROR,42P01,"relation ""db"" does not exist",,,,,,"SELECT * FRO\ M db WHERE name = 'NCIT' ",15,,"" Do you have any other ideas for what I could try to troubleshoot this? Thanks, Andrew Tapia ________________________________ From: bradford condon <bra...@gm...> Sent: Sunday, August 2, 2020 5:00 PM To: Tapia, Andrew C. <and...@uk...> Cc: gmo...@li... <gmo...@li...> Subject: Re: [Gmod-tripal] External Chado support with Tripal v3.3 CAUTION: External Sender To my knowledge Tripal 3.3 supports an external Chado database, and the Chado prepare DB job should be compatible with an external chado database. Have you verified that you are able to connect to your chado database with those credentials, and that a CV and DB table exists? Your configuration looks correct to me. On Jul 31, 2020, at 7:46 AM, Tapia, Andrew C. <and...@uk...<mailto:and...@uk...>> wrote: Hi, I am currently experimenting with setting up a Tripal site, and I wanted to know if it is still possible to use an external Chado database with Tripal v3.3. I tried adding the following code to my settings.php file (as suggested in https://sourceforge.net/p/gmod/mailman/message/34332841/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fp%2Fgmod%2Fmailman%2Fmessage%2F34332841%2F&data=02%7C01%7Candrew.tapia%40uky.edu%7Ce342184686684a330dc808d8372718b3%7C2b30530b69b64457b818481cb53d42ae%7C0%7C1%7C637319988347080413&sdata=yrLmp%2BeGXbLouMtu9MMxaJfT5om4O7MonW0%2FdKd7Zec%3D&reserved=0>). $databases['chado']['default'] = array( 'driver' => 'pgsql', 'database' => 'gmod-chado', 'username' => 'chado', 'password' => '*******', 'host' => 'localhost', 'prefix' => '', ); Although it seems that Tripal recognizes that Chado is installed when the above code is in settings.php, Tripal still warns that Drupal and Chado need to be prepared, and running the "Prepare Chado" job gives an error like the one below. Job execution failed: PDOException: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "db" does not exist [error] LINE 1: SELECT * FROM db WHERE name = 'NCIT' ^ in /var/www/html/includes/database/database.inc:2227 Stack trace: #0 /var/www/html/includes/database/database.inc(2227): PDOStatement->execute(Array) #1 /var/www/html/includes/database/pgsql/database.inc(111): DatabaseStatementBase->execute(Array, Array) #2 /var/www/html/includes/database/database.inc(2406): DatabaseConnection_pgsql->query('SELECT * FROM {...', Array, Array) #3 /var/www/html/sites/all/modules/tripal/tripal_chado/api/tripal_chado.query.api.inc(1808): db_query('SELECT * FROM {...', Array) #4 /var/www/html/sites/all/modules/tripal/tripal_chado/api/tripal_chado.query.api.inc(1612): chado_query('SELECT * FROM {...', Array) #5 /var/www/html/sites/all/modules/tripal/tripal_chado/api/modules/tripal_chado.db.api.inc(376): chado_select_record('db', Array, Array) #6 /var/www/html/sites/all/modules/tripal/tripal_chado/includes/setup/tripal_chado.setup.inc(78): chado_insert_db(Array) #7 /var/www/html/sites/all/modules/tripal/tripal_chado/includes/setup/tripal_chado.setup.inc(235): tripal_chado_load_ontologies() #8 /var/www/html/sites/all/modules/tripal/tripal/includes/TripalJob.inc(341): tripal_chado_prepare_chado(Object(TripalJob)) #9 /var/www/html/sites/all/modules/tripal/tripal/api/tripal.jobs.api.inc(419): TripalJob->run() #10 /var/www/html/sites/all/modules/tripal/tripal/tripal.drush.inc(236): tripal_launch_job(0, '34', -1, 0) #11 /root/.composer/vendor/drush/drush/includes/command.inc(361): drush_tripal_trp_run_jobs() #12 /root/.composer/vendor/drush/drush/includes/command.inc(212): _drush_invoke_hooks(Array, Array) #13 /root/.composer/vendor/drush/drush/includes/command.inc(180): drush_command() #14 /root/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(64): drush_dispatch(Array) #15 /root/.composer/vendor/drush/drush/drush.php(70): Drush\Boot\BaseBoot->bootstrap_and_dispatch() #16 /root/.composer/vendor/drush/drush/drush.php(11): drush_main() #17 {main} Likewise, attempting to load an OBO file gives this sort of error. SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "cv" does not exist LINE 1: SELECT * FROM cv CV ^ [site http://default<http://default/>] [TRIPAL ERROR] [TRIPAL_JOB] SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "cv" does not existLINE 1: SELECT * FROM cv CV Are external Chado databases still supported, or could this just be a problem with my configuration? Thanks, Andrew Tapia _______________________________________________ Gmod-tripal mailing list Gmo...@li...<mailto:Gmo...@li...> https://lists.sourceforge.net/lists/listinfo/gmod-tripal<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fgmod-tripal&data=02%7C01%7Candrew.tapia%40uky.edu%7Ce342184686684a330dc808d8372718b3%7C2b30530b69b64457b818481cb53d42ae%7C0%7C1%7C637319988347090407&sdata=YrZN7W0phMA%2BgmMtLzyAypUDf6t0hhjLHYMwvKnXJeM%3D&reserved=0> |