# Discourse 재구축 과정이 PostgreSQL 초기화 단계에서 "trust" 인증 경고와 함께 멈춤

**URL:** https://meta.discourse.org/t/discourse-rebuild-process-hangs-at-postgresql-initialization-with-trust-authentication-warning/354578
**Category:** Support
**Tags:** install
**Created:** [2월 26, 2025, 9:16오전 UTC](https://meta.discourse.org/t/discourse-rebuild-process-hangs-at-postgresql-initialization-with-trust-authentication-warning/354578 "2025-02-26T09:16:35Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![J\_J1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j_j1/32/478367_2.png) [@J\_J1](https://meta.discourse.org/u/J_J1)
#### Post date: [2월 26, 2025, 9:16오전 UTC](https://meta.discourse.org/t/discourse-rebuild-process-hangs-at-postgresql-initialization-with-trust-authentication-warning/354578/1 "2025-02-26T09:16:36Z")

</div>

안녕하세요,

`./launcher rebuild app` 명령을 사용하여 Discourse 애플리케이션을 재구성하는 중에 문제가 발생하고 있습니다. 이 과정은 PostgreSQL 초기화 단계에서 멈추며, 다음과 같은 경고가 표시됩니다:

```plaintext
root@lavm-hypge0pc5w:/var/discourse# ./launcher rebuild app
x86_64 arch detected.

WARNING: We are about to start downloading the Discourse base image
This process may take anywhere between a few minutes to an hour, depending on your network speed

Please be patient

2.0.20250129-0720: Pulling from discourse/base
af302e5c37e9: Pull complete 
ed49ab5c933d: Pull complete 
7cb9e730d898: Pull complete 
7c28a6b187b2: Pull complete 
23222af7238f: Pull complete 
59b87d9ed5c1: Pull complete 
90d60b432298: Pull complete 
d3b3135aa82b: Pull complete 
94e7b594395d: Pull complete 
cf15e2c89d00: Pull complete 
2c0cccf9ec27: Pull complete 
5d8ea2a8d564: Pull complete 
020f04b42275: Pull complete 
06e22604f387: Pull complete 
8b0ecc579aad: Pull complete 
4d577f7424c0: Pull complete 
37ef4781925f: Pull complete 
30d67d1af761: Pull complete 
43eaf8c26af4: Pull complete 
02f4cc50eabd: Pull complete 
93896ee36e56: Pull complete 
fadd5d615e0e: Pull complete 
85f9459cb30e: Pull complete 
eaddca2afacb: Pull complete 
f54443d29a2d: Pull complete 
ed6f0f133683: Pull complete 
3d1894dc563f: Pull complete 
51ca3f63c909: Pull complete 
b87374db2274: Pull complete 
Digest: sha256:01b8516e5504c0e9bc3707773015ff4407be03a89154194ff3b5b8699291bc26
Status: Downloaded newer image for discourse/base:2.0.20250129-0720
docker.io/discourse/base:2.0.20250129-0720
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
2.0.20250129-0720: Pulling from discourse/base
Digest: sha256:01b8516e5504c0e9bc3707773015ff4407be03a89154194ff3b5b8699291bc26
Status: Image is up to date for discourse/base:2.0.20250129-0720
docker.io/discourse/base:2.0.20250129-0720
/usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2025-02-26T09:07:48.133366 #1] INFO -- : Reading from stdin
I, [2025-02-26T09:07:48.143108 #1] INFO -- : File > /etc/service/postgres/run chmod: +x chown: 
I, [2025-02-26T09:07:48.146963 #1] INFO -- : File > /etc/service/postgres/log/run chmod: +x chown: 
I, [2025-02-26T09:07:48.150639 #1] INFO -- : File > /etc/runit/3.d/99-postgres chmod: +x chown: 
I, [2025-02-26T09:07:48.154201 #1] INFO -- : File > /root/install_postgres chmod: +x chown: 
I, [2025-02-26T09:07:48.157700 #1] INFO -- : File > /root/upgrade_postgres chmod: +x chown: 
I, [2025-02-26T09:07:48.157920 #1] INFO -- : Replacing data_directory = '/var/lib/postgresql/15/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/15/main/postgresql.conf
I, [2025-02-26T09:07:48.158469 #1] INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/15/main/postgresql.conf
I, [2025-02-26T09:07:48.166991 #1] INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/15/main/postgresql.conf
I, [2025-02-26T09:07:48.168431 #1] INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/15/main/postgresql.conf
I, [2025-02-26T09:07:48.170165 #1] INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/15/main/postgresql.conf
I, [2025-02-26T09:07:48.170928 #1] INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/15/main/postgresql.conf
I, [2025-02-26T09:07:48.174744 #1] INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/15/main/postgresql.conf
I, [2025-02-26T09:07:48.175249 #1] INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/15/main/postgresql.conf
I, [2025-02-26T09:07:48.176197 #1] INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/15/main/postgresql.conf
I, [2025-02-26T09:07:48.177073 #1] INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres peer in /etc/postgresql/15/main/pg_hba.conf
I, [2025-02-26T09:07:48.177315 #1] INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/15/main/pg_hba.conf
I, [2025-02-26T09:07:48.178064 #1] INFO -- : Replacing (?-mix:^host.*all.*all.*::1\/128.*$) with host all all ::/0 md5 in /etc/postgresql/15/main/pg_hba.conf
I, [2025-02-26T09:07:48.178467 #1] INFO -- : > if [-f /root/install_postgres]; then
  /root/install_postgres && rm -f /root/install_postgres
elif [-e /shared/postgres_run/.s.PGSQL.5432]; then
  socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
fi

cat: /shared/postgres_data/PG_VERSION: No such file or directory
initdb: warning: enabling "trust" authentication for local connections
initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.

```

이 지점에서 프로세스가 1시간 이상 멈춰 있으며, CPU 사용량은 매우 낮습니다. 제 서버 구성은 8코어 CPU, 32GB RAM, 100GB 스토리지입니다.

Discourse Meta 포럼에서 PostgreSQL 업데이트 실패와 유사한 문제를 검토해 보았지만, 문제는 여전히 지속되고 있습니다.

이 문제를 해결하는 방법에 대한 조언을 주실 수 있을까요?

감사합니다.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2월 26, 2025, 2:36오후 UTC](https://meta.discourse.org/t/discourse-rebuild-process-hangs-at-postgresql-initialization-with-trust-authentication-warning/354578/2 "2025-02-26T14:36:28Z")

</div>

> [@J\_J1](#):
>
> `cat: /shared/postgres_data/PG_VERSION: No such file or directory`

이것은 문제입니다.

최근 백업이 있다면, 클린 설치를 한 후 백업을 복원하는 것이 좋습니다.

하지만 [PostgreSQL 15 업데이트](https://meta.discourse.org/t/postgresql-15-update/349515)를 확인하고 postgres 백업을 postgres\_data로 다시 옮기는 방법에 대해 살펴보세요.

---

<div class="post-metadata">

### Author: ![mwaniki](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mwaniki/32/313097_2.png) [@mwaniki](https://meta.discourse.org/u/mwaniki)
#### Post date: [2월 26, 2025, 2:48오후 UTC](https://meta.discourse.org/t/discourse-rebuild-process-hangs-at-postgresql-initialization-with-trust-authentication-warning/354578/3 "2025-02-26T14:48:10Z")

</div>

> [@pfaffman](#):
>
> > [@J\_J1](#):
> >
> > `cat: /shared/postgres_data/PG_VERSION: No such file or directory`
> 
> 이것은 문제입니다.
> 
> 최근 백업이 있다면, 깨끗한 설치를 수행한 후 백업을 복원하겠습니다.

동의합니다.

최근 백업에서 기존 데이터베이스를 복원한 후에도 `initdb` 이후에 재빌드가 여전히 멈추는 것 같다면, Discourse 설치를 [중국 본토](https://meta.discourse.org/t/selfhost-discourse-in-mainland-china-under-the-gfw/347038)에서 호스팅하고 있는 것으로 추정됩니다. 그렇다면 이 토픽을 참조해 주세요.

> [@중국에서 PostgreSQL 업데이트 실패](https://meta.discourse.org/t/postgresql-update-fails-from-china/350869/19):
>
> I got the upgrade PostgreSQL15 Templates need to be used in sequence postgres.13.template.yml postgres.15.template.yml postgres.template.yml postgres.13.template.yml、postgres.15.template.yml file China network acceleration configuration run: - exec: cat /etc/os-release && psql --version - exec: | if [-f /etc/apt/sources.list]; then sudo sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list else echo "deb http://mirrors.ustc.edu.cn/debian bo…

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [3월 28, 2025, 2:48오후 UTC](https://meta.discourse.org/t/discourse-rebuild-process-hangs-at-postgresql-initialization-with-trust-authentication-warning/354578/4 "2025-03-28T14:48:30Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
