LoginSignup
9
2

More than 5 years have passed since last update.

jupyter notebokは開くが、カーネルを実行時に「Connection Failed」と表示される

Posted at

まとめ

proxyサーバを経由する際に、WebSocketを通していなかったため、Connection Failedしていた。
このエラー文を幾ら検索しても原因がわからず、もし同じ体験をした方か現れたときのためにメモに記します。

課題

  • jupyter notebookは起動するが
  • 「Kernelに接続出来ない」旨のエラーが出る

Connection failed
A connection to the notebook server could not be established. The notebook will continue trying to reconnect. Check your network connection or notebook server configuration.

bed8ea2ac0cb0c60d46f71fbca625e3b.png

実施したこと

  • CGPにインスタンスを作成し、port:8888を許可する設定
  • Anacondaのインストールし、Python 3.6環境を設定
  • jupyter notebookの起動

$ jupyter notebook --ip=0.0.0.0

原因

ChromeのJavaScriptのコンソールに色々出ていました。
proxy serverを経由する際に、web socketが通過できていなかった。

WebSocket connection to 'ws://35.230.57.27:8888/api/kernels/a27c9e76-b148-42ff-acb2-58702645feca/channels?session_id=2967f80aedd84a258f9538187dcba2f1' failed: Establishing a tunnel via proxy server failed.

bdb4971337015fe667ec4baf4f68b3d1.png

9
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
2