[BUG] Quadlet curl vs nginx behavior
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- docker, dockerfile, linux, nginx
- Lĩnh vực
- devops, networking
Hướng nghiên cứu
The failing piece is the proxy_pass $upstream_proto://$upstream_app:$upstream_port; line in the nginx site config, where realhost does not resolve inside the SWAG container while curl realhost:8080 works. Start by comparing name resolution inside the container (getent hosts realhost, /etc/hosts, /etc/resolv.conf) with the Quadlet unit that sets Network=host. Done means finding why nginx resolves the name differently and either fixing the configuration or documenting the workaround; the issue does not yet state a required change.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
When running on a machine called "realhost", executing curl realhost:8080 nets the correct webpage.
But when nginx is told to connect to realhost:8080 using the below configuration it fails. Replacing realhost with 127.0.0.1 works properly. This is running with network mode = host.
set $upstream_app realhost;
set $upstream_port 8080;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
Expected Behavior
if curl can resolve and get the webpage then so should nginx.
Steps To Reproduce
- Run with a podman quadlet:
- Enter container. Run curl targeting hostname that container is running on
- use the same hostname in curl. Fails
- use 127.0.0.1 instead of hostname or localhost. Works
Environment
- OS: Debian 13
- How docker service was installed: sudo apt install podman
CPU architecture
x86-64
Docker creation
[Unit]
Description=SWAG container.
Wants=network-online.target
After=network-online.target
[Container]
Image=lscr.io/linuxserver/swag:latest
ContainerName=swag
AutoUpdate=registry
Network=host
AddCapability=NET_ADMIN
Environment=TZ=Europe/Amsterdam
Environment=URL=maindomain.tld
Environment=EXTRA_DOMAINS=*.domain.tld
Environment=VALIDATION=dns
Environment=SUBDOMAINS=wildcard
Environment=DNSPLUGIN=provider
Environment=SWAG_AUTORELOAD=true
Environment=DOCKER_MODS=linuxserver/mods:swag-dashboard
Volume=/srv/swag:/config:Z
LogDriver=journald
[Service]
Restart=always
ExecStartPre=mkdir -p /srv/swag
[Install]
WantedBy=default.target
Container logs
[mod-init] Running Docker Modification Logic
[mod-init] Adding linuxserver/mods:swag-dashboard to container
[mod-init] Downloading linuxserver/mods:swag-dashboard from lscr.io
[mod-init] Installing linuxserver/mods:swag-dashboard
[mod-init] linuxserver/mods:swag-dashboard applied to container
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-swag-old-certbot-paths: skipped
[migrations] done
usermod: no changes
───────────────────────────────────────
██╗ ███████╗██╗ ██████╗
██║ ██╔════╝██║██╔═══██╗
██║ ███████╗██║██║ ██║
██║ ╚════██║██║██║ ██║
███████╗███████║██║╚██████╔╝
╚══════╝╚══════╝╚═╝ ╚═════╝
Brought to you by linuxserver.io
───────────────────────────────────────
To support the app dev(s) visit:
Certbot: https://supporters.eff.org/donate/support-work-on-certbot
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID: 911
User GID: 911
───────────────────────────────────────
Linuxserver.io version: 5.8.0-ls489
Build-date: 2026-10-10T09:44:35+00:00
───────────────────────────────────────
using keys found in /config/keys
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│ old date │ new date │ path │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2025-06-08 │ 2026-09-08 │ /config/nginx/tinyauth-server.conf │
│ 2025-12-17 │ 2026-07-19 │ /config/nginx/tinyauth-location.conf │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
Variables set:
PUID=
PGID=
TZ=Europe/Amsterdam
URL=maindomain.tld
SUBDOMAINS=wildcard
EXTRA_DOMAINS=*.domain.tld
ONLY_SUBDOMAINS=false
VALIDATION=dns
CERTPROVIDER=
CERT_PROFILE=
DNSPLUGIN=provider
EMAIL=
STAGING=
Using Let's Encrypt as the cert provider
SUBDOMAINS entered, processing
Wildcard cert for maindomain.tld will be requested
EXTRA_DOMAINS entered, processing
Extra domains processed are: domain.tld
No e-mail address entered or address invalid
dns validation via transip plugin is selected
Certificate exists; parameters unchanged; starting nginx
The cert does not expire within the next day. Letting the cron script handle the renewal attempts.
**** Applying the SWAG dashboard mod... ****
**** Adding goaccess to package install list ****
**** libmaxminddb already installed, skipping ****
**** Applied the SWAG dashboard mod ****
[pkg-install-init] **** Installing all mod packages ****
(1/1) Installing goaccess (1.10.2-r0)
Executing busybox-1.37.0-r31.trigger
OK: 207.6 MiB in 219 packages
[custom-init] No custom files found, skipping...
Auto-reload: Watching the following folders for changes to .conf files:
/config/nginx
[ls.io-init] done.
2026/10/15 13:24:28 [warn] 858#858: conflicting server name "_" on 0.0.0.0:443, ignored
2026/10/15 13:24:28 [warn] 858#858: conflicting server name "_" on [::]:443, ignored
Server ready
- Ngôn ngữ chính
- Dockerfile
- Star
- 3.8k
- Fork
- 274
- Merge trung bình
- 25 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của linuxserver/docker-swag
-
no-issue-activity
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
linuxserver/docker-swag#631 · 2 bình luận ·
-
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 25/100
linuxserver/docker-swag#636 · 1 bình luận ·
-
[BUG] Anonymous Authelia redirects can overwrite a newer login sessionCó thể đã có người làm @MeiXu6693 đã nhận 20 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
linuxserver/docker-swag#634 · 1 bình luận ·
-
[BUG] "chmod: changing permissions of '/XXX': Bad address" error message (QNAP)Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug upstream issue work-in-progress
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
linuxserver/docker-swag#514 · 75 bình luận ·
-
awaiting-approval
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
linuxserver/docker-swag#276 · 7 bình luận · 6 reaction ·
Tất cả issue của linuxserver/docker-swag
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
soroswap/token-list#125 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
nekko-labs/nekko-agent#2998 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
francescopace/espectre#222 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
good first issue ops security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Kyvera-Labs/verixa#565 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày