After a reboot, the Inbox doesn't reclaim its own tailscale serve mappings ("Another tailscale serve mapping already uses port …")

Abierto
#3,591 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
65/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

Find chooseTailnetDoorPort and the code that checks existing tailscale serve mappings against the Inbox's records. Read how ownership is determined when the target port has no listener after restart, then follow the Inbox startup path for both its own port and the 8443 door. Done when matching recorded mappings are reclaimed or re-pointed on start and unrelated mappings are still refused.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

After a reboot, the Inbox doesn't reclaim its own tailscale serve mappings ("Another tailscale serve mapping already uses port …")

Environment: plannotator 0.28.67 on two Macs (macOS), Tailscale for Mac, the same tailnet and account. Both Inboxes are published on the tailnet ("inboxTailscale": true) and linked to each other (plannotator inbox link), "online, both ways" before the reboot.

What happens

Tailscale keeps background serve mappings across a reboot. After one Mac was rebooted, its Inbox no longer treated the mappings it had made itself as its own:

  1. The Inbox's own port. plannotator inbox printed:

    Not published over your tailnet: Another tailscale serve mapping already uses port 57113, the Inbox's port. The Inbox never replaces it: remove it with "tailscale serve --https=57113 off" if nothing needs it.

    tailscale serve status showed https://<mac>.<tailnet>.ts.net:57113 → proxy http://127.0.0.1:57245, and nothing listened on 57245 (lsof -nP -iTCP:57245 -sTCP:LISTEN empty). It was the Inbox's own mapping from before the reboot.

  2. The link door (8443). https://<mac>.<tailnet>.ts.net:8443 → proxy http://127.0.0.1:57298, the same target the door used before. After tailscale serve --https=57113 off and plannotator inbox restart, the Inbox published on 57113 but still did not listen on 57298, and plannotator inbox link --list flagged this computer: "Another tailscale serve mapping now uses port 8443, where linked machines reach this Inbox. The Inbox never replaces it…".

  3. Only after tailscale serve --https=8443 off and a second plannotator inbox restart did it listen on 57298 again. It re-created the 8443 mapping with the same target, and the link came back "online, both ways".

So a reboot takes two rounds of tailscale serve … off plus plannotator inbox restart by hand.

The other Mac had not been rebooted, but its Inbox had been restarted since the mapping was made. It had the first case too: its port 58793 mapped to 127.0.0.1:57747, where nothing listened, and tailnet_url was null until the mapping was removed and the Inbox restarted.

Expected

A mapping on the Inbox's own port or its door port that points at a loopback port nothing listens on, and that this Inbox made (it matches its records), is reclaimed or re-pointed at start, instead of being refused as someone else's. In chooseTailnetDoorPort, a record whose target is unchanged should count as own even when nothing is listening yet after a restart.

Workaround
tailscale serve status                 # find the Inbox's port and 8443 mapped to a dead 127.0.0.1 port
tailscale serve --https=<port> off     # the Inbox's port, then 8443 if link --list still complains
plannotator inbox restart
Lenguaje dominante
TypeScript
Estrellas
8.7k
Forks
649
Merge medio
16 h 1 min
PR fusionados (30 d)
756

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de backnotprop/plannotator

Todos los issues de backnotprop/plannotator

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.