MHSanaei/3x-ui · error
HTTP %d from remote panel
Error message
HTTP %d from remote panel
What it means
The node status probe reached the remote panel but got a non-200 HTTP status, so the health check fails with 'HTTP %d from remote panel' recorded in patch.LastError. The request itself succeeded (LatencyMs is set), so this is the remote speaking HTTP but rejecting the call — typically 401 (bad/missing API token), 404 (wrong base path), or 5xx (remote panel unhealthy).
Source
Thrown at internal/web/service/node.go:1152
client, err := runtime.HTTPClientForNode(n, proxyURL)
if err != nil {
patch.LastError = err.Error()
return patch, err
}
start := time.Now()
resp, err := client.Do(req)
if err != nil {
patch.LastError = err.Error()
return patch, err
}
defer resp.Body.Close()
patch.LatencyMs = int(time.Since(start) / time.Millisecond)
if resp.StatusCode != http.StatusOK {
patch.LastError = fmt.Sprintf("HTTP %d from remote panel", resp.StatusCode)
return patch, errors.New(patch.LastError)
}
var envelope struct {
Success bool `json:"success"`
Msg string `json:"msg"`
Obj *struct {
CpuPct float64 `json:"cpu"`
Mem struct {
Current uint64 `json:"current"`
Total uint64 `json:"total"`
} `json:"mem"`
Xray struct {
Version string `json:"version"`
State string `json:"state"`
ErrorMsg string `json:"errorMsg"`
} `json:"xray"`
PanelVersion string `json:"panelVersion"`
PanelGuid string `json:"panelGuid"`View on GitHub (pinned to ad32144c42)
Solutions
- Match the reported code: 401 → re-enter the node's API token; 404 → fix BasePath; 5xx → inspect the remote panel's own logs
- curl the URL by hand from the manager node to see the exact status and body
- Verify scheme matches the actual listener (http vs https) and the port is the panel port, not the xray inbound port
Example fix
# before
node: { address: 'sub1.example.com', port: 443, scheme: 'https', basePath: '/' }
# (HTTP 404 from remote panel)
# after
node: { address: 'sub1.example.com', port: 443, scheme: 'https', basePath: '/xui' }
# then: curl -H 'Authorization: Bearer <token>' https://sub1.example.com/xui/panel/api/server/status Defensive patterns
Strategy: retry
Try / catch
resp, err := probe(ctx, node)
if err != nil && strings.Contains(err.Error(), "HTTP ") {
// 5xx from a restarting remote may clear: retry with backoff once
time.Sleep(2 * time.Second)
resp, err = probe(ctx, node)
} Prevention
- Keep the node's API token, base path, scheme and port in sync with the remote panel
- Verify with curl from the manager node whenever a node is added
- Distinguish 401/404 (config) from 5xx (remote health) before changing anything
When it happens
Trigger: Node's API token rotated on the remote but not updated locally → 401; wrong BasePath so the status URL misses the panel router → 404; remote panel restarting or erroring → 502/500; TLS scheme mismatch (https to an http port can also surface as a proxy error).
Common situations: Multi-node deployments after credential rotation; base-path misconfiguration behind reverse proxies; remote node temporarily down.
Related errors
- node port must be 1-65535
- remote returned success=false: {msg}
- %s %s: %w
- Request failed with status ${status}
- node {name} is disabled
AI-assisted analysis of MHSanaei/3x-ui@ad32144c42 (2026-08-15).
Data as JSON: /api/errors/b24ce1383dfdbeca.
Report an issue: GitHub.