<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Oct 28, 2014 at 3:08 AM, Clare Sloggett <span dir="ltr"><<a href="mailto:claresloggett@gmail.com" target="_blank">claresloggett@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi Doug,<div><br></div></div></blockquote><div><br></div><div>I can confirm that attempting to run the configurable-http-proxy twice gives the error you describe. There are probably other reasons to get that error too (eg, maybe something is already listening on that port, permission error, etc). I would try the items related to node, listed at the bottom here first:</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div></div><div>1. I'm not installing ipython from source, just with pip, so a bit confused by the instructions re ipython-master. Maybe I'm misunderstanding. I've run `pip install ipython --upgrade`; do I really need to do ipython from source?</div></div></blockquote><div><br></div><div>I'm not 100% sure if it is necessary. Installing from master is easy, if that is a concern:</div><div><br></div><div>git clone <a href="https://github.com/ipython/ipython.git">https://github.com/ipython/ipython.git</a></div><div>cd ipython</div><div>python setup.py submodules</div><div>pip install . -U</div><div><br></div><div>To update after initial install, just do the last two steps.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>2. I've just tried the jupyterhub README instructions from scratch on a new machine (a new cloud instance) from the current jupyterhub master, commit db5cf9cf99f68f133b... - same issues unfortunately.<br></div></div></blockquote><div><br></div><div>Hmmm.... the error log shows that the error is launching the http-configurable-proxy...</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">







<div><br></div><div>3. I'm not sure how to check for this but it's probably addressed by having launched a new machine!</div></div></blockquote><div><br></div><div>There are two programs that are run by "root": configurable-http-proxy and jupyterhub, and then for each user there is a "jupyterhub-singleuser" that is running. You can use something like "ps aux | grep configurable-http-proxy" or "ps aux | grep jupyterhub" to see the associated processes. You can use "kill" to kill those, if necessary. But it sounds like it hasn't made it that far.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>4. I'm running as root, no sudo involved. Just</div><div>$ su root</div><div>$ jupyterhub</div></div></blockquote><div><br></div><div>If this computer is on the internet, then eventually you'll probably want to move to the more involved "sudo" method for better security. But this should be fine for testing and getting it working.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>And I get all the same errors as previously.</div><div><br></div><div>I'm mystified as I can see others posting here saying that they are using it, so it must be a problem in my setup, but I really can't see what. Could it possibly be a node.js issue?</div></div></blockquote><div><br></div><div>You should be able to run this line, from your log:</div><div><br></div><div>configurable-http-proxy --ip '' --port 8000 --api-ip localhost  --api-port 8001 --default-target <a href="http://localhost:8081">http://localhost:8081</a><br></div><div><br></div><div>Does that work without errors? Control+c to exit, if it does work. I can confirm that if you try to run this with one already running, you get exactly the error you describe.</div><div><br></div><div>On the page:</div><div><br></div><div><a href="https://github.com/jupyter/jupyterhub/wiki/Using-sudo-to-run-the-server-as-non-root">https://github.com/jupyter/jupyterhub/wiki/Using-sudo-to-run-the-server-as-non-root</a><br></div><div><br></div>there is also a note needed for serving on restricted ports:<br><br>sudo setcap 'cap_net_bind_service=+ep' /usr/bin/node</div><div class="gmail_quote"><br></div><div class="gmail_quote">but read that doc for warnings. You may need that too, even when running as root. Your issue does appear to be a problem starting the http server via node. Hope that helps!</div><div class="gmail_quote"><br></div><div class="gmail_quote">-Doug<br>  <div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Thanks again for the help!</div><span class=""><font color="#888888"><div><br></div><div>Clare</div><div><br></div>







</font></span></div><div class=""><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 24 October 2014 23:58, Doug Blank <span dir="ltr"><<a href="mailto:doug.blank@gmail.com" target="_blank">doug.blank@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div>On Fri, Oct 24, 2014 at 8:49 AM, Clare Sloggett <span dir="ltr"><<a href="mailto:claresloggett@gmail.com" target="_blank">claresloggett@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I'm getting an error running JupyterHub. Right now all I'm doing is attempting to run it as root with no command-line options.</div><div><br></div><div>A couple of weeks ago I was trying to set it up and while I was running into issues, I wasn't getting this particular problem - I was able to at least run the command. I'm not sure if something has changed in Jupyter. Entirely possible that I made a mistake in my setup this time!</div><div><br></div><div>Any advice would be appreciated in interpreting the below errors.</div><div><br></div><div>Thanks,</div><div>Clare</div><div><br></div><div>Below is the output of `jupyterhub --debug`:</div><div><br></div><div><div>Traceback (most recent call last):</div><div>  File "/usr/lib/python2.7/logging/__init__.py", line 846, in emit</div><div>    msg = self.format(record)</div><div>  File "/usr/lib/python2.7/logging/__init__.py", line 723, in format</div><div>    return fmt.format(record)</div><div>  File "/usr/local/lib/python2.7/dist-packages/IPython/config/application.py", line 121, in format</div><div>    return super(LevelFormatter, self).format(record)</div><div>  File "/usr/lib/python2.7/logging/__init__.py", line 467, in format</div><div>    s = self._fmt % record.__dict__</div><div>KeyError: u'color'</div><div>Logged from file application.py, line 247</div><div>Traceback (most recent call last):</div><div>  File "/usr/lib/python2.7/logging/__init__.py", line 846, in emit</div><div>    msg = self.format(record)</div><div>  File "/usr/lib/python2.7/logging/__init__.py", line 723, in format</div><div>    return fmt.format(record)</div><div>  File "/usr/local/lib/python2.7/dist-packages/IPython/config/application.py", line 121, in format</div><div>    return super(LevelFormatter, self).format(record)</div><div>  File "/usr/lib/python2.7/logging/__init__.py", line 467, in format</div><div>    s = self._fmt % record.__dict__</div><div>KeyError: u'color'</div><div>Logged from file application.py, line 248</div><div>[D 23:39:03.030 JupyterHubApp] Connecting to db: sqlite:///jupyterhub.sqlite</div><div>[I 23:39:03.062 JupyterHubApp] Not using whitelist. Any authenticated user will be allowed.</div><div>[D 23:39:03.064 JupyterHubApp] Loaded users: </div><div>      ubuntu admin</div><div>[I 23:39:03.072 JupyterHubApp] Starting proxy: [u'configurable-http-proxy', '--ip', u'', '--port', '8000', '--api-ip', u'localhost', '--api-port', '8001', '--default-target', '<a href="http://localhost:8081" target="_blank">http://localhost:8081</a>']</div><div>23:39:03.178 - info: [ConfigProxy] Proxying http://*:8000 to <a href="http://localhost:8081" target="_blank">http://localhost:8081</a></div><div>23:39:03.180 - info: [ConfigProxy] Proxy API at <a href="http://localhost:8001/api/routes" target="_blank">http://localhost:8001/api/routes</a></div><div><br></div><div>events.js:72</div><div>        throw er; // Unhandled 'error' event</div></div></div></blockquote><div><br></div></div></div><div>I think that I have had that issue when configurable-http-proxy isn't running, or maybe it is already running and you are trying to start it again.</div><div><br></div><div>Some things that I do when updating jupyterhub:</div><div><br></div><div>1. Updating ipython: make sure you run "python setup.py submodule" in ipython-master to get any new dependencies. Then "git pull" and "sudo pip install . -U"</div><div><br></div><div>2. Updating jupyterhub: do the steps in the jupyterhub/README.md again... some dependencies may have changed. Then "sudo pip install . -U"</div><div><br></div><div>3. Make sure all jupyterhub-singleuser processes and configurable-http-proxy processes are killed. This is still hard to do sometimes.</div><div><br></div><div>4. Are you running with a sudo environment? There is an additional line in the sudoers file that is now needed to kill processes.</div><div><br></div><div>I think that is most of what I need to do.</div><div><br></div><div>-Doug</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div dir="ltr"><div><div>              ^</div><div>Error: listen EADDRINUSE</div><div>    at errnoException (net.js:904:11)</div><div>    at Server._listen2 (net.js:1042:14)</div><div>    at listen (net.js:1064:10)</div><div>    at net.js:1146:9</div><div>    at dns.js:72:18</div><div>    at process._tickCallback (node.js:419:13)</div><div>    at Function.Module.runMain (module.js:499:11)</div><div>    at startup (node.js:119:16)</div><div>    at node.js:906:3</div><div>[C 23:39:04.087 JupyterHubApp] Failed to start proxy</div><div>    Traceback (most recent call last):</div><div>      File "/usr/local/lib/python2.7/dist-packages/jupyterhub/app.py", line 727, in start</div><div>        IOLoop().run_sync(self.start_proxy)</div><div>      File "/usr/local/lib/python2.7/dist-packages/tornado/ioloop.py", line 389, in run_sync</div><div>        return future_cell[0].result()</div><div>      File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 129, in result</div><div>        raise_exc_info(self.__exc_info)</div><div>      File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 302, in wrapped</div><div>        ret = fn(*args, **kwargs)</div><div>      File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 574, in inner</div><div>        self.set_result(key, result)</div><div>      File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 500, in set_result</div><div>        self.run()</div><div>      File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 529, in run</div><div>        yielded = self.gen.throw(*exc_info)</div><div>      File "/usr/local/lib/python2.7/dist-packages/jupyterhub/app.py", line 556, in start_proxy</div><div>        _check()</div><div>      File "/usr/local/lib/python2.7/dist-packages/jupyterhub/app.py", line 552, in _check</div><div>        raise e</div><div>    RuntimeError: Proxy failed to start with exit code 8</div></div></div>
<br></div></div>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org" target="_blank">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div></div>
<br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org" target="_blank">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div></div>