Proxy Error: Socket Hang up (nbgrader formgrader)
See original GitHub issueHi,
I seem to be getting a wierd issue with the nginx proxy and nbgrader formgrader service on jupyterhub. I used the Jupyter-deploy-teaching as a template for setting up jupyterhub and nbgrader.
The software: Jupyterhub 0.7.2 Nbgrader 0.4.0
The issue: When adding the formgrader service to jupyterhub I get this error message in the logs for jupyterhub:
[I 2017-04-27 15:52:04.583 JupyterHub log:100] 200 GET /hub/home (nabr@10.52.1.172) 11.75ms
15:52:04.586 - error: [ConfigProxy] Proxy error: Error: socket hang up
at createHangUpError (_http_client.js:252:15)
at Socket.socketCloseListener (_http_client.js:284:23)
at emitOne (events.js:101:20)
at Socket.emit (events.js:188:7)
at TCP._handle.close [as _onclose] (net.js:493:12)
15:52:04.589 - error: [ConfigProxy] 503 GET /user/nabr/courses?_=1493301122293
[I 2017-04-27 15:52:04.602 JupyterHub log:100] 200 GET /hub/error/503?url=%2Fuser%2Fnabr%2Fcourses%3F_%3D1493301122293 (@127.0.0.1) 8.26ms
[I 2017-04-27 15:52:05.911 JupyterHub log:100] 200 GET /hub/admin (nabr@10.52.1.172) 16.45ms
[I 2017-04-27 15:52:08.044 JupyterHub log:100] 302 GET /hub/ (nabr@10.52.1.172) 9.06ms
[I 2017-04-27 15:52:08.085 JupyterHub log:100] 200 GET /hub/api/authorizations/cookie/jupyter-hub-token-nabr/[secret] (nabr@127.0.0.1) 15.26ms
15:52:41.213 - error: [ConfigProxy] Proxy error: Error: socket hang up
at createHangUpError (_http_client.js:252:15)
at Socket.socketCloseListener (_http_client.js:284:23)
at emitOne (events.js:101:20)
at Socket.emit (events.js:188:7)
at TCP._handle.close [as _onclose] (net.js:493:12)
15:52:41.213 - error: [ConfigProxy] 503 GET /user/nabr/courses?_=1493301159478
[I 2017-04-27 15:52:41.218 JupyterHub log:100] 200 GET /hub/error/503?url=%2Fuser%2Fnabr%2Fcourses%3F_%3D1493301159478 (@127.0.0.1) 1.42ms
[I 2017-04-27 15:53:36.600 JupyterHub log:100] 302 GET /hub/ (nabr@10.52.1.172) 11.92ms
[I 2017-04-27 15:53:36.639 JupyterHub log:100] 200 GET /hub/api/authorizations/cookie/jupyter-hub-token-nabr/[secret] (nabr@127.0.0.1) 13.74ms
The formgrader functionality seem to work just fine, but the error is filling up my log for jupyterhub.
I added the service as follows in the jupyterhub config:
#SummerSchool
{
'name': 'formgrader-SummerSchool',
'admin': True,
'command': ['nbgrader', 'formgrade'],
'url': 'http://127.0.0.1:5006',
'cwd': '/home/nabr/SummerSchool/'
},
and have the corresponding config file set-up as
c = get_config()
###############################################################################
# Begin additions by nbgrader quickstart
###############################################################################
# You only need this if you are running nbgrader on a shared
# server set up.
c.NbGrader.course_id = "SummerSchool"
c.FormgradeApp.authenticator_class = u'nbgrader.auth.hubauth.HubAuth'
c.FormgradeApp.ip = '127.0.0.1'
c.FormgradeApp.port = 5006 #Make sure port matches with the set port on jupyterHub service
# The grader_group option is the most important option that must be specified:
# it determines who will be able to access the formgrader, and corresponds to a
# JupyterHub group (specified in the JupyterHub.load_groups config option).
c.HubAuth.grader_group = u'SummerSchool-graders'
...
If I remove the formgrader service by commenting it out and restarting jupyterhub I do not get the error anymore. But of course then formgrader does not work.
Can anyone tell me what I am doing wrong?
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (8 by maintainers)
Top GitHub Comments
Great! I’m glad that’s resolved, then.
Thanks!
Yes, you can definitely do that (though it’s a little bit of a hassle). As described here, you can selectively enable and disable certain extensions. So for example, if you’ve already run:
You can then disable the formgrader extension for everybody:
And then, as the instructor account, selectively enable it:
I’m going to go ahead and close this issue since the proxy error is resolved now, but if you have more questions or any issues with this new version of the formgrader please feel free to open another issue!
I do not see the error anymore, yay!
I had a look at the “formgrader” tab. Looks great. Any way to only enable the formgrader for instructors (certain unixusers), while still having the assignment tab for all users?