大家好,我使用的是位于香港的服务器,我测试过我的服务器可以访问 GitHub
root@cvm-3k8ngdw25i225:/var/discourse# wget https://github.com/discourse/discourse.git/
--2023-06-07 02:30:54-- https://github.com/discourse/discourse.git/
正在解析主机 github.com (github.com)... 20.205.243.166
正在连接 github.com (github.com)|20.205.243.166|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 301 Moved Permanently
位置:https://github.com/discourse/discourse/ [正在跟随]
--2023-06-07 02:30:55-- https://github.com/discourse/discourse/
正在复用 github.com:443 的现有连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:未指定 [text/html]
正在保存至: ‘index.html’
index.html [ <=> ] 372.28K 272KB/s 用时 1.4s
2023-06-07 02:30:56 (272 KB/s) - ‘index.html’ 已保存 [381210]
当我执行 ./launcher rebuild app 时,出现错误提示 fatal: unable to access 'https://github.com/discourse/discourse.git/': gnutls_handshake() failed: Error in the pull function.
这是 ./discourse-doctor 的输出结果
root@cvm-3k8ngdw25i225:/var/discourse# ./discourse-doctor
DISCOURSE DOCTOR Wed Jun 7 01:54:44 UTC 2023
操作系统: Linux cvm-3k8ngdw25i225 5.15.0-73-generic #80-Ubuntu SMP Mon May 15 15:18:26 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
找到 containers/app.yml
==================== YML 设置 ====================
DISCOURSE_HOSTNAME=forum.beginner.center
SMTP_ADDRESS=smtp.mailgun.org
DEVELOPER_EMAILS=whitewatercn@outlook.com
SMTP_PASSWORD= mypassword
SMTP_PORT=587
SMTP_USER_NAME=notification@test.com
LETSENCRYPT_ACCOUNT_EMAIL=notification@test.com
==================== DOCKER 信息 ====================
DOCKER 版本: Docker version 24.0.2, build cb74dfc
DOCKER 进程 (docker ps -a)
容器 ID 镜像 命令 创建时间 状态 端口 名称
==================== 严重问题!!!! ====================
app 未运行!
正在尝试重新构建
==================== 重新构建日志 ====================
检测到 x86_64 架构。
确保 launcher 是最新的
获取 origin
Launcher 已是最新
2.0.20230502-0058: Pulling from discourse/base
摘要: sha256:fa95da36c3d3a582d644b139ec678f5778d745697454bc86f598c689031b30aa
状态: discourse/base:2.0.20230502-0058 镜像已是最新
docker.io/discourse/base:2.0.20230502-0058
/usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2023-06-07T01:56:01.228907 #1] INFO -- : 从 stdin 读取
I, [2023-06-07T01:56:01.240197 #1] INFO -- : > locale-gen $LANG && update-locale
I, [2023-06-07T01:56:01.476473 #1] INFO -- : 正在生成 locale(这可能需要一段时间)...
生成完成。
I, [2023-06-07T01:56:01.478320 #1] INFO -- : > mkdir -p /shared/postgres_run
I, [2023-06-07T01:56:01.525118 #1] INFO -- :
I, [2023-06-07T01:56:01.526975 #1] INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2023-06-07T01:56:01.547772 #1] INFO -- :
I, [2023-06-07T01:56:01.549433 #1] INFO -- : > chmod 775 /shared/postgres_run
I, [2023-06-07T01:56:01.563394 #1] INFO -- :
I, [2023-06-07T01:56:01.564986 #1] INFO -- : > rm -fr /var/run/postgresql
I, [2023-06-07T01:56:01.569020 #1] INFO -- :
I, [2023-06-07T01:56:01.570063 #1] INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2023-06-07T01:56:01.574006 #1] INFO -- :
I, [2023-06-07T01:56:01.575035 #1] INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2023/06/07 01:56:01 socat[18] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2023-06-07T01:56:01.684718 #1] INFO -- :
I, [2023-06-07T01:56:01.685178 #1] INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2023-06-07T01:56:01.690841 #1] INFO -- :
I, [2023-06-07T01:56:01.691730 #1] INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2023-06-07T01:56:01.696860 #1] INFO -- :
I, [2023-06-07T01:56:01.701388 #1] INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2023-06-07T01:56:01.706511 #1] INFO -- :
I, [2023-06-07T01:56:01.707604 #1] INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2023-06-07T01:56:01.712073 #1] INFO -- :
I, [2023-06-07T01:56:01.719619 #1] INFO -- : 文件 > /etc/service/postgres/run chmod: +x chown:
I, [2023-06-07T01:56:01.726417 #1] INFO -- : 文件 > /etc/service/postgres/log/run chmod: +x chown:
I, [2023-06-07T01:56:01.734075 #1] INFO -- : 文件 > /etc/runit/3.d/99-postgres chmod: +x chown:
I, [2023-06-07T01:56:01.740167 #1] INFO -- : 文件 > /root/upgrade_postgres chmod: +x chown:
I, [2023-06-07T01:56:01.741202 #1] INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2023-06-07T01:56:45.577970 #1] INFO -- :
I, [2023-06-07T01:56:45.582323 #1] INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/13/bin/initdb -D /shared/postgres_data || exit 0
I, [2023-06-07T01:56:45.588753 #1] INFO -- :
I, [2023-06-07T01:56:45.590076 #1] INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2023-06-07T01:56:45.611459 #1] INFO -- :
I, [2023-06-07T01:56:45.612318 #1] INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2023-06-07T01:56:45.619591 #1] INFO -- :
I, [2023-06-07T01:56:45.620570 #1] INFO -- : > /root/upgrade_postgres
I, [2023-06-07T01:56:45.636593 #1] INFO -- :
I, [2023-06-07T01:56:45.638612 #1] INFO -- : > rm /root/upgrade_postgres
I, [2023-06-07T01:56:45.645793 #1] INFO -- :
I, [2023-06-07T01:56:45.646859 #1] INFO -- : 将 /etc/postgresql/13/main/postgresql.conf 中的 data_directory = '/var/lib/postgresql/13/main' 替换为 data_directory = '/shared/postgres_data'
I, [2023-06-07T01:56:45.649716 #1] INFO -- : 将 /etc/postgresql/13/main/postgresql.conf 中的 (?-mix:#?listen_addresses *=.*) 替换为 listen_addresses = '*'
I, [2023-06-07T01:56:45.653392 #1] INFO -- : 将 /etc/postgresql/13/main/postgresql.conf 中的 (?-mix:#?synchronous_commit *=.*) 替换为 synchronous_commit = $db_synchronous_commit
I, [2023-06-07T01:56:45.654165 #1] INFO -- : 将 /etc/postgresql/13/main/postgresql.conf 中的 (?-mix:#?shared_buffers *=.*) 替换为 shared_buffers = $db_shared_buffers
I, [2023-06-07T01:56:45.654992 #1] INFO -- : 将 /etc/postgresql/13/main/postgresql.conf 中的 (?-mix:#?work_mem *=.*) 替换为 work_mem = $db_work_mem
I, [2023-06-07T01:56:45.655848 #1] INFO -- : 将 /etc/postgresql/13/main/postgresql.conf 中的 (?-mix:#?default_text_search_config *=.*) 替换为 default_text_search_config = '$db_default_text_search_config'
I, [2023-06-07T01:56:45.662616 #1] INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2023-06-07T01:56:45.669450 #1] INFO -- :
I, [2023-06-07T01:56:45.672602 #1] INFO -- : 将 /etc/postgresql/13/main/postgresql.conf 中的 (?-mix:#?checkpoint_segments *=.*) 替换为 checkpoint_segments = $db_checkpoint_segments
I, [2023-06-07T01:56:45.677489 #1] INFO -- : 将 /etc/postgresql/13/main/postgresql.conf 中的 (?-mix:#?logging_collector *=.*) 替换为 logging_collector = $db_logging_collector
I, [2023-06-07T01:56:45.693599 #1] INFO -- : 将 /etc/postgresql/13/main/postgresql.conf 中的 (?-mix:#?log_min_duration_statement *=.*) 替换为 log_min_duration_statement = $db_log_min_duration_statement
I, [2023-06-07T01:56:45.710522 #1] INFO -- : 将 /etc/postgresql/13/main/pg_hba.conf 中的 (?-mix:^#local +replication +postgres +peer$) 替换为 local replication postgres peer
I, [2023-06-07T01:56:45.711259 #1] INFO -- : 将 /etc/postgresql/13/main/pg_hba.conf 中的 (?-mix:^host.*all.*all.*127.*$) 替换为 host all all 0.0.0.0/0 md5
I, [2023-06-07T01:56:45.743800 #1] INFO -- : 将 /etc/postgresql/13/main/pg_hba.conf 中的 (?-mix:^host.*all.*all.*::1\/128.*$) 替换为 host all all ::/0 md5
I, [2023-06-07T01:56:45.760352 #1] INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main
I, [2023-06-07T01:56:45.763001 #1] INFO -- : > sleep 5
2023-06-07 01:56:45.911 UTC [41] LOG: 正在启动 PostgreSQL 13.10 (Debian 13.10-1.pgdg110+1) on x86_64-pc-linux-gnu, 由 gcc (Debian 10.2.1-6) 10.2.1 20210110 编译, 64-bit
2023-06-07 01:56:45.912 UTC [41] LOG: 正在监听 IPv4 地址 "0.0.0.0", 端口 5432
2023-06-07 01:56:45.913 UTC [41] LOG: 正在监听 IPv6 地址 "::", 端口 5432
2023-06-07 01:56:45.976 UTC [41] LOG: 正在监听 Unix 套接字 "/var/run/postgresql/.s.PGSQL.5432"
2023-06-07 01:56:46.094 UTC [44] LOG: 数据库系统于 2023-06-07 00:53:20 UTC 关闭
2023-06-07 01:56:46.148 UTC [41] LOG: 数据库系统已准备好接受连接
I, [2023-06-07T01:56:50.776597 #1] INFO -- :
I, [2023-06-07T01:56:50.777361 #1] INFO -- : > su postgres -c 'createdb discourse' || true
2023-06-07 01:56:50.849 UTC [54] postgres@postgres FATAL: 数据库 "postgres" 不存在
2023-06-07 01:56:50.866 UTC [55] postgres@template1 ERROR: 数据库 "discourse" 已存在
2023-06-07 01:56:50.866 UTC [55] postgres@template1 STATEMENT: CREATE DATABASE discourse;
createdb: 错误: 数据库创建失败: ERROR: 数据库 "discourse" 已存在
I, [2023-06-07T01:56:50.873393 #1] INFO -- :
I, [2023-06-07T01:56:50.874488 #1] INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2023-06-07 01:56:50.952 UTC [59] postgres@discourse ERROR: 角色 "discourse" 已存在
2023-06-07 01:56:50.952 UTC [59] postgres@discourse STATEMENT: create user discourse;
ERROR: 角色 "discourse" 已存在
I, [2023-06-07T01:56:50.956073 #1] INFO -- :
I, [2023-06-07T01:56:50.956942 #1] INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2023-06-07T01:56:51.027444 #1] INFO -- : GRANT
I, [2023-06-07T01:56:51.030458 #1] INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
I, [2023-06-07T01:56:51.105907 #1] INFO -- : ALTER SCHEMA
I, [2023-06-07T01:56:51.107538 #1] INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
NOTICE: 扩展 "hstore" 已存在,跳过
I, [2023-06-07T01:56:51.177347 #1] INFO -- : CREATE EXTENSION
I, [2023-06-07T01:56:51.178269 #1] INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists pg_trgm;"'
NOTICE: 扩展 "pg_trgm" 已存在,跳过
I, [2023-06-07T01:56:51.255725 #1] INFO -- : CREATE EXTENSION
I, [2023-06-07T01:56:51.256767 #1] INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
NOTICE: 扩展 "hstore" 已存在,跳过
I, [2023-06-07T01:56:51.337617 #1] INFO -- : CREATE EXTENSION
I, [2023-06-07T01:56:51.339013 #1] INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"'
NOTICE: 扩展 "pg_trgm" 已存在,跳过
I, [2023-06-07T01:56:51.411681 #1] INFO -- : CREATE EXTENSION
I, [2023-06-07T01:56:51.412706 #1] INFO -- : > sudo -u postgres psql discourse
I, [2023-06-07T01:56:51.417667 #1] INFO -- : update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'discourse' AND encoding = pg_char_to_encoding('SQL_ASCII');
I, [2023-06-07T01:56:51.492235 #1] INFO -- : 文件 > /var/lib/postgresql/take-database-backup chmod: +x chown: postgres:postgres
I, [2023-06-07T01:56:51.497328 #1] INFO -- : 文件 > /var/spool/cron/crontabs/postgres chmod: chown:
I, [2023-06-07T01:56:51.498387 #1] INFO -- : > echo postgres installed!
I, [2023-06-07T01:56:51.501737 #1] INFO -- : postgres installed!
I, [2023-06-07T01:56:51.508382 #1] INFO -- : 文件 > /etc/service/redis/run chmod: +x chown:
I, [2023-06-07T01:56:51.514756 #1] INFO -- : 文件 > /etc/service/redis/log/run chmod: +x chown:
I, [2023-06-07T01:56:51.520768 #1] INFO -- : 文件 > /etc/runit/3.d/10-redis chmod: +x chown:
I, [2023-06-07T01:56:51.521898 #1] INFO -- : 将 /etc/redis/redis.conf 中的 daemonize yes 替换为
I, [2023-06-07T01:56:51.523757 #1] INFO -- : 将 /etc/redis/redis.conf 中的 (?-mix:^pidfile.*$) 替换为
I, [2023-06-07T01:56:51.524825 #1] INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2023-06-07T01:56:51.529407 #1] INFO -- :
I, [2023-06-07T01:56:51.530794 #1] INFO -- : 将 /etc/redis/redis.conf 中的 (?-mix:^logfile.*$) 替换为 logfile ""
I, [2023-06-07T01:56:51.532333 #1] INFO -- : 将 /etc/redis/redis.conf 中的 (?-mix:^bind .*$) 替换为
I, [2023-06-07T01:56:51.533475 #1] INFO -- : 将 /etc/redis/redis.conf 中的 (?-mix:^dir .*$) 替换为 dir /shared/redis_data
I, [2023-06-07T01:56:51.534970 #1] INFO -- : 将 /etc/redis/redis.conf 中的 (?-mix:^protected-mode yes) 替换为 protected-mode no
I, [2023-06-07T01:56:51.536109 #1] INFO -- : 将 /etc/redis/redis.conf 中的 # io-threads 4 替换为 io-threads $redis_io_threads
I, [2023-06-07T01:56:51.537583 #1] INFO -- : > echo redis installed
I, [2023-06-07T01:56:51.543105 #1] INFO -- : redis installed
I, [2023-06-07T01:56:51.544052 #1] INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2023-06-07T01:56:51.549618 #1] INFO -- : logfile ""
I, [2023-06-07T01:56:51.550524 #1] INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2023-06-07T01:56:51.552857 #1] INFO -- : > sleep 10
103:C 07 Jun 2023 01:56:51.564 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
103:C 07 Jun 2023 01:56:51.565 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=103, just started
103:C 07 Jun 2023 01:56:51.566 # Configuration loaded
103:M 07 Jun 2023 01:56:51.567 * monotonic clock: POSIX clock_gettime
103:M 07 Jun 2023 01:56:51.569 * Running mode=standalone, port=6379.
103:M 07 Jun 2023 01:56:51.569 # Server initialized
103:M 07 Jun 2023 01:56:51.570 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
103:M 07 Jun 2023 01:56:51.572 * Loading RDB produced by version 7.0.7
103:M 07 Jun 2023 01:56:51.573 * RDB age 3811 seconds
103:M 07 Jun 2023 01:56:51.573 * RDB memory usage when created 0.82 Mb
103:M 07 Jun 2023 01:56:51.574 * Done loading RDB, keys loaded: 0, keys expired: 0.
103:M 07 Jun 2023 01:56:51.574 * DB loaded from disk: 0.003 seconds
103:M 07 Jun 2023 01:56:51.575 * Ready to accept connections
I, [2023-06-07T01:57:01.559118 #1] INFO -- :
I, [2023-06-07T01:57:01.560147 #1] INFO -- : > thpoff echo "thpoff is installed!"
I, [2023-06-07T01:57:01.568594 #1] INFO -- : thpoff is installed!
I, [2023-06-07T01:57:01.570397 #1] INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end'
I, [2023-06-07T01:57:01.691310 #1] INFO -- :
I, [2023-06-07T01:57:01.693524 #1] INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'
I, [2023-06-07T01:57:01.790005 #1] INFO -- :
I, [2023-06-07T01:57:01.791590 #1] INFO -- : > /usr/local/bin/ruby -e 'if (ENV["DISCOURSE_CDN_URL"] || "")[0..1] == "//"; puts "Aborting! CDN must have a protocol specified. Once fixed you should rebake your posts now to correct all posts."; exit 1; end'
I, [2023-06-07T01:57:01.887026 #1] INFO -- :
I, [2023-06-07T01:57:01.888614 #1] INFO -- : > rm -f /etc/cron.d/anacron
I, [2023-06-07T01:57:01.892910 #1] INFO -- :
I, [2023-06-07T01:57:01.897813 #1] INFO -- : 文件 > /etc/cron.d/anacron chmod: chown:
I, [2023-06-07T01:57:01.904634 #1] INFO -- : 文件 > /etc/runit/1.d/copy-env chmod: +x chown:
I, [2023-06-07T01:57:01.911401 #1] INFO -- : 文件 > /etc/service/unicorn/run chmod: +x chown:
I, [2023-06-07T01:57:01.917998 #1] INFO -- : 文件 > /etc/service/nginx/run chmod: +x chown:
I, [2023-06-07T01:57:01.924031 #1] INFO -- : 文件 > /etc/runit/3.d/01-nginx chmod: +x chown:
I, [2023-06-07T01:57:01.929959 #1] INFO -- : 文件 > /etc/runit/3.d/02-unicorn chmod: +x chown:
I, [2023-06-07T01:57:01.930941 #1] INFO -- : 将 /etc/service/unicorn/run 中的 # postgres 替换为 sv start postgres || exit 1
I, [2023-06-07T01:57:01.932249 #1] INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2023-06-07T01:57:01.935608 #1] INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git reset --hard
130:C 07 Jun 2023 01:57:01.950 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
130:C 07 Jun 2023 01:57:01.951 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=130, just started
130:C 07 Jun 2023 01:57:01.952 # Configuration loaded
130:M 07 Jun 2023 01:57:01.954 * monotonic clock: POSIX clock_gettime
130:M 07 Jun 2023 01:57:01.955 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
130:M 07 Jun 2023 01:57:01.955 # Failed listening on port 6379 (TCP), aborting.
正在更新文件: 100% (33085/33085), 完成。
I, [2023-06-07T01:57:09.791146 #1] INFO -- : HEAD is now at a8e28060d FIX: rename notify_about_flags_after to notify_about_reviewable_item_after (#21320)
I, [2023-06-07T01:57:09.792664 #1] INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git clean -f
I, [2023-06-07T01:57:10.838690 #1] INFO -- :
I, [2023-06-07T01:57:10.840122 #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
'
fatal: unable to access 'https://github.com/discourse/discourse.git/': gnutls_handshake() failed: Error in the pull function.
I, [2023-06-07T02:00:12.081613 #1] INFO -- :
I, [2023-06-07T02:00:12.084329 #1] INFO -- : 正在终止异步进程
I, [2023-06-07T02:00:12.085079 #1] INFO -- : 向 HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 41 发送 INT
2023-06-07 02:00:12.086 UTC [41] LOG: 收到快速关闭请求
I, [2023-06-07T02:00:12.090399 #1] INFO -- : 向 exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 103 发送 TERM
103:signal-handler (1686103212) 收到 SIGTERM,计划关闭...
2023-06-07 02:00:12.092 UTC [41] LOG: 中止任何活跃事务
2023-06-07 02:00:12.110 UTC [41] LOG: 后台工作进程 "logical replication launcher" (PID 50) 以退出代码 1 退出
2023-06-07 02:00:12.110 UTC [45] LOG: 正在关闭
103:M 07 Jun 2023 02:00:12.190 # 用户请求关闭...
103:M 07 Jun 2023 02:00:12.190 * 正在保存最终的 RDB 快照,然后退出。
103:M 07 Jun 2023 02:00:12.358 * 数据库已保存到磁盘
103:M 07 Jun 2023 02:00:12.359 # Redis 现在准备退出,再见...
2023-06-07 02:00:12.535 UTC [41] LOG: 数据库系统已关闭
失败
--------------------
Pups::ExecError: 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
' 失败,返回 #<Process::Status: pid 138 exit 128>
失败位置: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec 失败,参数为 {"cd"=>"$home", "hook"=>"code", "cmd"=>["sudo -H -E -u discourse git reset --hard", "sudo -H -E -u discourse git clean -f", "sudo -H -E -u discourse bash -c '\n set -o errexit\n if [ $(git rev-parse --is-shallow-repository) == \"true\" ]; then\n git remote set-branches --add origin main\n git remote set-branches origin $version\n git fetch --depth 1 origin $version\n else\n git fetch --tags --prune-tags --prune --force origin\n fi\n'", "sudo -H -E -u discourse bash -c '\n set -o errexit\n if [[ $(git symbolic-ref --short HEAD) == $version ]] ; then\n git pull\n else\n git -c advice.detachedHead=false checkout $version\n fi\n'", "sudo -H -E -u discourse git config user.discourse-version $version", "mkdir -p tmp", "chown discourse:www-data tmp", "mkdir -p tmp/pids", "mkdir -p tmp/sockets", "touch tmp/.gitkeep", "mkdir -p /shared/log/rails", "bash -c \"touch -a /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log\"", "bash -c \"ln -s /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log $home/log\"", "bash -c \"mkdir -p /shared/{uploads,backups}\"", "bash -c \"ln -s /shared/{uploads,backups} $home/public\"", "bash -c \"mkdir -p /shared/tmp/{backups,restores}\"", "bash -c \"ln -s /shared/tmp/{backups,restores} $home/tmp\"", "chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp", "[ ! -d public/plugins ] || find public/plugins/ -maxdepth 1 -xtype l -delete"]}
bootstrap 失败,退出代码 128
** 引导失败 ** 请向上滚动并查看更早的错误消息,可能不止一个。
./discourse-doctor 可能有助于诊断问题。
3ef919dc3764d4512aa7b8f2558b281761928bfd5157f9eeb136a480fbc6cd1c
==================== 重新构建日志结束 ====================
重新构建 app 失败。
正在检查您的域名 . . .
与 forum.beginner.center 的连接成功。
您可能应该移除任何非标准插件并重新构建。
正在尝试重启现有容器 . . .
检测到 x86_64 架构。
+ /usr/bin/docker run --shm-size=512m -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=4 -e UNICORN_SIDEKIQS=1 -e RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 -e RUBY_GC_HEAP_INIT_SLOTS=400000 -e RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e LETSENCRYPT_DIR=/shared/letsencrypt -e DISCOURSE_FORCE_HTTPS=true -e LC_ALL=en_US.UTF-8 -e LANGUAGE=en_US.UTF-8 -e DISCOURSE_HOSTNAME=forum.beginner.center -e DISCOURSE_DEVELOPER_EMAILS=whitewatercn@outlook.com -e DISCOURSE_SMTP_ADDRESS=in-v3.mailjet.com -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=7b14af9b5034dd6e7639d19587cb7831 -e DISCOURSE_SMTP_PASSWORD=46764f565c54a0fd94b8cbc88e1e00ad -e DISCOURSE_SMTP_DOMAIN=beginner.center -e DISCOURSE_NOTIFICATION_EMAIL=discuss@beginner.center -e LETSENCRYPT_ACCOUNT_EMAIL=me@example.com -h cvm-3k8ngdw25i225-app -e DOCKER_HOST_IP=172.17.0.1 --name app -t -p 80:80 -p 443:443 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log --mac-address 02:83:9d:ab:b2:27 local_discourse/app /sbin/boot
无法在本地找到镜像 'local_discourse/app:latest'
docker: 来自守护进程的ErrorResponse: 拉取访问被拒绝,local_discourse/app 不存在或可能需要 'docker login': 拒绝: 请求的资源访问被拒绝。
参见 'docker run --help'。
重启容器失败。
==================== 插件 ====================
- git clone https://github.com/discourse/docker_manager.git
未检测到非官方插件。
请参阅 https://github.com/discourse/discourse/blob/main/lib/plugin/metadata.rb 获取官方列表。
========================================
forum.beginner.center 上的 Discourse 版本: 未找到
localhost 上的 Discourse 版本: 未找到
==================== 内存信息 ====================
RAM (MB): 2071
总计 已用 空闲 共享 buff/cache 可用
内存: 1975 409 413 0 1152 1378
交换: 2047 0 2047
==================== 磁盘空间检查 ====================
---------- 操作系统磁盘空间 ----------
文件系统 大小 已用 可用 使用% 挂载点
/dev/vda1 20G 8.6G 11G 45% /
==================== 磁盘信息 ====================
磁盘 /dev/loop0: 61.93 MiB, 64933888 字节, 126824 扇区
单位: 扇区 * 512 = 512 字节
扇区大小 (逻辑/物理): 512 字节 / 512 字节
I/O 大小 (最小/最佳): 512 字节 / 512 字节
磁盘 /dev/loop1: 63.45 MiB, 66535424 字节, 129952 扇区
单位: 扇区 * 512 = 512 字节
扇区大小 (逻辑/物理): 512 字节 / 512 字节
I/O 大小 (最小/最佳): 512 字节 / 512 字节
磁盘 /dev/loop2: 79.95 MiB, 83832832 字节, 163736 扇区
单位: 扇区 * 512 = 512 字节
扇区大小 (逻辑/物理): 512 字节 / 512 字节
I/O 大小 (最小/最佳): 512 字节 / 512 字节
磁盘 /dev/loop3: 111.95 MiB, 117387264 字节, 229272 扇区
单位: 扇区 * 512 = 512 字节
扇区大小 (逻辑/物理): 512 字节 / 512 字节
I/O 大小 (最小/最佳): 512 字节 / 512 字节
磁盘 /dev/loop4: 53.26 MiB, 55844864 字节, 109072 扇区
单位: 扇区 * 512 = 512 字节
扇区大小 (逻辑/物理): 512 字节 / 512 字节
I/O 大小 (最小/最佳): 512 字节 / 512 字节
磁盘 /dev/vda: 20 GiB, 21474836480 字节, 41943040 扇区
单位: 扇区 * 512 = 512 字节
扇区大小 (逻辑/物理): 512 字节 / 512 字节
I/O 大小 (最小/最佳): 512 字节 / 512 字节
磁盘标签类型: gpt
磁盘标识符: D83B20B1-DCF5-4453-A269-F52759607D7B
设备 起始 结束 扇区 大小 类型
/dev/vda1 227328 41943006 41715679 19.9G Linux 文件系统
/dev/vda14 2048 10239 8192 4M BIOS 启动
/dev/vda15 10240 227327 217088 106M EFI 系统
分区表条目顺序与磁盘顺序不一致。
磁盘 /dev/vdb: 20 GiB, 21474836480 字节, 41943040 扇区
单位: 扇区 * 512 = 512 字节
扇区大小 (逻辑/物理): 512 字节 / 512 字节
I/O 大小 (最小/最佳): 512 字节 / 512 字节
==================== 磁盘信息结束 ====================
==================== 邮件测试 ====================
要进行稳健的测试,请从 http://www.mail-tester.com/ 获取一个地址
或者只是给自己发送一条测试消息。
邮件测试的电子邮件地址?(输入 'n' 跳过)[whitewatercn@outlook.com]:
正在向 whitewatercn@outlook.com 发送邮件 . . .
来自守护进程的错误响应: 没有这样的容器: app
替换: SMTP_PASSWORD
替换: LETSENCRYPT_ACCOUNT_EMAIL
替换: DEVELOPER_EMAILS
替换: DISCOURSE_DB_PASSWORD
替换: 正在向
==================== 完成! ====================
您可以使用以下命令查看此脚本的输出
LESS=-Ri less /tmp/discourse-debug.txt
但首先,确保您知道下面这三个命令!!!
使用上述命令(称为 'less')查看文件时需要知道的命令:
q -- 退出
/error<ENTER> -- 搜索单词 'error'
n -- 搜索下一个出现的位置
g -- 转到文件开头
f -- 向前翻一页
b -- 向后翻一页
G -- 转到文件末尾