galaxy-genome-annotation / docker-tripal

Docker container for Tripal
10 stars 11 forks source link

Installation issues #15

Closed ehsueh closed 7 years ago

ehsueh commented 7 years ago

Hi Eric and Anthony,

Thank you for putting together the docker images for Tripal! :smiley:

I downloaded a zip version and inside directory docker-tripal-master (with the provided yml) I ran: docker-compose up

It's been running (or hanging?) for a couple of hours now. I've also been getting some error messages without the installation aborting. Am I missing some dependencies? May I also ask how long the installation usually take?

Examples of some error messages I'm getting:

db_1             | ERROR:  relation "system" does not exist at character 22
web_1            | ERROR:  function create_point(integer, bigint) does not exist
web_1            | LINE 1: SELECT box (create_point(0, $1), create_point($2,500000000))
web_1            | Error: [] operator not supported for strings in chado_select_record() (line 1200 of /var/www/html/sites/all/modules/tripal/tripal_core/api/tripal_core.chado_query.api.inc).
web_1            | A non well formed numeric value encountered drush.inc:1643              [notice]
dockertripalmaster_web_1 exited with code 1

Thank you, Emma

hexylena commented 7 years ago

Hi Emma,

Hmm. The time-to-launch should be ~2-3 minutes, certainly not hours. Sorry to hear you've been waiting so long!

You can't be missing dependencies since everything is self-contained in the docker image. If you have docker/docker-compose working (as is clear from logs), then that should be all you need.

I've made a couple small changes to the repository, you might try re-downloading.

Then, I find that the tripal image can be a bit finnicky about the database not starting up in time. You might try:

web_1  | WD system: filter module installed.                                       [info]
web_1  | WD system: filter module enabled.                                         [info]
web_1  | WD system: field_sql_storage module installed.                            [info]
web_1  | WD system: field_sql_storage module enabled.                              [info]

and then a large number of create/insert statements (which is chado loading).

Hope this helps, let us know if you have any more questions!

ehsueh commented 7 years ago

Hi Eric, thanks for getting back so quickly!

I downloaded the new version and removed the old images. Then did:

$ docker-compose up -d db dockertripalmaster_db_1 is up-to-date $ docker-compose logs -f db Attaching to dockertripalmaster_db_1 db_1 | The files belonging to this database system will be owned by user "postgres". db_1 | This user must also own the server process. ... db_1 | ERROR: relation "chadoprop" does not exist at character 15 ... db_1 | PostgreSQL init process complete; ready for start up. db_1 | db_1 | LOG: database system was shut down at 2016-12-15 15:41:52 UTC db_1 | LOG: MultiXact member wraparound protections are now enabled db_1 | LOG: database system is ready to accept connections db_1 | LOG: autovacuum launcher started

Postgres autovacuum process persisted until I hit ^C to abort it. (I've experienced similar issues before when I was setting up my own docker for chado. Autovacuum would hang until I kill it then everything would run fine again and the db installation would turn out successful. I thought maybe it'd be fine here too since the init process was complete.)

When I tried to create the web part after, I get the following:

$ docker-compose up web ... web_1 | ERROR: function create_point(integer, bigint) does not exist web_1 | LINE 1: SELECT box (create_point(0, $1), create_point($2,500000000)) web_1 | ^ web_1 | HINT: No function matches the given name and argument types. You might need to add explicit type casts. web_1 | QUERY: SELECT box (create_point(0, $1), create_point($2,500000000)) web_1 | CONTEXT: SQL function "boxrange" during inlining ... web_1 | ERROR: relation "featuregroup" does not exist ... web_1 | WD php: Error: [] operator not supported for strings in [error] web_1 | chado_select_record() (line 1200 of web_1 | /var/www/html/sites/all/modules/tripal/tripal_core/api/tripal_core.chado_query.api.inc). web_1 | Cannot modify header information - headers already sent by (output [warning] web_1 | started at /root/.composer/vendor/drush/drush/includes/output.inc:40) web_1 | bootstrap.inc:1471 web_1 | Drush command terminated abnormally due to an unrecoverable error. [error] web_1 | A non well formed numeric value encountered drush.inc:1643 [notice] web_1 | Error: [] operator not supported for strings in chado_select_record() (line 1200 of /var/www/html/sites/all/modules/tripal/tripal_core/api/tripal_core.chado_query.api.inc). dockertripalmaster_web_1 exited with code 1

Google search showed that other people had similar errors before due to search path issues. Here are some reference links: http://gmod.827538.n3.nabble.com/error-while-loading-a-dump-file-td4034514.html http://gmod.827538.n3.nabble.com/Problems-with-featureloc-table-td4032948.html

hexylena commented 7 years ago

Postgres autovacuum process persisted until I hit ^C to abort it.

Are you sure autovacuum is hanging? For me, that's the last line of logging that I receive from the container, but the container is perfectly functional, that's simply the last task it executes during startup. If I had to guess, that's what's happening for you.

db_1 | ERROR: relation "chadoprop" does not exist at character 15

That specific error is normal, I need to add a specific check for that to make it quieter.

Sorry, this may not have been a super-helpful reply, these are the hardest issues to debug.

ehsueh commented 7 years ago

Hmm... I'm not sure how to find out exactly what the autovacuum is doing... but I think you are right. The db container seems to be working perfectly despite those messages.

p.s. No sorry~ Please don't be sorry at all. I think it's really awesome that you made projects like this one publicly available and I really appreciate all your help! :grin:

abretaud commented 7 years ago

Hi,

WD php: Error: [] operator not supported for strings in [error]

I think this error is not expected, can you paste what comes just before?

Did you made changes to the docker-compose.yml file?

ehsueh commented 7 years ago

Hi Anthony,

No I didn't change the yml file.

web_1 | The following extensions will be enabled: tripal_views, tripal_db, tripal_cv, tripal_organism, tripal_analysis, tripal_feature, tripal_genetic, tripal_natural_diversity, tripal_phenotype, tripal_project, tripal_pub, tripal_stock, tripal_analysis_blast, tripal_analysis_interpro, tripal_analysis_go, tripal_rest_api, tripal_elasticsearch, tripal_contact, queue_ui web_1 | Do you really want to continue? (y/n): y web_1 | WD system: queue_ui module installed. [info] web_1 | WD system: queue_ui module enabled. [info] web_1 | WD system: tripal_views module installed. [info] web_1 | WD system: tripal_views module enabled. [info] web_1 | WD system: tripal_db module installed. [info] web_1 | WD system: tripal_db module enabled. [info] web_1 | WD system: tripal_cv module installed. [info] web_1 | WD system: tripal_cv module enabled. [info] web_1 | WD php: Error: [] operator not supported for strings in [error] web_1 | chado_select_record() (line 1200 of web_1 | /var/www/html/sites/all/modules/tripal/tripal_core/api/tripal_core.chado_query.api.inc). web_1 | Cannot modify header information - headers already sent by (output [warning] web_1 | started at /root/.composer/vendor/drush/drush/includes/output.inc:40) web_1 | bootstrap.inc:1471

Those are the messages around that line.

abretaud commented 7 years ago

I think it should be fixed when https://github.com/tripal/tripal/pull/21 is merged

ehsueh commented 7 years ago

Thanks! I'll test it out when it's merged.

abretaud commented 7 years ago

Hi, As I was blocked by this error, I just made a commit to apply the patch during the install process. It should do the job until https://github.com/tripal/tripal/issues/21 is merged If you test, it should be ok now

bradfordcondon commented 7 years ago

Thank you for patching this!

ehsueh commented 7 years ago

Thanks Anthony. I cloned the latest version with the temp fix; however, I am still running into the same errors when bringing up the web part. :confused:

bradfordcondon commented 7 years ago

Hello, I'm still learning Docker but I had the same issue, maybe I can help.

I believe if you run docker-compose up as written, you won't use the updated Tripal docker file. Maybe the corresponding docker image (living on Docker hub) hasn't been updated?

What you need to do is compose a new docker image with the updated repo here

docker build -t temporarytripal .

then modify the below line in the docker-compose file to reference the patched image:

web: image: temporarytripal

Then when you run docker-compose, you'll use the updated tripal image.

Cheers

abretaud commented 7 years ago

Yep, your solution works @bradfordcondon, but there is a simpler way: just run docker-compose pull from the directory containing the docker-compose.yml It will pull the latest version of the image from hub.docker.com, then you can do a docker-compose up as usual and it should work Tell me if you still have problems

bradfordcondon commented 7 years ago

Thanks @abretaud. Sorry for complicating the matter @ehsueh !

ehsueh commented 7 years ago

Oh! I see! Thank you both! It's working now!!! :smile: