Compare commits
2 Commits
24d8fbd366
...
d86a7e49b5
| Author | SHA1 | Date | |
|---|---|---|---|
| d86a7e49b5 | |||
| 879f97c843 |
@@ -302,7 +302,19 @@ Kit-connect is the unified replacement for Sections 6 and 7. One SPK installs bo
|
|||||||
|
|
||||||
**Resolution for x4662**: Kittunnel restarted via Package Center through QuickConnect. Tunnel stable on port 2229.
|
**Resolution for x4662**: Kittunnel restarted via Package Center through QuickConnect. Tunnel stable on port 2229.
|
||||||
**Resolution for x4324**: Kit-connect daemon reconnected after authorized_keys fix on VPS. Tunnel stable on port 2225.
|
**Resolution for x4324**: Kit-connect daemon reconnected after authorized_keys fix on VPS. Tunnel stable on port 2225.
|
||||||
**Pending**: x4078 needs physical access — kit-connect daemon is installed and connecting but fails because it forwards to port 22 instead of 2223.
|
**Resolution for x4078 (2026-07-22, remote — NO physical access needed)**: Recovered entirely over the
|
||||||
|
still-live **Tailscale** path (`100.116.71.43`, SRM SSH `:2223`) — QuickConnect was also up the whole
|
||||||
|
time. The reverse tunnel was the *only* dead path. Root cause on-device: `TUNNEL_LOCAL_SSH_PORT=22` in
|
||||||
|
`/etc/kit-connect/connect.conf` (SRM sshd listens on 2223). Fix: SSH in over Tailscale from a tailnet
|
||||||
|
node (e.g. the hub), `sed -i 's/^TUNNEL_LOCAL_SSH_PORT=.*/TUNNEL_LOCAL_SSH_PORT=2223/'` the conf, then
|
||||||
|
`synopkg stop kit-connect; synopkg start kit-connect`. Tunnel came back on port 2226; end-to-end verified.
|
||||||
|
Lesson: **a field router is only "inaccessible" if ALL of {Tailscale, QuickConnect, reverse tunnel} are
|
||||||
|
down — check each before assuming physical access is required.**
|
||||||
|
|
||||||
|
**Latent daemon bug found**: `connect-daemon.sh` main loop ends each iteration with a bare `wait`, which
|
||||||
|
blocks forever on the `setsid`-launched `tailscaled` child. Once the tunnel started failing, the loop
|
||||||
|
wedged for ~58 min and never self-healed on the corrected config until the package was restarted. Fix
|
||||||
|
the `wait` (e.g. `wait "$SSH_PID"` or `wait -n`) so the retry loop can recover on its own.
|
||||||
|
|
||||||
**SPK fixed**: Rebuilt with `which` instead of `command -v` and `TUNNEL_LOCAL_SSH_PORT=2223`. Available at `https://git.keylinkit.net/allen/kit-busrouter/raw/branch/main/kit-connect/kit-connect-0.1-0001.spk`.
|
**SPK fixed**: Rebuilt with `which` instead of `command -v` and `TUNNEL_LOCAL_SSH_PORT=2223`. Available at `https://git.keylinkit.net/allen/kit-busrouter/raw/branch/main/kit-connect/kit-connect-0.1-0001.spk`.
|
||||||
|
|
||||||
|
|||||||
@@ -210,6 +210,6 @@ while true; do
|
|||||||
# Start tunnel (blocking — restarts on failure)
|
# Start tunnel (blocking — restarts on failure)
|
||||||
start_tunnel 2>/dev/null || true
|
start_tunnel 2>/dev/null || true
|
||||||
|
|
||||||
log "daemon: both services running"
|
# start_tunnel is already blocking and self-retrying; no bare wait here — a bare
|
||||||
wait # Wait for any child to die, then restart
|
# wait blocks forever on the setsid'd tailscaled child and wedges the retry loop.
|
||||||
done
|
done
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Busrouter telemetry — BusyBox-compatible. Posts device state to fleet hub.
|
||||||
|
HUB="http://167.172.237.162:8080/api/telemetry"
|
||||||
|
ID=$(cat /etc/busrouter/device-id 2>/dev/null || hostname)
|
||||||
|
TS=$(date +%s)
|
||||||
|
UP=$(awk '{printf "%d", $1}' /proc/uptime 2>/dev/null)
|
||||||
|
|
||||||
|
# BusyBox grep doesn't have -P; use sed instead
|
||||||
|
WAN1=$(ip -4 addr show eth0 2>/dev/null | sed -n 's/.*inet \([0-9.]*\).*/\1/p' | head -1)
|
||||||
|
WAN2=$(ip -4 addr show eth2 2>/dev/null | sed -n 's/.*inet \([0-9.]*\).*/\1/p' | head -1)
|
||||||
|
GW=$(ip route show default 2>/dev/null | sed -n 's/.*via \([0-9.]*\).*/\1/p' | head -1)
|
||||||
|
|
||||||
|
# Build JSON with proper escaping for BusyBox
|
||||||
|
cat >/tmp/telemetry.json <<EOF
|
||||||
|
{"device_id":"$ID","platform":"synology","timestamp":$TS,"uptime":$UP,"version":"0.1-0001","wan":{"wan1":{"ip":"$WAN1"},"wan2":{"ip":"$WAN2"},"gateway":"$GW"}}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
curl -s --connect-timeout 5 --max-time 10 -X POST "$HUB" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d @/tmp/telemetry.json >/dev/null 2>&1
|
||||||
|
rm -f /tmp/telemetry.json
|
||||||
Reference in New Issue
Block a user