XTLS/Xray-core · error
failed to listen Unix Domain Socket on
Error message
failed to listen Unix Domain Socket on ${address} What it means
Raised in dsWorker.Start() when internet.ListenUnix cannot create/bind the Unix domain socket at the configured path — commonly the file already exists, the parent directory is missing, or permissions deny creation. Logged at Warning with the underlying error as Base.
Solutions
- Remove a stale socket file at that path
- Ensure the directory exists and is writable
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at app/proxyman/inbound/worker.go:531 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15).
Data as JSON: /api/errors/96baf2165cc9fa76.
Report an issue: GitHub.
Appendix: source
Thrown at app/proxyman/inbound/worker.go:531
errors.LogInfoInner(ctx, err, "failed to close connection")
}
}
func (w *dsWorker) Proxy() proxy.Inbound {
return w.proxy
}
func (w *dsWorker) Port() net.Port {
return net.Port(0)
}
func (w *dsWorker) Start() error {
ctx := context.Background()
hub, err := internet.ListenUnix(ctx, w.address, w.stream, func(conn stat.Connection) {
go w.callback(conn)
})
if err != nil {
return errors.New("failed to listen Unix Domain Socket on ", w.address).AtWarning().Base(err)
}
w.hub = hub
return nil
}
func (w *dsWorker) Close() error {
var errs []interface{}
if w.hub != nil {
if err := common.Close(w.hub); err != nil {
errs = append(errs, err)
}
if err := common.Close(w.proxy); err != nil {
errs = append(errs, err)
}
}
if len(errs) > 0 {
return errors.New("failed to close all resources").Base(errors.New(serial.Concat(errs...)))
}View on GitHub (pinned to 7d214f8b09)