更新错误

我昨晚尝试更新到 3.4.0,但更新一直失败。找不到明显的插件错误,而且内存似乎也足够……


==================== 严重问题!!!! ====================

应用程序未运行!

正在尝试重建

==================== 重建日志 ====================

检测到 x86_64 架构。

警告:containers/app.yml 文件对所有人可读。您可以通过运行以下命令来保护此文件:chmod o-rwx containers/app.yml

确保启动器是最新版本

正在获取 origin

启动器是最新版本

正在停止旧容器

+ /usr/bin/docker stop -t 600 app

app

2.0.20240825-0027:正在从 discourse/base 拉取

摘要:sha256:6de68cb49198b5281f79ed9401b3fe818c854d220dcf0238549fe2f2adb19146

状态:镜像已是最新版本 discourse/base:2.0.20240825-0027

/usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups.rb

/usr/local/bin/pups --stdin

I, [2024-08-29T06:27:54.954308 #1] INFO -- : 从标准输入读取

I, [2024-08-29T06:27:54.967006 #1] INFO -- : 文件 > /etc/service/postgres/run chmod: +x chown:

I, [2024-08-29T06:27:54.972778 #1] INFO -- : 文件 > /etc/service/postgres/log/run chmod: +x chown:

I, [2024-08-29T06:27:54.977868 #1] INFO -- : 文件 > /etc/runit/3.d/99-postgres chmod: +x chown:

I, [2024-08-29T06:27:54.983048 #1] INFO -- : 文件 > /root/install_postgres chmod: +x chown:

I, [2024-08-29T06:27:54.988576 #1] INFO -- : 文件 > /root/upgrade_postgres chmod: +x chown:

I, [2024-08-29T06:27:54.988882 #1] INFO -- : 将 /var/lib/postgresql/13/main/postgresql.conf 中的 data_directory = '/var/lib/postgresql/13/main' 替换为 data_directory = '/shared/postgres_data'

I, [2024-08-29T06:27:54.989890 #1] INFO -- : 将 /etc/postgresql/13/main/postgresql.conf 中的 (?-mix:#?listen_addresses *=.*) 替换为 listen_addresses = '*'

I, [2024-08-29T06:27:54.992525 #1] INFO -- : 将 /etc/postgresql/13/main/postgresql.conf 中的 (?-mix:#?synchronous_commit *=.*) 替换为 synchronous_commit = $db_synchronous_commit

I, [2024-08-29T06:27:54.993361 #1] INFO -- : 将 /etc/postgresql/13/main/postgresql.conf 中的 (?-mix:#?shared_buffers *=.*) 替换为 shared_buffers = $db_shared_buffers

I, [2024-08-29T06:27:54.994078 #1] INFO -- : 将 /etc/postgresql/13/main/postgresql.conf 中的 (?-mix:#?work_mem *=.*) 替换为 work_mem = $db_work_mem

I, [2024-08-29T06:27:54.994692 #1] INFO -- : 将 /etc/postgresql/13/main/postgresql.conf 中的 (?-mix:#?default_text_search_config *=.*) 替换为 default_text_search_config = '$db_default_text_search_config'

I, [2024-08-29T06:27:54.996207 #1] INFO -- : 将 /etc/postgresql/13/main/postgresql.conf 中的 (?-mix:#?checkpoint_segments *=.*) 替换为 checkpoint_segments = $db_checkpoint_segments

I, [2024-08-29T06:27:54.996893 #1] INFO -- : 将 /etc/postgresql/13/main/postgresql.conf 中的 (?-mix:#?logging_collector *=.*) 替换为 logging_collector = $db_logging_collector

I, [2024-08-29T06:27:54.998006 #1] INFO -- : 将 /etc/postgresql/13/main/postgresql.conf 中的 (?-mix:#?log_min_duration_statement *=.*) 替换为 log_min_duration_statement = $db_log_min_duration_statement

I, [2024-08-29T06:27:54.998824 #1] INFO -- : 将 /etc/postgresql/13/main/pg_hba.conf 中的 (?-mix:^#local +replication +postgres +peer$) 替换为 local replication postgres peer

I, [2024-08-29T06:27:54.999520 #1] INFO -- : 将 /etc/postgresql/13/main/pg_hba.conf 中的 (?-mix:^host.*all.*all.*127.*$) 替换为 host all all 0.0.0.0/0 md5

I, [2024-08-29T06:27:55.000423 #1] INFO -- : 将 /etc/postgresql/13/main/pg_hba.conf 中的 (?-mix:^host.*all.*all.*::1\/128.*$) 替换为 host all all ::/0 md5

I, [2024-08-29T06:27:55.001096 #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

I, [2024-08-29T06:27:55.067844 #1] INFO -- : 正在生成区域设置(这可能需要一些时间)...

生成完成。

postgres already running stop container

失败

--------------------

Pups::ExecError: 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

使用返回代码 #<Process::Status: pid 16 exit 1> 失败

失败位置:/usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'

exec 使用参数 {"tag"=>"db", "cmd"=>"if [ -f /root/install_postgres ]; then\n /root/install_postgres && rm -f /root/install_postgres\nelif [ -e /shared/postgres_run/.s.PGSQL.5432 ]; then\n socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1\nfi\n"} 失败

引导失败,退出代码为 1

** 引导失败 ** 请向上滚动并查找更早的错误消息,可能不止一个。

./discourse-doctor 可能有助于诊断问题。

afa7edec7b05a0d8269e150cef76c0f3d66c0ec9ff17378f8202d2e10b81ded1

==================== 重建日志结束 ====================
              总计        已用        可用      共享  缓冲区/缓存  可用
内存:        4039588      282424     1478380       44144     2278784     3421444
交换:             0           0           0
1 个赞

我昨天有一个 4GB 的实例内存不足,所以我添加了交换空间,不过这似乎不是这里的问题。

看起来 PostgreSQL 已经在运行了。你只有 app.yml 而没有 data.yml 吗?

嗨 Jay,

我该如何访问或重建 data.yml?

我怀疑你没有,如果是这样的话,我就不知道 postgres 问题出在哪里了。

重启 droplet 后,重建进行得更远了一些,最终遇到了与此处帖子相同的问题:PostgreSQL Stuck During Rebuilding - #15 by haroldfy

我使用 ./launcher start app 回到了论坛之前的 3.4.0.beta1-dev 版本。

可能会等待下一个版本发布和/或尝试更新到 Ubuntu 20.04.6 LTS。

我宁愿启动一个带有新操作系统的虚拟机,而不是尝试升级操作系统。

2 个赞

我们来结束这个话题,把讨论集中在另一个话题上。:+1:

2 个赞