phenopolis / phenopolis_genomics_browser

Python API and React frontend for the Phenopolis Genomics Browser
https://dev-live.phenopolis.org
MIT License
31 stars 2 forks source link

API dev is down - #383

Closed IsmailM closed 2 years ago

IsmailM commented 2 years ago
[E::hts_open_format] Failed to open file "s3://phenopolis-vcf/August2019/merged2.vcf.gz" : Input/output error
[2021-12-12 17:50:31 +0000] [3609] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
    worker.init_process()
  File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/gunicorn/workers/gthread.py", line 92, in init_process
    super().init_process()
  File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/gunicorn/workers/base.py", line 134, in init_process
    self.load_wsgi()
  File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
    return self.load_wsgiapp()
  File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/gunicorn/util.py", line 359, in import_app
    mod = importlib.import_module(module)
  File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/var/app/current/application.py", line 4, in <module>
    from views import application, APP_ENV
  File "/var/app/current/views/__init__.py", line 36, in <module>
    variant_file = VCF(os.getenv("VCF_FILE"))
  File "cyvcf2/cyvcf2.pyx", line 258, in cyvcf2.cyvcf2.VCF.__init__
  File "cyvcf2/cyvcf2.pyx", line 190, in cyvcf2.cyvcf2.HTSFile._open_htsfile
OSError: Error opening s3://phenopolis-vcf/August2019/merged2.vcf.gz
[2021-12-12 17:50:31 +0000] [3609] [INFO] Worker exiting (pid: 3609)
[2021-12-12 17:50:31 +0000] [3606] [INFO] Shutting down: Master
[2021-12-12 17:50:31 +0000] [3606] [INFO] Reason: Worker failed to boot.
IsmailM commented 2 years ago

Maybe because htslib is not installed with S3 plugin compatibility?

@alanwilter - by any chance, did you run anything special on the web server itself to get it working last time?

Any configurations should end up in executable files inside ./platform/*/*.sh - as these scripts are run when generating a new webserver...

I see the cyvcf version was updated in the requirements.txt - but we are still installing an older version here:

https://github.com/phenopolis/phenopolis_genomics_browser/blob/8848effbe301c16a7ff5686bcd1ff3a4162fe4c8/.platform/hooks/prebuild/01_install_packages.sh#L10

alanwilter commented 2 years ago

Ah, you need to update cyvcf2, try cyvcf2>=0.30.12.

I hope it will work. If so, please, close it.

IsmailM commented 2 years ago

Thanks - that fixed it 👍

(I pushed directly to the dev-live branch - Github Action did fail - but I suspect that this is because the tests check against the live dev database (which was down)?)