Skip to content

Instantly share code, notes, and snippets.

@drj11
Last active April 18, 2017 15:34
Show Gist options
  • Save drj11/34e30669c11e1f5c792ffcd15d8b0462 to your computer and use it in GitHub Desktop.
Save drj11/34e30669c11e1f5c792ffcd15d8b0462 to your computer and use it in GitHub Desktop.
A day debugging

Why Doesn't my webserver work?

What ports are being listened on?

netstat --listen --inet # warning IPv4 only

netstat --numeric --listen --tcp

netstat -peanut

Use curl to check that the local stack is running:

curl -H 'Host: dev.genometranslationcommons.org' http://127.0.0.1/

any response from this means that apache is running; if you get the (expected) 302 redirect then it means apache is correctly configured to use sites-enabled/25-refinery.conf

To make a curl that reached the Django app, you have to fake being an AWS ELB by adding the X-Fordwarded-Proto header:

curl -H 'X-Forwarded-Proto: https' -H 'Host: dev.genometranslationcommons.org' http://127.0.0.1/

The output should be the front page of Refinery, which is a big bunch of templated HTML (and JavaScript).

what is running?

pstree is pretty useful. Especially to see if could-init is still running.

ps waxwux

How do I tell if celery or supervisord is running?

ps waxwux | grep supervisord should show the supervisord process if it is running. Also, there should be a /tmp/supervisord.pid file.

Similarly, ps waxwux | grep celery should show the celery processes.

Log files appear in /srv/refinery-platform/refinery/log (or in general, refinery/log relative to whereever the git repo is checked out).

How do I tell if solr is running?

The usual ps waxwux | grep solr does in fact work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment