Hydrogen: Connection gateway failed on remote server (Forbidden 403 GET)

Created on 10 Oct 2019  路  2Comments  路  Source: nteract/hydrogen

Description

Hydrogen Connection gateway fails on remote server "http://server05.ac.uk:8891" although it works on any browser.

Steps to Reproduce

  1. Set kernel gateway on Hydrogen settings "baseUrl": "http://server05.ac.uk:8891"
  2. SSH into a remote server, SSH again into server05 where jupyter will be run
  3. Run jupyter notebook jupyter notebook --no-browser --port=8891
  4. Hydrogen: Connect to Remote Kernel --> fails with message on terminal:
[W 17:02:51.841 NotebookApp] Forbidden
[W 17:02:51.841 NotebookApp] 403 GET /api/kernelspecs?1570723351250 (10.201.1.196) 0.56ms referer=None

Tried to authenticate with token after "connection gateway failed" message, still fails. Inside .jupyter/jupyter_notebook_config.py:

c.NotebookApp.allow_remote_access=True
c.NotebookApp.allow_origin = '*'
c.NotebookApp.ip = '0.0.0.0'

I can access the notebook at http://server05.ac.uk:8891 through a browser.

Versions

OS version:
First remote machine:
Linux server 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

"Server05":
Linux server05 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Atom

Atom    : 1.40.1
Electron: 3.1.10
Chrome  : 66.0.3359.181
Node    : 10.2.0

apm

apm  2.4.3
npm  6.2.0
node 10.2.1 x64
atom 1.40.1
python 3.6.8
git 2.19.0

hydrogen:

2.12.1

Plugins

Have you installed and activated any of the Hydrogen plugins below ?

  • [ ] hydrogen-python
  • [ ] Hydrogen Launcher
  • [ ] Data Explorer

Logs

(gpflow) bash-4.2$ jupyter notebook --no-browser --port=8891
[I 16:50:07.113 NotebookApp] Serving notebooks from local directory: /users/risno
[I 16:50:07.113 NotebookApp] The Jupyter Notebook is running at:
[I 16:50:07.113 NotebookApp] http://server05:8891/
[I 16:50:07.113 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 16:59:59.896 NotebookApp] Kernel started: c0af5f0b-7be8-4633-b846-edf9409ae52e
[W 17:00:25.842 NotebookApp] Forbidden
[W 17:00:25.843 NotebookApp] 403 GET /api/kernelspecs?1570723205251 (10.201.1.196) 0.77ms referer=None

Expected behavior

Successful connection to remote jupyter kernel.

bug kernels

Most helpful comment

I have resolved this issue by using jupyter kernel gateway (https://github.com/jupyter/kernel_gateway) instead of a jupyter notebook server, with the same user config settings. I have ported the remote address to localhost:8888 and connected Hydrogen to that (which didn't work with jupyter notebook). I'm not sure why but it could be the problem of SSH hopping that didn't work well with Hydrogen with the notebook server for this particular remote machine. Keeping this here in case it might help someone with a similar issue.

All 2 comments

I have resolved this issue by using jupyter kernel gateway (https://github.com/jupyter/kernel_gateway) instead of a jupyter notebook server, with the same user config settings. I have ported the remote address to localhost:8888 and connected Hydrogen to that (which didn't work with jupyter notebook). I'm not sure why but it could be the problem of SSH hopping that didn't work well with Hydrogen with the notebook server for this particular remote machine. Keeping this here in case it might help someone with a similar issue.

I just had the same issue, but here it was due to an invisible newline which I pasted accidentally with the authentification token.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tobiasbj picture tobiasbj  路  4Comments

Mungoid picture Mungoid  路  4Comments

danbri picture danbri  路  4Comments

xmen1412 picture xmen1412  路  3Comments

neurotronix picture neurotronix  路  4Comments