远程访问ipython笔记本服务器会引发异常

时间:2014-07-18 15:25:05

标签: python ipython-notebook

我已成功启动笔记本电脑在服务器上运行,如下所示:

ipython notebook --profile=nbserver
2014-07-18 11:14:05.473 [NotebookApp] Using existing profile dir: u'/home/local/AD/jack/.ipython/profile_nbserver'
2014-07-18 11:14:05.482 [NotebookApp] Using MathJax from CDN: https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js
2014-07-18 11:14:05.497 [NotebookApp] Serving notebooks from local directory: /home/local/AD/jack/.ipython/profile_nbserver
2014-07-18 11:14:05.497 [NotebookApp] 0 active kernels 
2014-07-18 11:14:05.497 [NotebookApp] The IPython Notebook is running at: all ip addresses on your system]:9999
2014-07-18 11:14:05.498 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

当我尝试使用以下方式远程访问它时:

https://devs-sandbox02.jfk.ad.radio.com:9999

服务器进入重复消息的循环:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/zmq/eventloop/ioloop.py", line 346, in start
    self._handlers[fd](fd, events)
KeyError: 6
ERROR:root:Exception in I/O handler for fd 6

造成这种情况的原因是什么?我该如何解决这个问题?

1 个答案:

答案 0 :(得分:2)

我遇到了同样的问题,只是通过升级pyzmq来修复它:

$ pip search pyzmq
pyzmq                     - Python bindings for 0MQ
INSTALLED: 13.0.2
LATEST:    14.3.1

$ sudo pip install --upgrade pyzmq

(希望这能帮助像我一样在这里结束的其他人!)