localizer icon indicating copy to clipboard operation
localizer copied to clipboard

SSH Error when exposing a service

Open patrickleet opened this issue 3 years ago • 2 comments

Trying to use Localizer with Kind for a local development cluster.

Create the tunnels and /etc/hosts works fine, but exposing a service into the cluster results in a crashloop and an error about ssh

INFO[0105] created pod localizer-company-model-bln97     component=exposer service=default/company-model
INFO[0105] waiting for remote pod to be ready ...        component=exposer service=default/company-model
INFO[0109] recreating port-forward due to: endpoint became available  service=default/company-model
INFO[0109] creating tunnel                               endpoint=default/localizer-company-model-bln97 service=default/company-model
DEBU[0111] waiting for transport to be marked as ready   component=exposer service=default/company-model
DEBU[0111] an error occurred forwarding 63422 -> 2222: error forwarding port 2222 to pod 62d2ff65f4e8a78a0a78fdfeb9b71d149058a80de68b01ec34afbc8947cb1570, uid : failed to execute portforward in network namespace "/var/run/netns/cni-25289855-613d-f49e-f3cb-d9c71b4cabb1": failed to connect to localhost:2222 inside namespace "62d2ff65f4e8a78a0a78fdfeb9b71d149058a80de68b01ec34afbc8947cb1570", IPv4: dial tcp4 127.0.0.1:2222: connect: connection refused IPv6 dial tcp6 [::1]:2222: connect: connection refused   error="<nil>" logger=klog
DEBU[0111] transport died                                component=exposer error="ssh: handshake failed: EOF" service=default/company-model
DEBU[0111] error closing listener: close tcp4 0.0.0.0:63422: use of closed network connection  error="<nil>" logger=klog
ERRO[0111] connection died, recreating tunnel connection  component=exposer error="ssh: handshake failed: EOF" service=default/company-model
DEBU[0116] cleaning up pod                               component=exposer service=default/company-model

It then restarts and does the same thing, etc.

Any tips for getting this working?

patrickleet avatar Jul 08 '21 18:07 patrickleet

Hmmmm, I'm not super sure why you are hitting this at the moment. Do you have a base example of this that I could use to try to repro? Thanks!

jaredallard avatar Jul 10 '21 04:07 jaredallard

Not at the moment, but I'll try to create one

patrickleet avatar Jul 10 '21 05:07 patrickleet

From what I can tell, this happens when the linuxserver/openssh-server image is out-of-date. Try removing that from your node's cache. It should fix it! Let me know if that doesn't.

jaredallard avatar Aug 03 '23 20:08 jaredallard