부트스트랩 실패

Discourse 설치를 시도했는데 FAILED TO BOOTSTRAP 오류가 발생합니다.
로그는 다음과 같습니다:

ENTER to continue, 'n' to try again, Ctrl+C to exit:
Enabling Let's Encrypt
web.ssl.template.yml enabled
letsencrypt.ssl.template.yml enabled

Configuration file at  updated successfully!

Updates successful. Rebuilding in 5 seconds.
Building app
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
cd /pups && git pull && /pups/bin/pups --stdin
Already up to date.
I, [2020-07-24T18:55:58.464935 #1]  INFO -- : Loading --stdin
I, [2020-07-24T18:55:58.473367 #1]  INFO -- : > locale-gen $LANG && update-locale
I, [2020-07-24T18:55:58.506619 #1]  INFO -- : Generating locales (this might take a while)...
Generation complete.

I, [2020-07-24T18:55:58.506995 #1]  INFO -- : > mkdir -p /shared/postgres_run
I, [2020-07-24T18:55:58.509890 #1]  INFO -- :
I, [2020-07-24T18:55:58.510432 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2020-07-24T18:55:58.512373 #1]  INFO -- :
I, [2020-07-24T18:55:58.512886 #1]  INFO -- : > chmod 775 /shared/postgres_run
I, [2020-07-24T18:55:58.515262 #1]  INFO -- :
I, [2020-07-24T18:55:58.515771 #1]  INFO -- : > rm -fr /var/run/postgresql
I, [2020-07-24T18:55:58.517798 #1]  INFO -- :
I, [2020-07-24T18:55:58.518308 #1]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2020-07-24T18:55:58.520717 #1]  INFO -- :
I, [2020-07-24T18:55:58.521218 #1]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2020/07/24 18:55:58 socat[26] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2020-07-24T18:55:58.532831 #1]  INFO -- :
I, [2020-07-24T18:55:58.533118 #1]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2020-07-24T18:55:58.535580 #1]  INFO -- :
I, [2020-07-24T18:55:58.535885 #1]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2020-07-24T18:55:58.538318 #1]  INFO -- :
I, [2020-07-24T18:55:58.538610 #1]  INFO -- : > mkdir -p /shared/postgres_run/12-main.pg_stat_tmp
I, [2020-07-24T18:55:58.540691 #1]  INFO -- :
I, [2020-07-24T18:55:58.541137 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run/12-main.pg_stat_tmp
I, [2020-07-24T18:55:58.542920 #1]  INFO -- :
I, [2020-07-24T18:55:58.547145 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown:
I, [2020-07-24T18:55:58.551140 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown:
I, [2020-07-24T18:55:58.555034 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown:
I, [2020-07-24T18:55:58.558937 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown:
I, [2020-07-24T18:55:58.559391 #1]  INFO -- : > chown -R root /var/lib/postgresql/12/main
I, [2020-07-24T18:56:05.381806 #1]  INFO -- :
I, [2020-07-24T18:56:05.382562 #1]  INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/12/bin/initdb -D /shared/postgres_data || exit 0
I, [2020-07-24T18:56:05.385503 #1]  INFO -- :
I, [2020-07-24T18:56:05.385920 #1]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2020-07-24T18:56:05.394083 #1]  INFO -- :
I, [2020-07-24T18:56:05.394491 #1]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2020-07-24T18:56:05.396516 #1]  INFO -- :
I, [2020-07-24T18:56:05.396943 #1]  INFO -- : > /root/upgrade_postgres
I, [2020-07-24T18:56:05.403490 #1]  INFO -- :
I, [2020-07-24T18:56:05.403830 #1]  INFO -- : > rm /root/upgrade_postgres
I, [2020-07-24T18:56:05.405807 #1]  INFO -- :
I, [2020-07-24T18:56:05.406414 #1]  INFO -- : Replacing data_directory = '/var/lib/postgresql/12/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/12/main/postgresql.conf
I, [2020-07-24T18:56:05.407666 #1]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/12/main/postgresql.conf
I, [2020-07-24T18:56:05.408137 #1]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/12/main/postgresql.conf
I, [2020-07-24T18:56:05.408917 #1]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/12/main/postgresql.conf
I, [2020-07-24T18:56:05.409490 #1]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/12/main/postgresql.conf
I, [2020-07-24T18:56:05.410066 #1]  INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/12/main/postgresql.conf
I, [2020-07-24T18:56:05.410701 #1]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2020-07-24T18:56:05.414314 #1]  INFO -- :
I, [2020-07-24T18:56:05.414961 #1]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/12/main/postgresql.conf
I, [2020-07-24T18:56:05.415521 #1]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/12/main/postgresql.conf
I, [2020-07-24T18:56:05.416016 #1]  INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/12/main/postgresql.conf
I, [2020-07-24T18:56:05.416731 #1]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/12/main/pg_hba.conf
I, [2020-07-24T18:56:05.417184 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/12/main/pg_hba.conf
I, [2020-07-24T18:56:05.417700 #1]  INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/12/bin/postmaster -D /etc/postgresql/12/main
I, [2020-07-24T18:56:05.418973 #1]  INFO -- : > sleep 5
2020-07-24 18:56:05.434 GMT [49] LOG:  0 8kB is outside the valid range for parameter "shared_buffers" (16 .. 1073741823)
2020-07-24 18:56:05.435 UTC [49] FATAL:  configuration file "/etc/postgresql/12/main/postgresql.conf" contains errors
I, [2020-07-24T18:56:10.424189 #1]  INFO -- :
I, [2020-07-24T18:56:10.424518 #1]  INFO -- : > su postgres -c 'createdb discourse' || true
createdb: error: could not connect to database template1: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I, [2020-07-24T18:56:10.470398 #1]  INFO -- :
I, [2020-07-24T18:56:10.470767 #1]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
psql: error: could not connect to server: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I, [2020-07-24T18:56:10.520451 #1]  INFO -- :
I, [2020-07-24T18:56:10.520909 #1]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
psql: error: could not connect to server: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I, [2020-07-24T18:56:10.569147 #1]  INFO -- :
I, [2020-07-24T18:56:10.569513 #1]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
psql: error: could not connect to server: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I, [2020-07-24T18:56:10.624778 #1]  INFO -- :
I, [2020-07-24T18:56:10.625306 #1]  INFO -- : Terminating async processes


FAILED
--------------------
Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 75 exit 2>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"
88ef1f69c68375f34f7ed80b11cbe2b1fac59a79a226118cb3205f0dc0ea5276
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

주요 오류가 서버에 연결할 수 없다는 것인 것 같지만, 정확히 이해가 되지 않습니다…
su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

도와주실 분 있을까요?
감사합니다

이 서버에 RAM 메모리가 얼마나 있나요?

1GB.

음, 이건 정말 이상하네요.

여기서 db_shared_buffers의 크기를 계산합니다:

이 코드를 따르는데 8kB만 나오게 되는 방식을 이해할 수 없습니다.

app.yml 파일에서 해당 값을 확인해 볼 수 있을까요?

네, app.yml 파일이 어디에 있는지, 아니면 확인하기 위해 어떤 명령을 실행해야 하는지 (cat) 알려 주시겠어요?

/var/discourse/containers/app.yml

nano가 사용하기 더 쉽다는 것을 알게 되었습니다.

감사합니다.

@Falco, @IAmGav, app.yml 파일의 내용은 다음과 같습니다:

## this is the all-in-one, standalone Discourse Docker container template
##
## After making changes to this file, you MUST rebuild
## /var/discourse/launcher rebuild app
##
## BE *VERY* CAREFUL WHEN EDITING!
## YAML FILES ARE SUPER SUPER SENSITIVE TO MISTAKES IN WHITESPACE OR ALIGNMENT!
## visit http://www.yamllint.com/ to validate this file as needed

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
  - "templates/web.ssl.template.yml"
  - "templates/web.letsencrypt.ssl.template.yml"

## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or n                                                                                               ginx,
## see https://meta.discourse.org/t/17247 for details
expose:
  - "80:80"   # http
  - "443:443" # https

params:
  db_default_text_search_config: "pg_catalog.english"

  ## Set db_shared_buffers to a max of 25% of the total memory.
  ## will be set automatically by bootstrap based on detected RAM, or you can ov                                                                                               erride
  db_shared_buffers: "0MB"

  ## can improve sorting performance, but adds memory usage per-connection
  #db_work_mem: "40MB"

  ## Which Git revision should this container use? (default: tests-passed)
  #version: tests-passed

env:
  LANG: en_US.UTF-8
  # DISCOURSE_DEFAULT_LOCALE: en

  ## How many concurrent web requests are supported? Depends on memory and CPU c                                                                                               ores.
  ## will be set automatically by bootstrap based on detected CPUs, or you can o                                                                                               verride
  UNICORN_WORKERS: 0

  ## TODO: The domain name this Discourse instance will respond to
  ## Required. Discourse will not work with a bare IP number.
  DISCOURSE_HOSTNAME: community.kodularlessons.net

  ## Uncomment if you want the container to be started with the same
  ## hostname (-h option) as specified above (default "$hostname-$config")
  #DOCKER_USE_HOSTNAME: true

  ## TODO: List of comma delimited emails that will be made admin and developer
  ## on initial signup example 'user1@example.com,user2@example.com'
  DISCOURSE_DEVELOPER_EMAILS: '******s@gmail.com'

  ## TODO: The SMTP mail server used to validate new accounts and send notificat                                                                                               ions
  # SMTP ADDRESS, username, and password are required
  # WARNING the char '#' in SMTP password can cause problems!
  DISCOURSE_SMTP_ADDRESS: mboxhosting.com
  DISCOURSE_SMTP_PORT: 993
  DISCOURSE_SMTP_USER_NAME: no-reply@kodularlessons.net
  DISCOURSE_SMTP_PASSWORD: "*****************"
  #DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)

  ## If you added the Lets Encrypt template, uncomment below to get a free SSL c                                                                                               ertificate
  LETSENCRYPT_ACCOUNT_EMAIL: me@example.com

  ## The http or https CDN address for this Discourse instance (configured to pu                                                                                               ll)
  ## see https://meta.discourse.org/t/14857 for details
  #DISCOURSE_CDN_URL: https://discourse-cdn.example.com

## The Docker container is stateless; all data is stored in /shared
volumes:
  - volume:
      host: /var/discourse/shared/standalone
      guest: /shared
  - volume:
      host: /var/discourse/shared/standalone/log/var-log
      guest: /var/log

## Plugins go here
## see https://meta.discourse.org/t/19157 for details
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git

## Any custom commands to run after building
run:
  - exec: echo "Beginning of custom commands"
  ## If you want to set the 'From' email address for your first registration, un                                                                                               comment and change:
  ## After getting the first signup email, re-comment the line. It only needs to                                                                                                run once.
  #- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.                                                                                               org'"
  - exec: echo "End of custom commands"

참고: 개인 정보는 수동으로 가렸습니다.

이 값은 0이어서는 안 됩니다.

다음과 같이 변경하세요.

db_shared_buffers: “128MB”

감사합니다. 수정하는 데 잠시만 기다려 주세요.

제 게시글이 스팸 필터에 걸려서 사라졌어요. 어쨌든 새 로그를 pastebin에 붙여넣을게요.

yml 파일에 변경 사항을 적용한 후 이 명령어를 실행하세요.

./launcher rebuild app

감사합니다. 부트스트랩 실패 오류도 반환됩니다. 로그를 확인해 주세요:

shared_buffers와 PostgreSQL에서 몇 가지 문제가 발생하고 있습니다.

해당 인스턴스에서 다른 작업이 실행되고 있나요?

vm에서 다른 것은 실행되고 있지 않은 것 같습니다… (제 생각엔요)
Azure에서 구매했습니다