Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Seemingly random loss (and restoration) of connection and remote access - possibly related to Nginx - [emerg] a duplicate default server for x.x.x.x:443

Featured Replies

Hi All,

I've been using and loving UNRAID for several years now with minimal issues, but this one has had me scratching my head for several months now!

I keep getting this Nginx [emerg] warning that "a duplicate default server for x.x.x.x:443 in /etc/nginx/conf.d/servers.conf:70" and indeed if I check servers.conf there are two default server entries in there for the same address and same port.

I've tried removing one manually, but some service keeps adding it again and I can't figure out what.

If anyone can see a glaring config error I've made, please let me know.

1 - Duplicate default server.png

Logs.png

nginx conf settings.png

Management Access - 1.png

Management Access - 2.png

Edited by krullos
Uncertain if the nginx error is the main issue or not

  • Community Expert

I’d start by posting your diagnostics

  • Author

Strangely, even while reporting that the nginx server could no reload, I still have Unraid Connect access to the server and my Dockers (including Guacamole, Plex, etc) at the moment, but occasionally (recent example being the afternoon/evening of the 6th of August) I lose all but local access from the server - no Guacamole, no Plex, no Unraid Connect access.

When that happens and I access the server locally via CLI I am able to ping local devices, but am unable to ping the Default Gateway or anything on the internet (8.8.8.8, etc). Rebooting the server often doesn't resolve the issue, so sometimes I just have to wait until Guacamole, Plex and Unraid Connect access is suddenly restored for reasons not yet know to me (like later in the evening of the 6th of August)

  • krullos changed the title to Seemingly random loss (and restoration) of connection and remote access - possibly related to Nginx - [emerg] a duplicate default server for x.x.x.x:443
  • Community Expert

Try capturing the next event before rebooting.

To see if nginx files are changing and when:

mkdir -p /boot/logs/nginx-debug

inotifywait -m -e close_write,attrib,move,create,delete \

--format '%T %e %w%f' --timefmt '%F %T' \

/etc/nginx /etc/nginx/conf.d \

| tee /boot/logs/nginx-debug/nginx-file-events.log

When an nginx error occurs, immediately save a snapshot:

D=/boot/logs/nginx-debug/$(date +%F-%H%M%S)

mkdir -p "$D"

nginx -t >"$D/nginx-test.txt" 2>&1

ps -ef >"$D/processes.txt"

stat /etc/nginx/nginx.conf /etc/nginx/fastcgi_params /etc/nginx/conf.d/servers.conf >"$D/file-stat.txt"

sha256sum /etc/nginx/nginx.conf /etc/nginx/fastcgi_params /etc/nginx/conf.d/servers.conf >"$D/file-sha256.txt"

cp -a /etc/nginx/nginx.conf /etc/nginx/fastcgi_params /etc/nginx/conf.d "$D/"

tail -n 500 /var/log/syslog >"$D/syslog-tail.txt"

Do not copy the SSL certificate files themselves.

Look for custom writers:

grep -RIlE 'rc\.nginx|/etc/nginx|servers\.conf' \

/boot/config/go /boot/config/plugins/user.scripts/scripts 2>/dev/null

Look especially for scripts that call rc.nginx, regenerate config, renew certificates, or modify networking.

And I would treat the gateway issue separately. During the full outage, before reboot:

ip -br link

ip route

ip neigh show

ping -c 3 <default-gateway>

ping -c 3 1.1.1.1

  • 2 weeks later...

I can confirm this issue on two separate Unraid 7.3.2 servers, and it appears directly associated with the Unraid API/Connect service.

Main server (“Tower”):

  • Unraid API/Connect 4.37.0

  • Large numbers of simultaneous rc.nginx reload operations occurred.

  • /etc/nginx/conf.d/servers.conf acquired a complete duplicate set of self-signed HTTPS, HTTP redirect, and CA-signed HTTPS server blocks.

  • nginx -t then failed with duplicate default server.

  • The WebGUI became unreachable.

  • Stopping unraid-api, removing only the complete duplicated blocks, and restarting nginx restored the local WebGUI.

Test server (“Tower2”):

  • Upgraded to Unraid API/Connect 4.37.1 (4.37.1+d8801361).

  • It initially appeared stable, with API uptime of approximately 47 hours and zero PM2 restarts.

  • It then developed the identical configuration corruption.

  • The syslog contained 15,412 entries matching rc.nginx.

  • Multiple nginx reload attempts were occurring at the same timestamps.

  • nginx -t failed with:

a duplicate default server for [LAN IP]:2443 in /etc/nginx/conf.d/servers.conf:91
  • servers.conf again contained one complete duplicated set of the same three server blocks.

  • I ran unraid-api stop. The rc.nginx count was 15,412 before waiting and remained exactly 15,412 after 10 seconds, indicating that the reload storm stopped immediately with the API.

  • After preserving the logs and corrupted configuration, I removed only the complete duplicate block. nginx -t succeeded, and the local WebGUI worked again without restarting nginx.

This has now reproduced with both 4.37.0 and 4.37.1 on two different Unraid 7.3.2 servers. Version 4.37.1 therefore does not appear to fix it.

I have preserved the following from both incidents:

  • Full syslogs

  • Corrupted and repaired servers.conf

  • nginx validation output

  • Process listings

  • /var/log/graphql-api.log

  • /var/log/unraid-api/

I have not included certificates, API keys, account tokens, or other credentials. I can provide appropriately sanitized diagnostic files if an Unraid developer or moderator would like them.

The behavior looks consistent with concurrent API-triggered nginx reload/configuration-generation operations writing or appending the same server blocks more than once.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.