question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

token not working in jupyter kernelgateway

See original GitHub issue

Description

I have put my remote kernelgateway configurations in the setting like the following:

{"name": "my_server", "options": {"baseUrl": "http://ip:port", "token": "my_token"}}

but whenever I try to connect to a server which does not have any running kernels, it prompts me with a token authentication. When I try to connect to a server with a running python kernel, it won’t prompt me for a token authentiation.

I was doing fine with Hydrogen when this started to happen around few months ago, so I think it’s a bug somewhere around either Hydrogen or Jupyter Kernelgateway.

Steps to Reproduce

  1. Setup remote kernelgateway using jupyter kernelgateway@2.5.0
  2. Setup configurations in hydrogen including “baseUrl” and “token”
  3. Hydrogen:connect-to-remote-kernel
  4. Select remote server from dropdown, which does not have a running python kernel
  5. hydrogen (or jupyter kernelgateway) prompts for token authentication

Versions

OS version: Windows 10.0.19042.1165

atom --version

Atom    : 1.58.0
Electron: 9.4.4
Chrome  : 83.0.4103.122
Node    : 12.14.1

apm --version

apm  2.6.2
npm  6.14.13
node 12.14.1 x64
atom 1.58.0
python 3.8.8
git 2.33.0.windows.1
visual studio

Hydrogen version:

[Your Hydrogen’s version]

Hydrogen
├── 2.16.3
├── https://github.com/nteract/hydrogen
├── Run code interactively, inspect data, and plot. All the power of Jupyter kernels, inside your favorite text editor.
├── 2423086 downloads
└── 802 stars

[Jupyter kernelgateway version]

jupyter kernelgateway@2.5.0

Plugins

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

  • Hydrogen Launcher
  • hydrogen-python
  • Data Explorer

None.

Logs

no logs in console

Expected behavior

Connect to remote kernelgateways without prompting for token.

Screenshots

Setting: setting

When there’s no running sessions in server: no session

When there’s running sessions in server: existing session

Additional context

This started happening few months ago. Until then, the “token” from hydrogen setting was working fine.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
LRydincommented, Sep 27, 2021

I second this (to some extent). Connecting to my remote kernel also prompts me to input the token manually, even if it is already given in the kernelgateway configurations in Hydrogen’s properties. This was not requested in previous versions. (atom 1.57.0, hydrogen 2.16.3, ubuntu 20.04.)

1reaction
aminyacommented, Oct 30, 2021

I will look into this over the next week. You can downgrade Hydrogen temporarily if you want

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remote kernel + token · Issue #473 · nteract/hydrogen - GitHub
When configuring the jupyter kernel gateway to accept only requests with token in headers and configuring hydrogen like this:
Read more >
Features — Jupyter Kernel Gateway 2.6.0.dev0 documentation
Features¶. The Jupyter Kernel Gateway has the following features: ... Option to set a shared authentication token and require it from clients.
Read more >
VS Code Jupyter Extension: Remote notebook not starting
As for my experience, I just got it working in VsCode a few moments ago: I ... Start a remote Jupyter Notebook or...
Read more >
Jupyter Notebook Documentation - Read the Docs
12 Distributing Jupyter Extensions as Python Packages ... Typically, you will work on a computational problem in pieces, organizing related ...
Read more >
Register external IPython kernel with jupyter notebook?
The kernel gateway in its websocket personality doesn't work with notebooks ... Thinking that I could "trick" jupyter into not using ipykernel and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found