mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-02-28 05:02:59 +00:00
2 KiB
2 KiB
11. Troubleshooting Runbook
Fast triage order
- Confirm panel reachability and login.
- Check Xray running state on Overview.
- Check recent panel logs and Xray logs.
- Verify inbound enable state and port binding.
- Verify client enabled/quota/expiry/IP limits.
- Verify routing and DNS policy impact.
Common issues
Panel loads but auth/session fails
Checks:
- Session settings and secret availability.
- Cookie persistence and base path correctness.
Files:
web/web.goweb/service/setting.go
Inbound saved but traffic not flowing
Checks:
- Runtime apply result (
needRestartscenarios). - Xray state and error logs.
- Transport/security mismatch with client app.
Files:
web/service/inbound.goweb/service/xray.go
Clients unexpectedly disabled/depleted
Checks:
- Auto disable/renew logic from periodic jobs.
totalGB,expiryTime, reset behavior.
Files:
web/service/inbound.goweb/job/xray_traffic_job.go
Assignment sync errors in custom clients feature
Checks:
- Inbound protocol supports multi-client.
- Assignment detach is not removing last remaining client from inbound.
- Underlying inbound client key (id/password/email) still valid.
Files:
web/service/client_center.goweb/service/inbound.go
Panic or 500 during Xray API interaction
Current guard:
xray/api.gonow returns explicit error when handler client is nil.
Action:
- Confirm Xray API availability and startup timing.
Local dev troubleshooting
If app cannot write default paths:
- Use repo-local env:
XUI_DB_FOLDER=$PWD/tmp/dbXUI_LOG_FOLDER=$PWD/tmp/logs
If dependency proxy blocks build:
GOPROXY=direct go build ./...
If login fails in fresh local DB:
- Run init:
go run . setting -port 2099 -username admin -password admin
Evidence collection checklist
Collect before major debugging:
- Active inbounds list JSON.
- Client traffic record snapshot.
- Current panel settings export.
- Recent xray log excerpts around failure time.