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

オープン
#3,591 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
TypeScript
スター
8.7k
フォーク
649
平均マージ
16時間 1分
マージ済み PR(30日)
756

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

backnotprop/plannotator のほかの issue

backnotprop/plannotator の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。