[GH-ISSUE #1520] 🐛 Bug: nginx-ui keeps trying to connect to stale unix socket (nginx-ui.sock) #6617

Open
opened 2026-03-01 17:13:26 +03:00 by kerem · 0 comments
Owner

Originally created by @bishwajitcadhikary on GitHub (Jan 12, 2026).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/1520

When running nginx-ui on macOS via Homebrew, the application repeatedly tries to connect to a Unix socket (nginx-ui.sock) that is not active or not created by default.
This causes continuous connection refused errors in the error log, even though the web UI works normally over HTTP.

To Reproduce
Steps to reproduce the behavior:
1. Install nginx-ui using Homebrew

brew install nginx-ui
brew services start nginx-ui

2.	Open nginx-ui in the browser (UI loads correctly)
3.	Monitor error logs

tail -f /opt/homebrew/var/log/nginx-ui.err.log

4.	Observe repeated socket errors:

dial unix /opt/homebrew/var/nginx-ui/nginx-ui.sock: connect: connection refused

Expected behavior
nginx-ui should not attempt to connect to a Unix socket unless socket mode is explicitly configured.
If socket support is disabled or unused, no socket-related errors should appear in logs.

Screenshots
N/A (log output included above)

Info (please complete the following information):
• Server OS: macOS (Apple Silicon)
• Server Arch: aarch64 (arm64)
• Nginx UI Version: Homebrew latest (as of Jan 2026)
• Your Browser: Chrome / Safari

Additional context
• The web UI and API endpoints return 200 OK and function correctly.
• Error repeats every ~10 seconds in nginx-ui.err.log.
• Removing the stale socket file immediately resolves the issue:

rm -f /opt/homebrew/var/nginx-ui/nginx-ui.sock

•	After removal, the error logs stop and the service behaves normally.
•	This issue is confusing because brew services info nginx-ui may show Loaded ✔ but Running ✘, while the process is actually running.

Suggestion:
• Disable Unix socket usage unless explicitly enabled
• Or validate socket existence before attempting to dial
• Or auto-clean stale socket files on startup

Originally created by @bishwajitcadhikary on GitHub (Jan 12, 2026). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/1520 When running nginx-ui on macOS via Homebrew, the application repeatedly tries to connect to a Unix socket (nginx-ui.sock) that is not active or not created by default. This causes continuous connection refused errors in the error log, even though the web UI works normally over HTTP. ⸻ To Reproduce Steps to reproduce the behavior: 1. Install nginx-ui using Homebrew brew install nginx-ui brew services start nginx-ui 2. Open nginx-ui in the browser (UI loads correctly) 3. Monitor error logs tail -f /opt/homebrew/var/log/nginx-ui.err.log 4. Observe repeated socket errors: dial unix /opt/homebrew/var/nginx-ui/nginx-ui.sock: connect: connection refused ⸻ Expected behavior nginx-ui should not attempt to connect to a Unix socket unless socket mode is explicitly configured. If socket support is disabled or unused, no socket-related errors should appear in logs. ⸻ Screenshots N/A (log output included above) ⸻ Info (please complete the following information): • Server OS: macOS (Apple Silicon) • Server Arch: aarch64 (arm64) • Nginx UI Version: Homebrew latest (as of Jan 2026) • Your Browser: Chrome / Safari ⸻ Additional context • The web UI and API endpoints return 200 OK and function correctly. • Error repeats every ~10 seconds in nginx-ui.err.log. • Removing the stale socket file immediately resolves the issue: rm -f /opt/homebrew/var/nginx-ui/nginx-ui.sock • After removal, the error logs stop and the service behaves normally. • This issue is confusing because brew services info nginx-ui may show Loaded ✔ but Running ✘, while the process is actually running. Suggestion: • Disable Unix socket usage unless explicitly enabled • Or validate socket existence before attempting to dial • Or auto-clean stale socket files on startup
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-ui#6617
No description provided.