Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

formgrader url returns 503 error #722

Closed
pjamason opened this issue Feb 27, 2017 · 4 comments
Closed

formgrader url returns 503 error #722

pjamason opened this issue Feb 27, 2017 · 4 comments
Labels
Milestone

Comments

@pjamason
Copy link

I'm getting a 503 error when I go to my formgrader url (https:///services/formgrader-beng100). I've upgraded to nbgrader 0.4 and am using the config settings in the nbgrader docs. Here's the relevant log output when I launch jupyterhub from the command line:

[I 2017-02-27 23:19:53.871 JupyterHub orm:163] Adding service formgrader-beng100 to proxy /services/formgrader-beng100 => http://127.0.0.1:9000
[D 2017-02-27 23:19:53.891 JupyterHub orm:146] Fetching POST http://127.0.0.1:8001/api/routes/services/formgrader-beng100
[FormgradeApp | WARNING] No nbgrader_config.py file found (rerun with --debug to see where nbgrader is looking)
[FormgradeApp | INFO] Serving MathJax from /home/ubuntu/miniconda3/lib/python3.5/site-packages/notebook/static/components/MathJax/MathJax.js
[FormgradeApp | INFO] Notebook server is running at http://localhost:42030/notebooks/
[FormgradeApp | INFO] The formgrader is running at http://localhost:5000/
[FormgradeApp | INFO] --> Go to http://localhost:5000/ to access the formgrader

Not sure why I'm getting the "No nbgrader_config.py file found" warning, the file is in the same directory I launch jupyterhub from (and in /etc/jupyterhub). If I run 'nbgrader formgrade' from the same location it does find it.

Here's the jupyterhub log info when I go to the formgrader url:

23:20:18.977 - error: [ConfigProxy] Proxy error:  Error: connect ECONNREFUSED 127.0.0.1:9000
    at Object.exports._errnoException (util.js:870:11)
    at exports._exceptionWithHostPort (util.js:893:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1063:14)
23:20:18.978 - error: [ConfigProxy] 503 GET /services/formgrader-beng100

I'm using apache2 for SSL termination, reverse proxying and shibboleth authentication. Thanks!

@whitead
Copy link
Contributor

whitead commented Feb 28, 2017

I just troubleshot this. Can you share your relevant service config from the jupyterhub_config.py file? You can make sure you're in the correct directory by using the cwd argument to the service.

Also, up until a few hours ago, formgrader was broken for reverse-proxied jupyterhubs. You may want to update JupyterHub to master.

@jhamrick
Copy link
Member

Yes, sharing your config would be helpful! Additionally, if you can run the nbgrader service with --debug (as suggested), that will tell you where nbgrader is looking for the config file (and give you a sense for why it can't find it).

@pjamason
Copy link
Author

The cwd setting was incorrect. I've updated it to the course directory:

# This is the key piece which defines how JupyterHub should talk to nbgrader
c.JupyterHub.services = [
    {
        # This is the name of the service, which will be accessible at
        # yourdomain.com/services/<name>. You can customize this to be unique
        # for your class, so that you can run multiple instances of the
        # formgrader.
        'name': 'formgrader-beng100',
        'admin': True,
        'command': ['nbgrader', 'formgrade'],

        # This URL should match the IP address and port as it is set in
        # the nbgrader_config.py file.
        'url': 'http://127.0.0.1:9000',

        # This should be the full path to where the nbgrader directory lives.
        'cwd': '/home/pjamason/beng100'
    }
]

It's working now, thank you!

We're using SystemUserSpawner so I'll create the system user for the instructor, and change the cwd setting to their nbgrader/course directory .

@jhamrick jhamrick added this to the No action milestone Apr 18, 2017
@jhamrick
Copy link
Member

Closing this as the issue seems to be resolved, but feel free to open another issue if you have any further questions!

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

No branches or pull requests

3 participants