베타7 업데이트/재구축 시 발생하는 문제

안녕하세요,

현재 Beta 2에서 Beta 7 최신 버전으로 DEV 인스턴스를 업데이트하려고 시도하고 있습니다.
기본 tests-passed 브랜치에서 실행되고 있습니다.

문제는 컨테이너를 다시 빌드할 때 github와의 연결 문제(추측)로 인해 실패한다는 것입니다:

I, [2025-07-28T12:35:19.480463 #1]  INFO -- : Replacing # postgres with if [ -f /root/install_postgres ]; then
  /root/install_postgres
  rm /root/install_postgres
fi
sv start postgres || exit 1
 in /etc/service/unicorn/run
I, [2025-07-28T12:35:19.480838 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git clean -f
I, [2025-07-28T12:35:19.511065 #1]  INFO -- : 
I, [2025-07-28T12:35:19.511112 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse bash -c '
  set -o errexit
  if [ $(git rev-parse --is-shallow-repository) == "true" ]; then
      git remote set-branches --add origin main
      git remote set-branches origin tests-passed
      git fetch --depth 1 origin tests-passed
  else
      git fetch --tags --prune-tags --prune --force origin
  fi
'
error: RPC failed; curl 56 Recv failure: Connection reset by peer
error: 44 bytes of body are still expected
fatal: expected flush after ref listing
I, [2025-07-28T12:37:22.158398 #1]  INFO -- : 
I, [2025-07-28T12:37:22.158628 #1]  INFO -- : Terminating async processes

호스트의 일반적인 연결은 그 외에는 정상적인데, ./launcher rebuild app 실행 전에 Docker 빌드 캐시를 지우면 실제로 최신 버전을 가져오고 모든 컨테이너 이미지 등을 가져오는 것을 볼 수 있지만, 이후에도 여전히 실패합니다:

긴 표준 출력(stdout) 결과
I, [2025-07-28T12:19:42.269421 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse bash -c '
  set -o errexit
  if [ $(git rev-parse --is-shallow-repository) == "true" ]; then
      git remote set-branches --add origin main
      git remote set-branches origin tests-passed
      git fetch --depth 1 origin tests-passed
  else
      git fetch --tags --prune-tags --prune --force origin
  fi
'
From https://github.com/discourse/discourse
 - [deleted]             (none)     -> origin/dependabot/bundler/nokogiri-1.18.9
 - [deleted]             (none)     -> origin/dependabot/bundler/playwright-ruby-client-1.54.0
 - [deleted]             (none)     -> origin/dependabot/bundler/propshaft-1.2.0
 - [deleted]             (none)     -> origin/dependabot/npm_and_yarn/babel-plugin-ember-template-compilation-3.0.0
 - [deleted]             (none)     -> origin/dependabot/npm_and_yarn/glob-11.0.3
 - [deleted]             (none)     -> origin/dependabot/npm_and_yarn/playwright-1.54.1
 - [deleted]             (none)     -> origin/dev/decorate-quote-collapsed-content-properly
 - [deleted]             (none)     -> origin/dev/extract-invite-guardian
 - [deleted]             (none)     -> origin/dev/mt/discourse-category-custom-fields
 - [deleted]             (none)     -> origin/dev/mt/discourse-group-users
 - [deleted]             (none)     -> origin/dev/mt/discourse-groups
 - [deleted]             (none)     -> origin/dev/mt/discourse-muted-users
 - [deleted]             (none)     -> origin/dev/mt/requires-set
 - [deleted]             (none)     -> origin/dev/no-more-widgets
 - [deleted]             (none)     -> origin/dev/use-themeable-site-settings-horizon
 - [deleted]             (none)     -> origin/enable-new-topic-btn-on-restricted-category
 - [deleted]             (none)     -> origin/feature-admin-filter-controls
 - [deleted]             (none)     -> origin/feature/enable-rich-editor-for-all
 - [deleted]             (none)     -> origin/filtermagic
 - [deleted]             (none)     -> origin/fix/mt/log-failed-downloads
 - [deleted]             (none)     -> origin/fix/translated-badge-title
 - [deleted]             (none)     -> origin/layout-container-dev
 - [deleted]             (none)     -> origin/loic-upgrade-rails-8.0
 - [deleted]             (none)     -> origin/media-convert-job
 - [deleted]             (none)     -> origin/merge-sso-destination-url-cookie-with-destination-url-cookie
 - [deleted]             (none)     -> origin/mt/set_store
 - [deleted]             (none)     -> origin/pento/dev-flag-reason-tests
 - [deleted]             (none)     -> origin/playwright-1.53
 - [deleted]             (none)     -> origin/refactor-color-palette
 - [deleted]             (none)     -> origin/remove-suspended-and-deleted-users-from-leaderboard
 - [deleted]             (none)     -> origin/rollup-theme-experiment
 - [deleted]             (none)     -> origin/ux-editor-toolbar-mobile-scroll
 - [deleted]             (none)     -> origin/ux/sidebar-show-messages-count
   43ddd4ef3..ea5b5b6c0  main                    -> origin/main
 * [new branch]          0-a-depr-html-safe      -> origin/0-a-depr-html-safe
 * [new branch]          0-a-tabs                -> origin/0-a-tabs
 * [new branch]          add-composer-mention-warnings -> origin/add-composer-mention-warnings
   187f13d67..8d4a86f25  add-plugin-outlet-wrapper-to-login-template -> origin/add-plugin-outlet-wrapper-to-login-template
 * [new branch]          ai_default_llm          -> origin/ai_default_llm
 * [new branch]          content-border-color    -> origin/content-border-color
 + 51077ac74...088f149a6 dependabot/bundler/excon-1.2.8 -> origin/dependabot/bundler/excon-1.2.8  (forced update)
 + 36699b311...e3f5c2d0d dependabot/bundler/jwt-3.1.2 -> origin/dependabot/bundler/jwt-3.1.2  (forced update)
 * [new branch]          dependabot/bundler/octokit-10.0.0 -> origin/dependabot/bundler/octokit-10.0.0
 * [new branch]          dependabot/bundler/stripe-15.3.0 -> origin/dependabot/bundler/stripe-15.3.0
 + def825f3f...b5a5f3924 dependabot/bundler/web-push-3.0.2 -> origin/dependabot/bundler/web-push-3.0.2  (forced update)
 * [new branch]          dependabot/bundler/zendesk_api-3.1.1 -> origin/dependabot/bundler/zendesk_api-3.1.1
 + f4d832ec8...5aa0145f3 dependabot/npm_and_yarn/embroider-0ad991d471 -> origin/dependabot/npm_and_yarn/embroider-0ad991d471  (forced update)
 * [new branch]          dependabot/npm_and_yarn/fortawesome/fontawesome-free-7.0.0 -> origin/dependabot/npm_and_yarn/fortawesome/fontawesome-free-7.0.0
 * [new branch]          dependabot/npm_and_yarn/jspreadsheet-ce-5.0.3 -> origin/dependabot/npm_and_yarn/jspreadsheet-ce-5.0.3
 * [new branch]          dependabot/npm_and_yarn/lint-fda1ac657e -> origin/dependabot/npm_and_yarn/lint-fda1ac657e
 + e46dc3798...d3420e3eb dependabot/npm_and_yarn/prosemirror-f8434604ae -> origin/dependabot/npm_and_yarn/prosemirror-f8434604ae  (forced update)
 * [new branch]          dependabot/npm_and_yarn/puppeteer-core-24.15.0 -> origin/dependabot/npm_and_yarn/puppeteer-core-24.15.0
 + 4bcbc028d...03b9759db dev-floatkit-autocomplete-d-editor -> origin/dev-floatkit-autocomplete-d-editor  (forced update)
 + ea5bba76a...03b9759db dev-floatkit-autocomplete-d-editor-qa -> origin/dev-floatkit-autocomplete-d-editor-qa  (forced update)
 * [new branch]          dev/decorate-cooked-state -> origin/dev/decorate-cooked-state
   56e6c9ae1..11c480f88  dev/no-more-widgets-smoke-test -> origin/dev/no-more-widgets-smoke-test
 * [new branch]          dev/post-keep-detail-state -> origin/dev/post-keep-detail-state
 * [new branch]          dev/prevent-rerenderings -> origin/dev/prevent-rerenderings
 * [new branch]          dev/remove-redundant-staff-check-6 -> origin/dev/remove-redundant-staff-check-6
   1f3bbee91..00dfb95b1  dev/try-fix-flakys-tss  -> origin/dev/try-fix-flakys-tss
 * [new branch]          dual-mode-palettes-wip  -> origin/dual-mode-palettes-wip
 * [new branch]          feature/color-mode-preference -> origin/feature/color-mode-preference
 * [new branch]          feature/type-upload-in-type-objects -> origin/feature/type-upload-in-type-objects
 * [new branch]          feature/use-current-user-tz-instead-of-guess-local-dates -> origin/feature/use-current-user-tz-instead-of-guess-local-dates
 * [new branch]          filter-tips-dmenu-martinwip -> origin/filter-tips-dmenu-martinwip
 * [new branch]          filter-updates          -> origin/filter-updates
 * [new branch]          fix-color-palette-dark  -> origin/fix-color-palette-dark
 * [new branch]          fix/missing-user-custom-preferences-outlet-class-in-connector -> origin/fix/missing-user-custom-preferences-outlet-class-in-connector
 * [new branch]          improve_no_database_error_patch -> origin/improve_no_database_error_patch
 * [new branch]          improve_pg_adapter_new_client_error -> origin/improve_pg_adapter_new_client_error
 * [new branch]          loic-pitchfork          -> origin/loic-pitchfork
 * [new branch]          messages-dropdown-d-menu -> origin/messages-dropdown-d-menu
 * [new branch]          my-pref-lang            -> origin/my-pref-lang
 * [new branch]          notification-panel-refactor -> origin/notification-panel-refactor
 * [new branch]          pinned-dmenu            -> origin/pinned-dmenu
 * [new branch]          rollup-plugin-experiment -> origin/rollup-plugin-experiment
 * [new branch]          rollup-theme-experiment-cross-theme-import -> origin/rollup-theme-experiment-cross-theme-import
 * [new branch]          samsaffron/codex/convert-filter-tips-to-use-dmenu -> origin/samsaffron/codex/convert-filter-tips-to-use-dmenu
   8cb90072e..710d9fd41  sandbox/design-1        -> origin/sandbox/design-1
   1f97cf422..aa2fb29fa  sandbox/dev-xp-1        -> origin/sandbox/dev-xp-1
   817a743cb..3428acddc  sandbox/member-xp-1     -> origin/sandbox/member-xp-1
 + d182efe6f...a0aba00c7 sandbox/member-xp-2     -> origin/sandbox/member-xp-2  (forced update)
 * [new branch]          source-identify-modulepreload -> origin/source-identify-modulepreload
 + 9aa6daa1f...c56258634 split-login-admin-settings -> origin/split-login-admin-settings  (forced update)
   a83bd0f67..41e1152f6  stable                  -> origin/stable
 + 293de3a75...e31549885 temp-user-creation-debug-logging -> origin/temp-user-creation-debug-logging  (forced update)
   43ddd4ef3..ea5b5b6c0  tests-passed            -> origin/tests-passed
 * [new branch]          theme-upload-cleanup    -> origin/theme-upload-cleanup
 * [new branch]          translations-from-crowdin-main -> origin/translations-from-crowdin-main
 + 9f8fd9214...c3562ed3a translations-from-crowdin-stable -> origin/translations-from-crowdin-stable  (forced update)
 + 4ffab7134...e211b4a55 unicode-mentions-in-composer-rte -> origin/unicode-mentions-in-composer-rte  (forced update)
 * [new branch]          ux-footer-button-squish -> origin/ux-footer-button-squish
 * [new branch]          ux-horizon-discotoc     -> origin/ux-horizon-discotoc
 * [new branch]          ux-unify-appearance-filters -> origin/ux-unify-appearance-filters
   b0c2d83ec..045aefecb  ux/horizon-mobile-composer -> origin/ux/horizon-mobile-composer
 * [new branch]          ux/sidebar-my-messages-enhancements -> origin/ux/sidebar-my-messages-enhancements
 + 28d11bbd0...6f7d9e816 variable-additions-2    -> origin/variable-additions-2  (forced update)
   39d2564ba..57dcfda6a  vite-squashed-rebased   -> origin/vite-squashed-rebased
I, [2025-07-28T12:19:43.174876 #1]  INFO -- : 
I, [2025-07-28T12:19:43.174943 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse bash -c '
  set -o errexit
  if [[ $(git symbolic-ref --short HEAD) == tests-passed ]] ; then
      git pull
  else
      git -c advice.detachedHead=false checkout tests-passed
  fi
'
error: RPC failed; curl 56 Recv failure: Connection reset by peer
error: 5470 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
fatal: could not fetch bff89c0762e874ec88d553d89901dbda4fa89f20 from promisor remote
I, [2025-07-28T12:23:50.121438 #1]  INFO -- : 

Github에서 가져오기를 시도하는 동안 호스트의 htop에서 아무런 활동도 볼 수 없습니다.

호스트 세부 정보: Debian 11을 실행 중인 Proxmox VM, 4코어, 12GB 메모리. 재빌드 중에도 여유로운 메모리가 있으므로 메모리 문제일 수는 없습니다.
서버는 독일에서 호스팅되므로 github 접근을 차단하는 요소가 있을 리 없습니다.

fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

이것은 타임아웃을 나타내며, 예를 들어 연결이 너무 느릴 때 발생하는 현상임을 발견했습니다. 연결 속도를 확인해보니 업로드/다운로드 모두 약 890Mbit/s입니다. 스토리지는 모두 NVMe이므로 이 단계에서 타임아웃이 발생하는 이유를 모르겠습니다.

모든 Docker 빌드 캐시를 지우고, 호스트 시스템을 최신 패키지로 업데이트하고, 재시작하고, 고장 난 호스트를 문제 원인으로 배제하기 위해 클러스터의 다른 노드로 이동해 보기도 했습니다.

거의 잊을 뻔했는데: 관리자 패널로 이동하면 최신 버전이 아니라는 정보를 받게 되지만, Click here to update를 클릭하면 오류가 발생합니다:

Server-Error
while loading /admin/docker/repos
Errorcode: 502 error

거기서도 타임아웃 오류를 볼 수 있습니다:

activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb:128:in `block in wait_poll' 
<internal:kernel>:187:in `loop'
activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb:117:in `wait_poll' 
activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb:78:in `internal_poll' 
activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb:204:in `internal_poll' 
activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb:73:in `block in poll' 
/usr/local/lib/ruby/3.3.0/monitor.rb:201:in `synchronize'
/usr/local/lib/ruby/3.3.0/monitor.rb:201:in `mon_synchronize'
activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb:82:in `synchronize' 
activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb:73:in `poll' 
activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:868:in `acquire_connection' 
activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:564:in `checkout' 
activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:421:in `with_connection' 
activerecord-7.2.2.1/lib/active_record/connection_handling.rb:296:in `with_connection' 
activerecord-7.2.2.1/lib/active_record/transactions.rb:410:in `with_transaction_returning_status' 
activerecord-7.2.2.1/lib/active_record/transactions.rb:366:in `save!' 
activerecord-7.2.2.1/lib/active_record/suppressor.rb:56:in `save!' 
activerecord-7.2.2.1/lib/active_record/persistence.rb:55:in `create!' 
mini_scheduler-0.18.0/lib/mini_scheduler/manager.rb:128:in `process_queue' 
mini_scheduler-0.18.0/lib/mini_scheduler/manager.rb:77:in `worker_loop' 
mini_scheduler-0.18.0/lib/mini_scheduler/manager.rb:63:in `block (2 levels) in ensure_worker_threads' 

그리고

excon-1.2.5/lib/excon/socket.rb:386:in `select_with_timeout' 
excon-1.2.5/lib/excon/socket.rb:258:in `rescue in read_nonblock' 
excon-1.2.5/lib/excon/socket.rb:228:in `read_nonblock' 
excon-1.2.5/lib/excon/socket.rb:89:in `block in readline' 
<internal:kernel>:187:in `loop'
excon-1.2.5/lib/excon/socket.rb:78:in `readline' 
excon-1.2.5/lib/excon/response.rb:73:in `block in parse' 
<internal:kernel>:187:in `loop'
excon-1.2.5/lib/excon/response.rb:72:in `parse' 
excon-1.2.5/lib/excon/middlewares/response_parser.rb:7:in `response_call' 
excon-1.2.5/lib/excon/connection.rb:472:in `response' 
excon-1.2.5/lib/excon/connection.rb:297:in `request' 
/var/www/discourse/lib/discourse_updates.rb:136:in `new_features_payload' 
/var/www/discourse/app/jobs/scheduled/check_new_features.rb:24:in `execute' 
/var/www/discourse/app/jobs/base.rb:316:in `block (2 levels) in perform' 
rails_multisite-6.1.0/lib/rails_multisite/connection_management/null_instance.rb:49:in `with_connection'
rails_multisite-6.1.0/lib/rails_multisite/connection_management.rb:21:in `with_connection'
/var/www/discourse/app/jobs/base.rb:303:in `block in perform' 
/var/www/discourse/app/jobs/base.rb:299:in `each' 
/var/www/discourse/app/jobs/base.rb:299:in `perform' 
/var/www/discourse/app/jobs/base.rb:379:in `perform' 
mini_scheduler-0.18.0/lib/mini_scheduler/manager.rb:137:in `process_queue' 
mini_scheduler-0.18.0/lib/mini_scheduler/manager.rb:77:in `worker_loop' 
mini_scheduler-0.18.0/lib/mini_scheduler/manager.rb:63:in `block (2 levels) in ensure_worker_threads' 

정말 아이디어가 없습니다. 시스템 리소스를 늘려 보았지만, 코어나 메모리를 추가해도 아무런 변화가 없고, 오류가 지속됩니다.

git http.postBuffer를 늘려 보았는데, 이제 실패하기 전에 조금 더 멈춰 있습니다.

이런 종류의 오류에 대한 다른 스레드나 게시물을 찾지 못했으므로 누군가 아이디어를 가지고 있기를 바랍니다.

감사합니다!

app.yml 파일에 많은 플러그인이 나열되어 있나요? 모두 주석 처리한 후 정상적으로 작동하는지 확인해 보는 것이 좋을 수 있습니다. 만약 정상 작동한다면, 다시 하나씩 주석을 해제해 보세요.

수정: yml 파일의 안전한 사본을 먼저 확보하세요! 그리고 항상 업데이트를 시작하기 전에 백업을 만들고 다운로드해 두세요.

우리는 많은 플러그인을 사용하지 않습니다. 체인지로그에 따라 코어에 통합된 플러그인들은 이미 제거했습니다.

현재 설정된 플러그인은 다음뿐입니다:

          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-translator.git
          - git clone https://github.com/discourse/onebox.git

이들을 주석 처리했는데도 여전히 같은 지점에서 멈춰 있습니다.

이것은 DEV 인스턴스일 뿐이라 데이터에 대한 걱정은 없습니다. 만약 문제가 발생하면 프로덕션 서버의 덤프를 가져다 넣어 다시 실행할 수 있습니다. 하지만 우리의 프로덕션 시스템도 같은 버전을 사용하므로, 그곳에서도 동일한 문제를 겪게 될 것 같습니다.

프로바이더 문제이거나 커널 문제인 것 같습니다. 하지만 개발용 설치에 익숙하지 않아서요.

이 서버는 독일의 Hetzner에 호스팅되어 있으며, 커널도 특별할 것 없이 기본적으로 Debian 11과 Kernel 5.10.237-1을 사용하고 있습니다.

DEV-Instance라는 명칭은 업데이트/업그레이드와 같은 사항을 실제 운영 환경에 적용하기 전에 미리 테스트하여 라이브 버전을 깨뜨리지 않는지 확인하기 위한 테스트 인스턴스라는 의미일 뿐입니다. 즉, 이는 실전 시스템의 복제본으로, 새로운 시도들을 테스트하기 위해 사용되는 것입니다.

아, 그렇군요. 일반적인 컨테이너를 기반으로 하고 있고 연결 문제가 발생한다면, 이는 Discourse의 문제가 아닐 것 같습니다.

사용 중인 커널이 매우 오래되었습니다. 저는 Ubuntu 24.04에 커널 6.8.0-53을 사용 중입니다.

커널은 2025년 5월에 빌드되었으며, 여전히 완전히 지원되는 Debian 11의 현재 커널입니다. 2개월은 정말로 ‘매우 오래된’ 것이 아닙니다.

하지만 이 가능성을 배제하기 위해 시스템을 Debian 12로 업그레이드하고 최신 메인라인 커널 6.10을 설치했습니다(다시 한번 말하지만, 오래된 것이 아니라 개발/나이트리/프리뷰 빌드를 실행하지 않은 최신 Debian 12 커널입니다). 그런데 문제는 정확히 동일합니다.

호스트의 모든 기능이 정상 작동하며, GitHub나 기타 사이트로의 연결 문제도 없습니다. 심지어 전체 시스템 업그레이드도 5분 만에 아무 문제 없이 완료되었습니다. 이 시스템에서 작동하지 않는 유일한 것은 discourse이며, 이 업그레이드 전까지는 수년 동안 정상적으로 작동해 왔습니다.

관리자 패널을 통한 업데이트 시 502 오류만 표시되는 것도 이상합니다. 이는 discourse 내부의 문제를 시사하는데, 거의 수정되지 않은 표준 이미지를 실행하고 있기 때문입니다. 제3자 플러그인은 설치되어 있지 않으며, 커스텀 테마를 제외하고는 어떠한 수정 사항도 없습니다.

정말 이상하네요. 커널을 확인해 주셔서 감사합니다. 커널 버전 호환성 문제가 있었던 적은 있지만, 이 경우는 그런 문제가 아닌 것 같습니다.

컨테이너 내에서 커맨드 프롬프트를 열어 wget 또는 curl과 같은 네트워크 작업을 시도해 볼 수 있지만, 그것이 무엇을 증명할지는 잘 모르겠습니다.

현재 다른 아이디어가 없어서 죄송합니다.

오류가 변경이 필요할 수 있는 Git 설정을 가리키고 있다는 것을 발견했습니다. 하지만 재빌드되는 동안 모든 것이 컨테이너 내에서 발생하기 때문에 어디서 변경해야 하는지 확신이 서지 않습니다. 호스트 시스템에서 직접 변경해 봤지만, 실제로는 별다른 효과가 없었습니다.

따라서 git config http.postBuffer 524288000와 같은 변경 사항은 호스트 시스템에서 적용하더라도 재빌드에 영향을 주지 않을 가능성이 높습니다. 압축 설정이나 Git 메모리 제한 값도 마찬가지입니다.

비슷한 호스트에서 새로운 설정을 구성해 볼 수 있는지 확인하겠습니다. 만약 실패한다면, 동일한 버전에서 동일한 문제가 발생하는지 확인해 보겠습니다.

아마도 app.yml 파일에 몇 가지 명령 사양을 추가할 수 있을 것 같습니다 - 다음을 참고하세요.

그 방법을 시도해 보았지만 아쉽게도 변화가 없습니다. 실제 컨테이너를 가져오거나 빌드하기 전에 해당 명령이 실행되는지 확실하지 않습니다.

(재)빌드를 시작하는 바로 그 시점에 실행되어야 합니다. /var/www/discourse 에서 사이트를 가져오거나 빌드하는 후크는 그 작업이 완료된 후에 실행될 것으로 예상되는데, 제 경우 그 작업이 끝나지 않습니다.

이제 정말로 아이디어가 고갈되었습니다.

수정: 실행 중인 컨테이너 안에서 문제를 진단해 보았는데, 여기서도 문제가 있는 것 같습니다. discourse docker 저장소를 클론하려고 하면 여기에서도 실패합니다:

root@community-app:/tmp# git clone https://github.com/discourse/discourse_docker.git 
Cloning into 'discourse_docker'...
remote: Enumerating objects: 7235, done.
remote: Counting objects: 100% (234/234), done.
remote: Compressing objects: 100% (104/104), done.
error: RPC failed; curl 56 Recv failure: Connection reset by peer
error: 1355 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

그러니까 docker 내부에 뭔가 잘못된 것이 있거나… 모르겠습니다.
호스트 시스템에서는 동일한 저장소를 문제없이 클론할 수 있는데, 컨테이너 안에서는 안 됩니다. 재빌드가 실패하는 지점이 바로 이 부분입니다.

docker 네트워크를 좀 더 진단해 보겠습니다. 거기서 뭔가 찾을 수 있을지도 모르니까요.

아, 드디어 원인을 찾았어요. 문제는 실제로 discourse가 아니라 docker와 호스트 네트워크 쪽이었네요.

Hetzner에서 퍼블릭 서브넷이 있는 vSwitch를 사용하려면 MTU를 1500이 아닌 1400으로 설정해야 합니다. 언젠가 이 설정을 변경한 적은 있었는데, 어느 시점에 원래대로 되돌아가버린 것 같습니다. 그래서 다시 설정을 바꾼 뒤 올바른 MTU로 Docker를 재시작했습니다.

이제 discourse 내의 업데이트 사이트도 정상적으로 작동합니다.

그동안 다른 모든 것은 정상적으로 작동하고 있었는데, 이런 식으로 문제가 생기는 게 참 웃기네요.