{"action":"opened","issue":{"url":"https://api.github.com/repos/jupyter/jupyterhub/issues/492","repository_url":"https://api.github.com/repos/jupyter/jupyterhub","labels_url":"https://api.github.com/repos/jupyter/jupyterhub/issues/492/labels{/name}","comments_url":"https://api.github.com/repos/jupyter/jupyterhub/issues/492/comments","events_url":"https://api.github.com/repos/jupyter/jupyterhub/issues/492/events","html_url":"https://github.com/jupyter/jupyterhub/issues/492","id":144126918,"number":492,"title":"AttributeError: 'module' object has no attribute 'sleep'","user":{"login":"e9t","id":1205890,"avatar_url":"https://avatars.githubusercontent.com/u/1205890?v=3","gravatar_id":"","url":"https://api.github.com/users/e9t","html_url":"https://github.com/e9t","followers_url":"https://api.github.com/users/e9t/followers","following_url":"https://api.github.com/users/e9t/following{/other_user}","gists_url":"https://api.github.com/users/e9t/gists{/gist_id}","starred_url":"https://api.github.com/users/e9t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/e9t/subscriptions","organizations_url":"https://api.github.com/users/e9t/orgs","repos_url":"https://api.github.com/users/e9t/repos","events_url":"https://api.github.com/users/e9t/events{/privacy}","received_events_url":"https://api.github.com/users/e9t/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-29T01:22:35Z","updated_at":"2016-03-29T01:22:35Z","closed_at":null,"body":"Hi, thanks for the great project!\r\nI've successfully launched jupyterhub on one of my servers and enjoying it, but having some trouble setting it up in another server.\r\n\r\nRunning jupyterhub right after installation, I am getting the following error:\r\n\r\n<pre>\r\n$ jupyterhub --no-ssl\r\n[I 160329 09:44:33 app:572] Writing cookie_secret to /home/e9t/jupyterhub_cookie_secret\r\n[W 160329 09:44:34 app:292] \r\n    Generating CONFIGPROXY_AUTH_TOKEN. Restarting the Hub will require restarting the proxy.\r\n    Set CONFIGPROXY_AUTH_TOKEN env or JupyterHub.proxy_auth_token config to avoid this message.\r\n    \r\n[W 160329 09:44:35 app:685] No admin users, admin interface will be unavailable.\r\n[W 160329 09:44:35 app:686] Add any administrative users to `c.Authenticator.admin_users` in config.\r\n[I 160329 09:44:35 app:712] Not using whitelist. Any authenticated user will be allowed.\r\n[I 160329 09:44:35 app:1113] Hub API listening on http://127.0.0.1:8081/hub/\r\n[W 160329 09:44:35 app:851] Running JupyterHub without SSL. There better be SSL termination happening somewhere else...\r\n[I 160329 09:44:35 app:860] Starting proxy @ http://*:8000/\r\n[C 160329 09:44:35 app:1119] Failed to start proxy\r\n    Traceback (most recent call last):\r\n      File \"/usr/local/lib/python3.4/dist-packages/jupyterhub/app.py\", line 1117, in start\r\n        yield self.start_proxy()\r\n      File \"/usr/lib/python3/dist-packages/tornado/gen.py\", line 395, in get_result\r\n        return self.runner.pop_result(self.key).result()\r\n      File \"/usr/lib/python3/dist-packages/tornado/stack_context.py\", line 302, in wrapped\r\n        ret = fn(*args, **kwargs)\r\n      File \"/usr/lib/python3/dist-packages/tornado/gen.py\", line 550, in inner\r\n        self.set_result(key, result)\r\n      File \"/usr/lib/python3/dist-packages/tornado/gen.py\", line 476, in set_result\r\n        self.run()\r\n      File \"/usr/local/lib/python3.4/dist-packages/jupyterhub/app.py\", line 883, in start_proxy\r\n        yield server.wait_up(1)\r\n      File \"/usr/lib/python3/dist-packages/tornado/gen.py\", line 395, in get_result\r\n        return self.runner.pop_result(self.key).result()\r\n      File \"/usr/lib/python3/dist-packages/tornado/stack_context.py\", line 302, in wrapped\r\n        ret = fn(*args, **kwargs)\r\n      File \"/usr/lib/python3/dist-packages/tornado/gen.py\", line 550, in inner\r\n        self.set_result(key, result)\r\n      File \"/usr/lib/python3/dist-packages/tornado/gen.py\", line 476, in set_result\r\n        self.run()\r\n      File \"/usr/local/lib/python3.4/dist-packages/jupyterhub/orm.py\", line 110, in wait_up\r\n        yield wait_for_server(self.ip or '127.0.0.1', self.port, timeout=timeout)\r\n      File \"/usr/lib/python3/dist-packages/tornado/gen.py\", line 395, in get_result\r\n        return self.runner.pop_result(self.key).result()\r\n      File \"/usr/local/lib/python3.4/dist-packages/jupyterhub/utils.py\", line 58, in wait_for_server\r\n        yield gen.sleep(0.1)\r\n    AttributeError: 'module' object has no attribute 'sleep'\r\n    \r\n\r\n$ 09:44:35.200 - info: [ConfigProxy] Proxying http://*:8000 to http://127.0.0.1:8081\r\n09:44:35.203 - info: [ConfigProxy] Proxy API at http://127.0.0.1:8001/api/routes\r\n</pre>\r\n\r\nThen, when I go to `http://<my_ip>:8000` on my browser, I get the following error messages at my terminal:\r\n\r\n<pre>\r\n09:44:56.477 - error: [ConfigProxy] Proxy error:  code=ECONNREFUSED, errno=ECONNREFUSED, syscall=connect\r\n09:44:56.477 - error: [ConfigProxy] 503 GET /\r\n09:44:56.779 - error: [ConfigProxy] Proxy error:  code=ECONNREFUSED, errno=ECONNREFUSED, syscall=connect\r\n09:44:56.779 - error: [ConfigProxy] 503 GET /favicon.ico\r\n09:45:42.052 - error: [ConfigProxy] Proxy error:  code=ECONNREFUSED, errno=ECONNREFUSED, syscall=connect\r\n09:45:42.052 - error: [ConfigProxy] 503 GET /\r\n09:45:42.411 - error: [ConfigProxy] Proxy error:  code=ECONNREFUSED, errno=ECONNREFUSED, syscall=connect\r\n09:45:42.411 - error: [ConfigProxy] 503 GET /favicon.ico\r\n</pre>\r\n\r\nand on my browser:\r\n\r\n<pre>\r\n  <h1>503: Proxy Target Missing</h1>\r\n  <p>The upstream service is unavailable</p>\r\n  <hr/>\r\n  <p>configurable-http-proxy</p>\r\n</pre>\r\n\r\nThe following is my environment:\r\n\r\n<pre>\r\n$ cat /etc/lsb-release \r\nDISTRIB_ID=Ubuntu\r\nDISTRIB_RELEASE=14.04\r\nDISTRIB_CODENAME=trusty\r\nDISTRIB_DESCRIPTION=\"Ubuntu 14.04.3 LTS\"\r\n$ pip3 list | grep jupyter\r\njupyter (1.0.0)\r\njupyter-client (4.0.0)\r\njupyter-console (4.0.2)\r\njupyter-core (4.0.4)\r\njupyterhub (0.5.0)\r\n$ configurable-http-proxy --version\r\n1.1.0\r\n$ sudo ufw status\r\nStatus: active\r\n\r\nTo                         Action      From\r\n--                         ------      ----\r\n...\r\n8001                       ALLOW       Anywhere\r\n8000                       ALLOW       Anywhere\r\n...\r\n$ npm --version\r\n1.3.10\r\n</pre>\r\n\r\nI'm wondering what I'm doing wrong, because the working server I have has the same configurations with this server. What may\r\nAny comments would be appreciated."}}