fix(traefik-maljarka-502-bug): diagnosed — root cause CMS-side, не traefik
Bisect через X-Forwarded headers: IIS+CMS возвращает 502 specifically для Host: maljarka.tandemmebel.ru + X-Forwarded-Proto: https. Без XFP=https → 200. URL Rewrite rule из cms-port-leak-fix ставит HTTPS=on/SERVER_PORT=443 → CMS код для этого hostname падает в HTTPS-context. Same class как emspb /admin/assets 500 NullRef, rimiz 404 — pre-existing CMS issues. Side finding: traefik file-watch broken под Docker Desktop Windows (WSL2 9p не пропускает inotify). Rename .yml → .disabled оставался без эффекта 38min после изменения; только docker restart traefik подхватил. Это значит iis-traefik-dead-routes-cleanup был фантомным до сегодняшнего restart 07:42 UTC. 2 новых wiki concepts: traefik-file-watch-wsl2-broken (workarounds) + cms-maljarka-https-mode-crash (3 workarounds + 5 investigation places). Новая follow-up ⚪ cms-maljarka-https-mode-bug-fix. Final smoke post-restart: 7 live hosts ✅ Microsoft-IIS/10.0 без regression, 2 dead routes (sestech, ics-artmaterials) → 404 (cleanup теперь real). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
52
cms-maljarka-https-mode-bug-fix.md
Normal file
52
cms-maljarka-https-mode-bug-fix.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# cms-maljarka-https-mode-bug-fix
|
||||
|
||||
## Goal
|
||||
|
||||
Починить `maljarka.tandemmebel.ru` чтобы он отвечал 200 (не 502) через публичный HTTPS chain. Root cause diagnosed в [[traefik-maljarka-502-bug]]: IIS+CMS падает на этом hostname когда `HTTPS=on`/`SERVER_PORT=443` выставлены URL Rewrite rule'ом. Full mechanism — wiki concept [[cms-maljarka-https-mode-crash]].
|
||||
|
||||
## Key files
|
||||
|
||||
- `C:\sites\snolla\Web.config` — URL Rewrite rule "ForwardedProto-HTTPS" из [[cms-server-port-leak-fix]]
|
||||
- `C:\inetpub\logs\LogFiles\W3SVC*\` — IIS logs site `snolla` (нужно найти sub-status 502.x для конкретного request)
|
||||
- CMS DB — table с per-host config (per [[recovery-architecture-snapshot]], CMS использует MSSQL контейнер)
|
||||
- CMS source: `MoreThenCms.Admin\Mis\Web\Mvc\UrlHelpers\UrlHelpers.cs:14-37` (`Url.SiteRoot()`) — паттерн из [[cms-server-port-leak-fix]]; возможно тут helper падает specifically на этом host
|
||||
|
||||
## Bisect-trace evidence
|
||||
|
||||
```
|
||||
direct backend Host: maljarka.tandemmebel.ru → 200 OK (43KB)
|
||||
direct backend Host: maljarka.tandemmebel.ru + X-Forwarded-For → 200 OK
|
||||
direct backend Host: maljarka.tandemmebel.ru + X-Forwarded-Proto:https → 502 ← триггер
|
||||
direct backend Host: tandemmebel.ru + X-Forwarded-Proto:https → 301 (correct)
|
||||
```
|
||||
|
||||
Single variable: `X-Forwarded-Proto: https` для этого specific hostname.
|
||||
|
||||
## Next action
|
||||
|
||||
1. **IIS logs**:
|
||||
```powershell
|
||||
Get-Content 'C:\inetpub\logs\LogFiles\W3SVC1\u_extend1*.log' -Tail 500 | Select-String 'maljarka' | Select-Object -Last 20
|
||||
```
|
||||
Найти sub-status (502.3 = bad gateway, 502.4 = no server, 502.5 = ARR config, etc.).
|
||||
|
||||
2. **Event Viewer**:
|
||||
```powershell
|
||||
Get-EventLog -LogName Application -Source 'ASP.NET*' -Newest 50 | Where-Object Message -Match 'maljarka' | Format-List
|
||||
```
|
||||
Stack trace покажет точное место crash.
|
||||
|
||||
3. **CMS DB inspection** — есть ли запись для `maljarka.tandemmebel.ru` в table с per-host URLs, и поле HttpsUrl/BaseUrl не NULL ли там.
|
||||
|
||||
4. **Quick workaround если real customer traffic** — apply Workaround B из [[cms-maljarka-https-mode-crash]] (negate condition в URL Rewrite rule for this Host). Backup Web.config first.
|
||||
|
||||
## Open questions
|
||||
|
||||
- [ ] Какой priority? Зависит от того real customer traffic на `maljarka.tandemmebel.ru` или это internal/test subdomain.
|
||||
- [ ] Если CMS bug — fix CMS code или DB hot-fix?
|
||||
- [ ] DLL patch для null-guard (от [[cms-admin-assets-root-folders-seed]]) — может тот же класс bugов; может в одном вылазе чинить вместе.
|
||||
|
||||
## Notes
|
||||
|
||||
- 3 workarounds + 5 investigation places задокументированы в [[cms-maljarka-https-mode-crash]] wiki concept.
|
||||
- Не trivially связан с [[cms-server-port-leak-fix]] — там URL Rewrite rule добавлен правильно, но CMS код в этом конкретном случае ломается. Регрессия CMS, не fix'а.
|
||||
Reference in New Issue
Block a user