INSaFLU / docker

Easy installation for INSaFLU made by docker
7 stars 6 forks source link

Viral Detection Module #31

Closed Guasupito closed 5 months ago

Guasupito commented 7 months ago

Good morning Daniel

We are trying to add the viral detection module to our local installation of INSAFLU at FISABIO, but after executing the up_televir.sh script, it finish with a code 0 and this message after a few seconds execution:

root@gaspra:~/docker# ./up_televir.sh

And after that, if we check the docker we don't see a televir-server component, instead we see this:

root@gaspra:~/docker# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b3e3ebf3b8f8 funkyfuture/deck-chores:1 "deck-chores" 29 seconds ago Up 24 seconds docker-officer-1 d93d1110829a monsantopinheiro:insaflu-server "/entrypoint.sh init…" 10 months ago Up 5 months 0.0.0.0:8080->80/tcp, :::8080->80/tcp insaflu-server 48a022de7f6e prodrigestivill/postgres-backup-local "/bin/sh -c 'exec /u…" 10 months ago Up 5 months (healthy) 5432/tcp postgres_backup 30a2d45fc014 docker-db_insaflu "docker-entrypoint.s…" 10 months ago Up 5 months 5432/tcp postgres

It seams that a container named docker-officer-1 was generated after executing the script.

INSAFLU has to be stoped before executing the up_televir.sh script?

We are behind a proxy server. We need to configure anithing extra in orther to the script to download all its data correctly?

Thanks foryour help and kind regards, Guillermo.

SantosJGND commented 7 months ago

Dear Guillermo,

The sole purpose of the televir-server component is to install databases and software relevant for the viral detection module.

After finishing, it is not needed anymore. so it is normal to not see a televir-server component.

As to a solution:

I would suggest to begin by re-running up.sh if, as seems to be indicated by your last log, your docker installation is older than 5 months. This will ensure that an updated version of TELEVIR is installed.

i. From what I could see the databases seem to have been installed correctly (the cp error reported does not impact installation). To check, just access the web application. On the Homepage, Projects and Settings pages, you should see 3 icons, namely a new section for the viral detection module.

ii. If you still don't seem to have the viral detection functionality, you can try, on your terminal:

iii. If then you still don't have the funcionality, from your log I'm seeing one possible issue, it should be as simple to solve as renaming a filename. Just go inside the insaflu-server instance:

Check the directory /televir/mngs_benchmark/ for the file utility_docker.db. e.g.

If not, and another version of this file is present (e.g. utility_docker-test.db), then please rename it and restart apache and you should be good to go. e.g.

Finally, if no utility_docker.db file or variant is present in this directory, then please let us know for further investigation.

In principle, no extra configurations are needed for deployment behind a proxy. At least with regards to Televir Software and Database installation, as attested by their successful installation (from the logs).

Please let us know how this goes, At your disposal, On behalf of the INSaFLU team, Joao

Guasupito commented 6 months ago

Good morning Joao

We are trying for several weeks to make the new install work.

Finally, editing the scripts of the televir and insaflu installation in orther to use our proxy, we were able to install correctly without errors the televir module. We added this line at the begining of each .sh script in orther to everythin could work trhough our proxy:

!/bin/bash

set -e export http_proxy=http://proxy.san.gva.es:8080

But now, when we run the up.sh script, all seams to be running fine, except apache. This is the execution:

administrador@gaspra:/insaflu/docker$ ./up.sh

The script stops here, and after many many minutes we got this error: 448c8c8eabda_insaflu-server exited with code 137 and the container is stoped.

What could be happening?

We also tried to uninstall everything, including docker, and start again. But always stop in the same place.

Thanks for your help.

dsobral commented 6 months ago

Dear Guillermo,

It is normal that the script stops there, as it means the website should be running.

If you go to the browser to localhost:8080 (or the expected IP) INSaFLU should be running.

If not, please see eg. #22 #26 to see what may be causing it

Basically, this usually fixes it for me (assuming the correct IP is already in ALLOWED_HOSTS):

ctrl^c
chmod -R 777 $BASE_PATH_DATA/insaflu/log [where $BASE_PATH_DATA is the folder you defined in .env]
.> /up.sh

If you want the service to run in the background, instead of up.sh just do: docker compose up insaflu-server -d

Hope it helps, Daniel

Guasupito commented 5 months ago

Good afternoon Daniel

After our last communication we followed your recommendations, but after starting the insaflu-server we lost access to the web. We tried many thinks, but nothing worked, so we decided to move the server to another location where de proxy isn't needed and reinstall the server.

We use Ubuntu 20.04 LTS as the Operating System (we encounter problems with more modern versions, even we tried to install Rocky, but the server is a bit old and didn't boot).

With Ubuntu 20.04 we were able to install Insaflu-server using docker following the instructions, but we cannot deploy televir-server.

The image is generated, but when is about to start the container and is executing the entripoint.sh script it fails:

administrador@gaspra:/insaflu/docker$ sudo ./up_televir.sh

I have been working on this for several days and I am out of ideas about what could be happening.

Any thoughts?

SantosJGND commented 5 months ago

Dear Guillermo,

First of all, Sorry for the delay in replying.

And thank you for this report. We have found it to have been caused by a software version update we had not controlled for.

I am happy to say that this issue has been addressed.

To run the latest version of the code, please travel to your INSaFLU docker directory and pull the latest version of this git repository. after that, re-run up.sh and up_televir.sh, in that order. i.e.

cd docker/

git pull origin master

./up.sh

./up_televir.sh

The installation will take a while.

Thank you again, Please do not hesitate in contacting us should you encounter any other problem, Best regards, Joao

Guasupito commented 5 months ago

Good morning,

Finally all is up and working!

After following your instructions I had to connect to the insaflu-server and delete the utility_docker.db and re-run the up_televir.sh script in order to be able to run the televir module.

But now it seams is all working.

We will install the server in it's final possition and check if it works fine behind the proxy server.

Kind regards.