lens icon indicating copy to clipboard operation
lens copied to clipboard

Unable to connect to Pods' shell using lens

Open 18191518054 opened this issue 2 years ago • 13 comments

click shell Always present Connecting ... But it doesn't connect

18191518054 avatar May 31 '22 08:05 18191518054

Always Connecting ...

18191518054 avatar May 31 '22 09:05 18191518054

Would you be able to provide more information?

Nokel81 avatar May 31 '22 12:05 Nokel81

Snipaste_2022-06-01_16-34-12 Always Connecting ...

18191518054 avatar Jun 01 '22 08:06 18191518054

Any logs? Either from devtools console or when you quit the application completely and run it from the command line with DEBUG=true?

Nokel81 avatar Jun 01 '22 15:06 Nokel81

[LENS-SPACES-EXTENSION] Error getSpaceCa(), retrying... Error: Catalog api missing for Space 18191518054
    at e.J.Object.startingDelay [as request] (F:\workspace\Lens\resources\extensions\lenscloud-lens-extension\dist\main.js:9:1136521)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
error:   鈹?[22m [SHELL-SESSION]: failed to open a local shell File not found:  +18s
error:   鈹?[22m [1] Error: File not found:
error:   鈹?[22m [2]     at new WindowsPtyAgent (F:\workspace\Lens\resources\app.asar\node_modules\node-pty\lib\windowsPtyAgent.js:78:36)
error:   鈹?[22m [3]     at new WindowsTerminal (F:\workspace\Lens\resources\app.asar\node_modules\node-pty\lib\windowsTerminal.js:50:24)
error:   鈹?[22m [4]     at Object.spawn (F:\workspace\Lens\resources\app.asar\node_modules\node-pty\lib\index.js:28:12)
error:   鈹?[22m [5]     at l.ensureShellProcess (F:\workspace\Lens\resources\app.asar\static\build\main.js:1:317449)
error:   鈹?[22m [6]     at l.openShellProcess (F:\workspace\Lens\resources\app.asar\static\build\main.js:1:318082)
error:   鈹?[22m [7]     at async l.open (F:\workspace\Lens\resources\app.asar\static\build\main.js:1:307458)
(node:29216) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

This is the software runtime log-----------------------

18191518054 avatar Jun 02 '22 06:06 18191518054

Thanks for the logs

Nokel81 avatar Jun 02 '22 13:06 Nokel81

I have this problem with with Rancher clusters. When I try to open a shell from a pod on a rancher cluster I get: Screen Shot 2022-06-13 at 9 36 22 PM

Any non rancher cluster works fine.

Here is the log:

info: [SHELL-SESSION]: shell has exited for 0da0e43917925facc7bd1dc7a4e2d0cd:3a952ed3-4928-4b1d-ae14-0ec768dc8fa3 closed with exitcode=1
info: [CLUSTER]: refresh {"accessible":true,"disconnected":false,"id":"0da0e43917925facc7bd1dc7a4e2d0cd","name":"stage-new","online":true,"ready":true}
info: [SHELL-SESSION]: websocket for 0da0e43917925facc7bd1dc7a4e2d0cd:3a952ed3-4928-4b1d-ae14-0ec768dc8fa3 closed with code=NormalClosure(1000) {"cluster":{"accessible":true,"disconnected":false,"id":"0da0e43917925facc7bd1dc7a4e2d0cd","name":"stage-new","online":true,"ready":true}}

jason-hobbs avatar Jun 14 '22 02:06 jason-hobbs

What is your PTYSHELL env variable set to?

Nokel81 avatar Jun 14 '22 14:06 Nokel81

Or do you have the shell user preference set?

Nokel81 avatar Jun 14 '22 14:06 Nokel81

It is /bin/zsh

jason-hobbs avatar Jun 14 '22 15:06 jason-hobbs

Okay thanks, can you open a new issue for rancher clusters in particular, but given that the OP is on windows and the logs provided what you are seeing is a separate issue.

Nokel81 avatar Jun 14 '22 15:06 Nokel81

Changing File > Preferences > Terminal > Terminal Shell Path from sh to wsl (or powershell.exe) solved the issue in my case For some reason sh was the default value for this property even though I use Windows

PavelMikhailouski avatar Jul 27 '22 10:07 PavelMikhailouski

@PavelMikhailouski Thanks for noticing that

Nokel81 avatar Jul 27 '22 12:07 Nokel81