mxschmitt / action-tmate

Debug your GitHub Actions via SSH by using tmate to get access to the runner system itself.
https://mxschmitt.github.io/action-tmate/
MIT License
2.87k stars 285 forks source link

Performance issues with `mxschmitt/action-tmate@v3` #103

Closed stdedos closed 2 years ago

stdedos commented 2 years ago

Hello there!

I have been using the mxschmitt/action-tmate@v3 successfully for some time; however, nowadays it is impossible to get a terminal.

Preparation is dead-slow:

Thu, 10 Feb 2022 14:43:33 GMT Run mxschmitt/action-tmate@v3
...
Thu, 10 Feb 2022 14:43:43 GMT openssh-client is already the newest version (1:8.2p1-4ubuntu0.4).
Thu, 10 Feb 2022 14:43:43 GMT xz-utils is already the newest version (5.2.4-1ubuntu1).
Thu, 10 Feb 2022 14:43:43 GMT 0 upgraded, 0 newly installed, 0 to remove and 61 not upgraded.
Thu, 10 Feb 2022 14:51:50 GMT Created new session successfully
Thu, 10 Feb 2022 14:51:50 GMT ssh -base64-@sgp1.tmate.io
Thu, 10 Feb 2022 14:51:50 GMT
Thu, 10 Feb 2022 14:51:50 GMT Entering main loop
Thu, 10 Feb 2022 14:51:50 GMT SSH: ssh -base64-@sgp1.tmate.io

and after that:

$  ssh -base64-@sgp1.tmate.io
kex_exchange_identification: Connection closed by remote host

this happens constantly. I was wondering if you'd happen to have some insight into what could be causing this.

I'd prefer if I didn't have to host my own proxy to connect to the instances.

mxschmitt commented 2 years ago

Folding into https://github.com/mxschmitt/action-tmate/issues/99

We can't do there much probably, since this GitHub Action is only running the official tmate binaries.

stdedos commented 2 years ago

I ... am not sure if my issue is "forced termination of actions".

It is clear that "it is taking ages to setup" and that "I cannot connect to it". Nothing related to Github Actions themselves.

dscho commented 2 years ago

It is clear that "it is taking ages to setup" and that "I cannot connect to it".

The root cause is the same as #99's root cause: tmate and tmate.io have issues at times.

stdedos commented 2 years ago

I see. Do you mind if ... I make this more of a conversation ticket?

What is the benefit that tmate brings than an action that would e.g. setup an ssh/bash terminal, and setup the public ssh keys of the user? I am not interested at the web terminal: It didn't appear "as responsive" as I would like it, I don't want to share it with someone, and I would actually prefer to expose as few parts as possible - even when I am debugging.

dscho commented 2 years ago

What is the benefit that tmate brings than an action that would e.g. setup an ssh/bash terminal, and setup the public ssh keys of the user?

You can do that, of course. But since the agents are behind a firewall, you have no way to connect to that Bash/terminal/sshd/whatever.

That is where tmate comes in: it offers access via a public relay.