{"action":"created","issue":{"url":"https://api.github.com/repos/jupyter/tmpnb/issues/191","labels_url":"https://api.github.com/repos/jupyter/tmpnb/issues/191/labels{/name}","comments_url":"https://api.github.com/repos/jupyter/tmpnb/issues/191/comments","events_url":"https://api.github.com/repos/jupyter/tmpnb/issues/191/events","html_url":"https://github.com/jupyter/tmpnb/issues/191","id":122164132,"number":191,"title":"Proxy error: code=ECONNRESET","user":{"login":"elliottslaughter","id":3129,"avatar_url":"https://avatars.githubusercontent.com/u/3129?v=3","gravatar_id":"","url":"https://api.github.com/users/elliottslaughter","html_url":"https://github.com/elliottslaughter","followers_url":"https://api.github.com/users/elliottslaughter/followers","following_url":"https://api.github.com/users/elliottslaughter/following{/other_user}","gists_url":"https://api.github.com/users/elliottslaughter/gists{/gist_id}","starred_url":"https://api.github.com/users/elliottslaughter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elliottslaughter/subscriptions","organizations_url":"https://api.github.com/users/elliottslaughter/orgs","repos_url":"https://api.github.com/users/elliottslaughter/repos","events_url":"https://api.github.com/users/elliottslaughter/events{/privacy}","received_events_url":"https://api.github.com/users/elliottslaughter/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-15T00:28:24Z","updated_at":"2015-12-15T03:28:46Z","closed_at":"2015-12-15T03:28:46Z","body":"I'm trying to track down an issue in my tmpnb setup with a custom notebook image. If I run tmpnb with `jupyter/demo`, it runs just fine:\r\n\r\n    docker pull jupyter/demo\r\n    export TOKEN=$( head -c 30 /dev/urandom | xxd -p )\r\n    docker run --net=host -d -e CONFIGPROXY_AUTH_TOKEN=$TOKEN --name=proxy jupyter/configurable-http-proxy --default-target http://127.0.0.1:9999\r\n    docker run --net=host -d -e CONFIGPROXY_AUTH_TOKEN=$TOKEN -v /var/run/docker.sock:/docker.sock jupyter/tmpnb python orchestrate.py --image=\"jupyter/demo\" --command=\"start-notebook.sh \\\"--NotebookApp.base_url={base_path} --NotebookApp.allow_origin='*' --port={port}\\\"\"\r\n\r\nThe server starts, and when I navigate to `localhost:8000`, I load the demo notebooks. However, if I try to run my own image (`stanfordlegion/jupyter-regent`), it starts returning 503.\r\n\r\n    docker pull stanfordlegion/jupyter-regent\r\n    export TOKEN=$( head -c 30 /dev/urandom | xxd -p )\r\n    docker run --net=host -d -e CONFIGPROXY_AUTH_TOKEN=$TOKEN --name=proxy jupyter/configurable-http-proxy --default-target http://127.0.0.1:9999\r\n    docker run --net=host -d -e CONFIGPROXY_AUTH_TOKEN=$TOKEN -v /var/run/docker.sock:/docker.sock jupyter/tmpnb python orchestrate.py --image=\"stanfordlegion/jupyter-regent\" --command=\"start-notebook.sh \\\"--NotebookApp.base_url={base_path} --NotebookApp.allow_origin='*' --port={port}\\\"\"\r\n\r\nIf I take a look at the logs from tmpnb, it seems that the instance has spawned correctly:\r\n\r\n    [I 151215 00:10:27 orchestrate:366] Listening on *:9999\r\n    [I 151215 00:10:28 web:1811] 200 GET / (127.0.0.1) 206.86ms\r\n    [I 151215 00:10:28 orchestrate:128] Allocated [user/PEcVZgzyeRjs] from the pool.\r\n    [I 151215 00:10:28 web:1811] 302 GET /spawn/ (127.0.0.1) 0.70ms\r\n\r\nAnd the instance itself seems to agree with that:\r\n\r\n    [I 00:10:30.089 NotebookApp] Writing notebook server cookie secret to /home/jovyan/.local/share/jupyter/runtime/notebook_cookie_secret\r\n    [I 00:10:30.541 NotebookApp] Serving notebooks from local directory: /home/jovyan/notebooks\r\n    [I 00:10:30.541 NotebookApp] 0 active kernels \r\n    [I 00:10:30.541 NotebookApp] The IPython Notebook is running at: http://[all ip addresses on your system]:8888/user/PEcVZgzyeRjs/\r\n\r\nBut the somehow the proxy doesn't agree:\r\n\r\n    00:10:00.733 - info: [ConfigProxy] Proxying http://*:8000 to http://127.0.0.1:9999\r\n    00:10:00.746 - info: [ConfigProxy] Proxy API at http://localhost:8001/api/routes\r\n    00:10:28.552 - error: [ConfigProxy] Proxy error:  code=ECONNRESET\r\n    00:10:28.563 - error: [ConfigProxy] 503 GET /user/PEcVZgzyeRjs/tree\r\n\r\nWhat am I missing? I can't find any other relevant logs, and I'm not sure where things are going bad as they are. Any suggestions?\r\n\r\nThanks in advance."},"comment":{"url":"https://api.github.com/repos/jupyter/tmpnb/issues/comments/164633645","html_url":"https://github.com/jupyter/tmpnb/issues/191#issuecomment-164633645","issue_url":"https://api.github.com/repos/jupyter/tmpnb/issues/191","id":164633645,"user":{"login":"elliottslaughter","id":3129,"avatar_url":"https://avatars.githubusercontent.com/u/3129?v=3","gravatar_id":"","url":"https://api.github.com/users/elliottslaughter","html_url":"https://github.com/elliottslaughter","followers_url":"https://api.github.com/users/elliottslaughter/followers","following_url":"https://api.github.com/users/elliottslaughter/following{/other_user}","gists_url":"https://api.github.com/users/elliottslaughter/gists{/gist_id}","starred_url":"https://api.github.com/users/elliottslaughter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elliottslaughter/subscriptions","organizations_url":"https://api.github.com/users/elliottslaughter/orgs","repos_url":"https://api.github.com/users/elliottslaughter/repos","events_url":"https://api.github.com/users/elliottslaughter/events{/privacy}","received_events_url":"https://api.github.com/users/elliottslaughter/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T03:28:46Z","updated_at":"2015-12-15T03:28:46Z","body":"After scouring the demo sources, I discovered that this was the critical line I was missing:\r\n\r\n    c.NotebookApp.trust_xheaders = True\r\n\r\n(https://github.com/jupyter/docker-demo-images/blob/master/resources/jupyter_notebook_config.partial.py#L5)"}}