ga4gh / ga4gh-server

Reference implementation of the APIs defined in ga4gh-schemas. RETIRED 2018-01-24
http://ga4gh.org
Apache License 2.0
96 stars 91 forks source link

Internal Server Error with master and release 0.3.6 #1637

Open rdeborj opened 7 years ago

rdeborj commented 7 years ago

I've downloaded and built the docker image for both the master branch and the latest tagged version 0.3.6. After successfully building the docker images (e.g. docker build -t ga4gh_server_0_3_6 .) and running it (e.g. docker run -d -p 8222:80 --name ga4gh_server_test ga4gh_server_0_3_6), I attempt to load the default page however an "Internal Server Error" appears. The same occurs for the master branch. I have done a pull on the latest version in docker hub (i.e. afirth/ga4gh-server) and this successfully shows the demo landing page. Any suggestions on building the docker image so that it successfully runs?

rdeborj commented 7 years ago

Upon investigation into the apache2 logs, it seems the peer service is failing as the "initial_peers.txt" file is missing:

IOError: [Errno 2] No such file or directory: u'ga4gh/server/templates/initial_peers.txt'

In the afirth/ga4gh-server docker build, peer service was not found in the frontend.py script.

kozbo commented 7 years ago

The afirth/ga4gh-server is not the latest ga4gh-server docker image. See the docs here for more information: http://ga4gh-server.readthedocs.io/en/latest/installation.html?highlight=docker#deployment-on-docker

You can add your own initial_peers.txt file (just point it at 1kgemomes.ga4gh.org). You can find some more information about configuration here: http://ga4gh-server.readthedocs.io/en/latest/configuration.html?highlight=initial_peers.

Were you specifically interested in using the peer service, or just trying to set up a GA4GH reference server?

rdeborj commented 7 years ago

Thanks for the followup. I wasn't interested in the peer service at the moment, only in getting the reference server working. The initial_peers.txt file exists on the server and seems to be in the right location with the inclusion of 1kgenomes.ga4gh.org, however the script throws the error that the file doesn't exist. The build was done on a fresh clone of the master repo. I also built release 0.3.6 to see if there was a rogue check-in that may have caused issues.

kozbo commented 7 years ago

I wonder if there might be a permissions issue on the file or the parent folder. make sure that the parent folder is owned by www-data. Sorry that I don't have time to set it up and debug from right now.

ljdursi commented 7 years ago

@rdeborj, The dockers I build for the servers generally just create the dummy file eg https://github.com/ljdursi/profyle_ingest_docker/blob/master/scripts/wrapper.sh#L33 , sorry, I should be putting those in the CanDIG organization

rdeborj commented 7 years ago

Doesn't seem to be a permissions issue. Through the docker container, everything is owned and run by root.

rdeborj commented 7 years ago

As a follow up, one of our students removed the line (309): network.initialize( app.config.get('INITIAL_PEERS'), app.backend.getDataRepository(), app.logger) When the line is removed and rebuilding the docker container, the landing page appears correctly and I am able to run curl commands to get readgroups remotely.

rdeborj commented 7 years ago

After some clues from @ljdursi, I hardcoded the fully qualified path to the initial_peers.txt file in the frontend.py file and everything worked. I've been investigating the serverconfig.py and the frontend.py files to determine how the root directory is fetched and why it isn't being used correctly.

david4096 commented 7 years ago

I think to close this properly the initial peers text should be added to the setup.py package data.

https://docs.python.org/2/distutils/setupscript.html