Termix icon indicating copy to clipboard operation
Termix copied to clipboard

A host name the server can't resolve crashes SSH Terminal, and after five tries Termix turns it off

Open Li-Lee opened this issue 3 days ago • 3 comments

What happened?

I opened a terminal to a host whose name the Termix server can't resolve. The tab showed the right error, "SSH error: Could not resolve hostname from the Termix server container.", but SSH Terminal's process crashed behind it. The tab then reconnected on its own, which crashed it again. After five crashes in about 20 seconds, Termix turned SSH Terminal off with "The plugin process stopped 5 times in 10 minutes", and it stayed off for everyone on the server until an admin pressed Retry in Plugins.

I first ran into it with a Mac added by its .local name, which a Docker container can't resolve.

Steps to reproduce

  1. On a Docker server, add a host with the address nothing-here.invalid.
  2. Open a terminal to it.
  3. Watch the server log, then open Plugins.

What did you expect?

The tab shows the DNS error, which the plugin already sends, and SSH Terminal keeps running.

Termix version

26.11.3 (Docker image 26.11.3-full, unchanged) with its bundled SSH Terminal 1.5.0. The same code is on dev-1.6.0.

Platform

Web browser

Server install

Docker

Logs

[12:54:17 PM] [ERROR] SSH hostname resolution failed {"operation":"terminal_dns_resolve","hostId":1,"ip":"nothing-here.invalid","port":22,"transient":false}: getaddrinfo ENOTFOUND nothing-here.invalid
[12:54:17 PM] [WARN] Plugin ssh-terminal: node:events:505
[12:54:17 PM] [WARN] Plugin ssh-terminal:     throw er; // Unhandled 'error' event
[12:54:17 PM] [WARN] Plugin ssh-terminal: Error: getaddrinfo ENOTFOUND nothing-here.invalid
[12:54:17 PM] [WARN] Plugin ssh-terminal:     at StreamPort.receive (file:///app/dist/backend/backend/plugins/sandbox/rpc.js:167:22)
[12:54:17 PM] [WARN] Plugin ssh-terminal: Emitted 'error' event on Duplex instance at:
[12:54:17 PM] [WARN] Plugin ssh-terminal:     at emitErrorNT (node:internal/streams/destroy:170:8)
[12:54:17 PM] [WARN] Plugin ssh-terminal: exited (1)
[12:54:18 PM] [INFO] Plugin ssh-terminal: ready in 330 ms
...
[12:54:39 PM] [WARN] Plugin ssh-terminal: exited (1)
[12:54:39 PM] [ERROR] Plugin ssh-terminal stopped
Error: The plugin process stopped 5 times in 10 minutes: exited (1)

The same lookup error and crash repeat at 12:54:19, :23 and :31.

Anything else?

When the lookup fails, SSH Terminal still asks core for a connection, because a relay might reach the host. Core opens a socket to the name anyway. For a direct connection, the plugin sends the error to the tab and returns, but leaves that socket open with no error listener. Core's own ENOTFOUND then arrives on it and crashes the process. I'm opening a PR with a fix.

Li-Lee avatar Dec 01 '26 18:12 Li-Lee

Moved here from Termix-SSH/Plugin-SSH-Terminal, since every Termix repo handles its own issues. The issue describes the core plugin circuit breaker disabling a plugin after repeated crashes, which is a Termix core mechanism, not a bug in the SSH Terminal plugin's code. If this was moved by mistake, reply and a maintainer will sort it out.

termix-triage-bot[bot] avatar Dec 01 '26 18:12 termix-triage-bot[bot]

Auto-triage

SSH Terminal plugin crashes when a host hostname cannot be resolved, causing the plugin to disable itself after repeated restarts.

Field Value
Type Bug
Difficulty 2/5 (Small)
Priority Medium

A maintainer will take a look. If anything above looks wrong, just say so.

termix-triage-bot[bot] avatar Dec 01 '26 18:12 termix-triage-bot[bot]

This was fixed in v26.12.0. Update Termix to the latest version to get it. Thanks for the report!

termix-triage-bot[bot] avatar Dec 02 '26 02:12 termix-triage-bot[bot]