error of connecting to remote IPython notebook server via ssh tunnel -


this did:

   remote.server$ ipython notebook --no-browser --port=8889    local$ ssh -v -n -l localhost:8888:localhost:8889 remote.server 

then tried launch localhost:8888. on remote server, there error:

[e 21:41:40.853 notebookapp] uncaught exception in write_error     traceback (most recent call last):       file "/home/zhxu5194/miniconda/envs/test/lib/python2.7/site-packages/tornado/web.py", line 976, in send_error         self.write_error(status_code, **kwargs)       file "/home/zhxu5194/miniconda/envs/test/lib/python2.7/site-packages/ipython/html/base/handlers.py", line 315, in write_error         html = self.render_template('%s.html' % status_code, **ns)       file "/home/zhxu5194/miniconda/envs/test/lib/python2.7/site-packages/ipython/html/base/handlers.py", line 253, in render_template         ns.update(self.template_namespace)       file "/home/zhxu5194/miniconda/envs/test/lib/python2.7/site-packages/ipython/html/base/handlers.py", line 263, in template_namespace         logged_in=self.logged_in,       file "/home/zhxu5194/miniconda/envs/test/lib/python2.7/site-packages/ipython/html/base/handlers.py", line 95, in logged_in         user = self.get_current_user()       file "/home/zhxu5194/miniconda/envs/test/lib/python2.7/site-packages/ipython/html/base/handlers.py", line 83, in get_current_user         return self.login_handler.get_user(self)       file "/home/zhxu5194/miniconda/envs/test/lib/python2.7/site-packages/ipython/html/auth/login.py", line 70, in get_user         user_id = handler.get_secure_cookie(handler.cookie_name)       file "/home/zhxu5194/miniconda/envs/test/lib/python2.7/site-packages/tornado/web.py", line 637, in get_secure_cookie         self.require_setting("cookie_secret", "secure cookies")       file "/home/zhxu5194/miniconda/envs/test/lib/python2.7/site-packages/tornado/web.py", line 1294, in require_setting         "application use %s" % (name, feature))     exception: must define 'cookie_secret' setting in application use secure cookies 

and nothing showed in webpage. did same thing server , worked. problem server , how fix it?

i using virtual environment miniconda. versions are:

ipython                   3.2.1                    py27_0   ipython-notebook          3.2.1                    py27_0   jinja2                    2.7.3                    py27_1 tornado                   4.2                      py27_0   zeromq                    4.0.5                         0  

i've resolve problem reading jupyter notebook official documents.

1.run

    jupyter notebook --generate-config 

2.then get

    jupyter_notebook_config.py 

in '.jupyter'.

3.open

    jupyter_notebook_config.py 

and write

    c.notebookapp.cookie_secret = b'anything' 

and work


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -