Open wdesouza opened 7 years ago
Hi @Welliton309 The problem here is the download_example_data script generates relative paths, while when you're running in apache the relative path you're running from is not your source folder.
One thing you can do is edit the registry to have the absolute path for those variant sets. Another option would be to edit scripts/download_example_data
and changing the relative to absolute paths then rerunning it.
Best option would be to regenerate the registry using the repo CLI. I think we ought to enforce that absolute paths are always used in the registry, but the example data is a special case where we want it to be portable.
Maybe there is a better way to handle both cases? https://github.com/ga4gh/server/issues/1442
Thank you @david4096 for the response. In production environment I always use absolute path to create the repository. However, it would be useful if we have a example data to test server deployment configurations before exposing real data. I think the idea of packing example data would be a good solution.
I am testing the new release of the server (0.3.6) and the error related to example data was changed. Now it says that the registry.db
file from example data (4.6) is malformed.
ga4gh_repo verify ga4gh-example-data/registry.db
/srv/ga4gh/ga4gh-server-env/bin/ga4gh_repo: error: Database file
'ga4gh-example-data/registry.db' is malformed. Either change the
configuration to point to a valid file or create one using the repo
manager.
I guess this file is outdated. Is there a new version of example data to test?
Yes, we'll need to update the example data!
This issue will close when we've solved how to demonstrate properly with example data when running behind Apache and documenting it. The problem is that the Apache process needs to get the same base path as the code.
I think that if you change the WSGIDaemonProcess home path it might work:
WSGIDaemonProcess ga4gh \
processes=10 threads=1 \
python-path=/srv/ga4gh/ga4gh-server-env/lib/python2.7/site-packages \
python-eggs=/var/cache/apache2/python-egg-cache \
home=/srv/ga4gh
WSGIScriptAlias /ga4gh /srv/ga4gh/application.wsgi
From https://code.google.com/archive/p/modwsgi/wikis/ConfigurationDirectives.wiki#WSGIPythonPath
Defines an absolute path of a directory which should be used as the initial current working directory of the daemon processes within the process group.
If this option is not defined, in mod_wsgi 1.X the current working directory of the Apache parent process will be inherited by the daemon processes within the process group. Normally the current working directory of the Apache parent process would be the root directory. In mod_wsgi 2.0+ the initial current working directory will be set to be the home directory of the user that the daemon process runs as.
An alternative might be to switch to gunicorn https://github.com/ga4gh/ga4gh-server/pull/1607, which will allow the documentation to be simpler.
I am trying to deploy and test GA4GH server at a fresh installation of Ubuntu 16.04. I did everything in Deployment on Apache documentation. When I tried to search for variants,
I got this error:
The server-side log (
/var/log/apache2/error.log
):It seems that server cannot find VCF file defined as relative path. Did I do something wrong?