vito / bass

a low fidelity scripting language for project infrastructure
https://bass-lang.org
MIT License
378 stars 13 forks source link

`bass --runner` does not recover from a broken connection #243

Closed vito closed 2 years ago

vito commented 2 years ago

Describe the bug

I ran bass --runner for a bit and it disconnected for some reason. It then failed to reconnect on every attempt due to use of closed network connection.

To Reproduce

Haven't confirmed, but probably turning the local machine's network off/on would suffice.

Expected behavior

bass --runner should establish a new connection and resume forwarding.

Additional context

❯ bass --runner github.bass-lang.org
encountered unknown host key:

  [github.bass-lang.org]:6455 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHWy9mZd5afRbKuXUQs7g/30bl+F8wzlU66xTYknGMfpkOm2YQXRTPVTUs5/K3nIdPGFP4b7QOSCOahXVqA98Ec=

do you trust this key? [yN]: y
=> bass --runner github.bass-lang.org [2940.0s]
=> [ssh] forward --os linux --arch amd64 ERROR [2940.0s]
=> [ssh] forward --os linux --arch amd64 ERROR [2940.0s]                                                                                                                                                                                                                                                                    => [ssh] forward --os linux --arch amd64 ERROR [2940.0s]
 ▕ 19:25:54.784    debug   heartbeated {"side": "server"}
 ▕ 19:26:54.787    debug   heartbeated {"side": "server"}
 ▕ 19:27:54.785    debug   heartbeated {"side": "server"}
 ▕ 15:33:54.749    error   command failed  {"side": "client", "error": "wait: remote command exited without exit status or exit signal"}
=> bass --runner github.bass-lang.org CANCELED [3818.0s]
 ▕ 15:45:33.520    error   failed to listen    {"error": "read tcp 192.168.2.73:40450->138.197.162.69:6455: use of closed network connection"}
 ▕ 15:46:55.270    error   failed to listen    {"error": "read tcp 192.168.2.73:40450->138.197.162.69:6455: use of closed network connection"}
 ▕ 15:47:42.858    error   failed to listen    {"error": "read tcp 192.168.2.73:40450->138.197.162.69:6455: use of closed network connection"}
 ▕ 15:48:30.684    error   failed to listen    {"error": "read tcp 192.168.2.73:40450->138.197.162.69:6455: use of closed network connection"}
!!! [ssh] forward --os linux --arch amd64
2: [0.02s] 18:44:54.784 info    registered  {"side": "server"}
2: [60.0s] 18:45:54.786 debug   heartbeated {"side": "server"}
# ... snipped ...
2: [2580.0s] 19:27:54.785   debug   heartbeated {"side": "server"}
2: [2940.0s] 15:33:54.749   error   command failed  {"side": "client", "error": "wait: remote command exited without exit status or exit signal"}
context canceled