Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

fix: Add clear warning when Docker token is already in use

rcourtmanfd7e80ae174f
diff --git a/internal/dockeragent/agent.go b/internal/dockeragent/agent.go
index 3ff398f2c5..a3309f25b5 100644
--- a/internal/dockeragent/agent.go
+++ b/internal/dockeragent/agent.go
@@ -699,6 +699,14 @@ func (a *Agent) sendReportToTarget(ctx context.Context, target TargetConfig, pay
if errMsg == "" {
errMsg = resp.Status
}
+ // Detect token-already-in-use error and log a clear warning
+ if strings.Contains(errMsg, "already in use") {
+ a.logger.Error().
+ Str("pulseURL", target.URL).
+ Msg("DOCKER REGISTRATION FAILED: This API token is already used by another Docker agent. " +
+ "Each Docker host requires its own unique token. " +
+ "Generate a new token in Pulse Settings > Agents and reinstall with the new token.")
+ }
return fmt.Errorf("target %s: pulse responded %s: %s", target.URL, resp.Status, errMsg)
}