I have started a Jupyter Notebook server on my centos6.5 server.And jupyter is running like
[I 17:40:59.649 NotebookApp] Serving notebooks from local directory: /root
[I 17:40:59.649 NotebookApp] 0 active kernels
[I 17:40:59.649 NotebookApp] The Jupyter Notebook is running at:https://[all ip addresses on your system]:8045/
[I 17:40:59.649 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
When I want to access Jupyter remotely in the same local area network, say open http://192.168.1.111:8045/
, I can't open a Jupyter page at all. By the way, I can access remote centos server successfully.
What's the possible reason?
ベストアンサー1
Have you configured the jupyter_notebook_config.py file to allow external connections?
By default, Jupyter Notebook only accepts connections from localhost (eg, from the same computer that its running on). By modifying the NotebookApp.allow_originオプションをデフォルトの ' ' から '*' に変更すると、Jupyter に外部からアクセスできるようになります。
c.NotebookApp.allow_origin = '*' #allow all origins
ノートブックがリッスンする IP も変更する必要があります。
c.NotebookApp.ip = '0.0.0.0' # listen on all IPs
変更を加えた後は、必ずこれらの設定のコメントを解除してください (#
先頭の を削除してください)。そうしないと、コメントとして解釈され、Jupyter ノートブック クライアントの動作が変更されません。
詳細については、その後の回答このスレッドで。