Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,11 +368,19 @@ The Web Console location (`:3001`) in `conf/docker/conf/mc-iam-manager/nginx.tem
vi conf/docker/conf/mc-iam-manager/nginx.template.conf

# 2. Apply to a running installation (generated file)
sed -i '/upstream_console/,/^ }/ s/proxy_read_timeout 120s;/proxy_read_timeout 180s;/' \
conf/docker/container-volume/mc-iam-manager/nginx/nginx.conf
# Write the edited copy back with `cat >` so the file keeps its inode (see note below)
NGINX_CONF=conf/docker/container-volume/mc-iam-manager/nginx/nginx.conf
sed '/upstream_console/,/^ }/ s/proxy_read_timeout 120s;/proxy_read_timeout 180s;/' \
"$NGINX_CONF" > /tmp/nginx.conf.new
cat /tmp/nginx.conf.new > "$NGINX_CONF" && rm /tmp/nginx.conf.new
docker exec mc-iam-manager-nginx nginx -t && docker exec mc-iam-manager-nginx nginx -s reload

# 3. Check the value nginx is actually using
docker exec mc-iam-manager-nginx nginx -T 2>/dev/null | grep proxy_read_timeout
```

> **Note:** `nginx.conf` is bind-mounted into the container as a single file (`/etc/nginx/nginx.conf`). `sed -i` (and editors that save by replacing the file) creates a new file with a new inode, so the container keeps seeing the old content and `nginx -s reload` has no effect. If you already edited it that way, run `docker restart mc-iam-manager-nginx` instead of reload.

To confirm the cause, look for `upstream timed out ... while reading response header from upstream` in `docker logs mc-iam-manager-nginx` at the time of the 504.

## TLS Certificate Auto-Renewal (Mode B)
Expand Down
12 changes: 10 additions & 2 deletions README_kr.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,19 @@ Mode A(자체 서명 인증서) → Mode B(Let's Encrypt)로 같은 도메인을
vi conf/docker/conf/mc-iam-manager/nginx.template.conf

# 2. 기동 중인 설치에 반영(생성된 파일)
sed -i '/upstream_console/,/^ }/ s/proxy_read_timeout 120s;/proxy_read_timeout 180s;/' \
conf/docker/container-volume/mc-iam-manager/nginx/nginx.conf
# 수정본을 `cat >` 로 덮어써서 파일 inode 를 유지(아래 참고)
NGINX_CONF=conf/docker/container-volume/mc-iam-manager/nginx/nginx.conf
sed '/upstream_console/,/^ }/ s/proxy_read_timeout 120s;/proxy_read_timeout 180s;/' \
"$NGINX_CONF" > /tmp/nginx.conf.new
cat /tmp/nginx.conf.new > "$NGINX_CONF" && rm /tmp/nginx.conf.new
docker exec mc-iam-manager-nginx nginx -t && docker exec mc-iam-manager-nginx nginx -s reload

# 3. nginx 가 실제로 쓰는 값 확인
docker exec mc-iam-manager-nginx nginx -T 2>/dev/null | grep proxy_read_timeout
```

> **참고:** `nginx.conf` 는 컨테이너에 단일 파일(`/etc/nginx/nginx.conf`)로 bind mount 됩니다. `sed -i`(및 파일을 새로 만들어 교체하는 방식으로 저장하는 편집기)는 inode 가 바뀐 새 파일을 만들기 때문에, 컨테이너는 옛 내용을 계속 보고 `nginx -s reload` 해도 반영되지 않습니다. 이미 그렇게 수정했다면 reload 대신 `docker restart mc-iam-manager-nginx` 를 실행합니다.

원인 확인: 504 발생 시각의 `docker logs mc-iam-manager-nginx` 에 `upstream timed out ... while reading response header from upstream` 이 있는지 봅니다.

## TLS 인증서 자동갱신 (Mode B)
Expand Down
Loading