Skip to content
This repository has been archived by the owner on Jan 24, 2018. It is now read-only.

Internal Server Error with master and release 0.3.6 #1637

Open
rdeborj opened this issue Sep 12, 2017 · 9 comments
Open

Internal Server Error with master and release 0.3.6 #1637

rdeborj opened this issue Sep 12, 2017 · 9 comments

Comments

@rdeborj
Copy link

rdeborj commented Sep 12, 2017

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
Copy link
Author

rdeborj commented Sep 12, 2017

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
Copy link
Contributor

kozbo commented Sep 12, 2017

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
Copy link
Author

rdeborj commented Sep 12, 2017

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
Copy link
Contributor

kozbo commented Sep 12, 2017

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
Copy link

ljdursi commented Sep 12, 2017

@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
Copy link
Author

rdeborj commented Sep 12, 2017

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

@rdeborj
Copy link
Author

rdeborj commented Sep 13, 2017

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
Copy link
Author

rdeborj commented Sep 15, 2017

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
Copy link
Member

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants