嗨,团队,我刚刚按照官方指南操作,没有为数据库使用单独的容器,但我无法重新构建应用,下面是包含错误的完整输出
我在这个话题 PostgreSQL 15 update - #58 by xFocus 中提问过,但也许我的错误不具有普遍性,最好单独提问
我尝试过但都失败了
./discourse-doctor,但没有成功- 然后我以为有些端口被占用,但 netstats 显示没有进程在使用这些端口,然后我重启实例以重新开始并重新构建应用,但仍然没有成功
- 启动然后停止应用,tail 查看日志,但从未看到日志
LOG: database system is shut down未关闭。 - 尝试移动这个文件,但失败了 PostgreSQL 15 update - #61 by xFocus
- 尝试运行 Mwaniki 的建议
sv stop nginx和sv stop unicorn,但仍然出现以下错误 PostgreSQL 15 update - #67 by mwaniki - 在 app.yaml 中移除插件
discourse-ai
我搜索了历史话题,似乎是 postgres 关闭缓慢,或者 postgres 没有正确关闭?
不确定从哪里开始解决这个问题……谢谢!
root@ubuntu-s-1vcpu-1gb-nyc3-01:/var/discourse# ./launcher rebuild app
检测到 x86_64 架构。
确保 launcher 是最新的
Launcher 是最新的
停止旧容器
+ /usr/bin/docker stop -t 600 app
app
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-02T22:44:41.549015 #1] INFO -- : 从 stdin 读取
I, [2025-02-02T22:44:41.577409 #1] INFO -- : 文件 > /etc/service/postgres/run chmod: +x chown:
I, [2025-02-02T22:44:41.583874 #1] INFO -- : 文件 > /etc/service/postgres/log/run chmod: +x chown:
I, [2025-02-02T22:44:41.591519 #1] INFO -- : 文件 > /etc/runit/3.d/99-postgres chmod: +x chown:
I, [2025-02-02T22:44:41.597749 #1] INFO -- : 文件 > /root/install_postgres chmod: +x chown:
I, [2025-02-02T22:44:41.604033 #1] INFO -- : 文件 > /root/upgrade_postgres chmod: +x chown:
I, [2025-02-02T22:44:41.605944 #1] INFO -- : 在 /etc/postgresql/15/main/postgresql.conf 中将 data_directory = '/var/lib/postgresql/15/main' 替换为 data_directory = '/shared/postgres_data'
I, [2025-02-02T22:44:41.607438 #1] INFO -- : 在 /etc/postgresql/15/main/postgresql.conf 中将 (?-mix:#?listen_addresses *=.*) 替换为 listen_addresses = '*'
I, [2025-02-02T22:44:41.608272 #1] INFO -- : 在 /etc/postgresql/15/main/postgresql.conf 中将 (?-mix:#?synchronous_commit *=.*) 替换为 synchronous_commit = $db_synchronous_commit
I, [2025-02-02T22:44:41.613661 #1] INFO -- : 在 /etc/postgresql/15/main/postgresql.conf 中将 (?-mix:#?shared_buffers *=.*) 替换为 shared_buffers = $db_shared_buffers
I, [2025-02-02T22:44:41.614874 #1] INFO -- : 在 /etc/postgresql/15/main/postgresql.conf 中将 (?-mix:#?work_mem *=.*) 替换为 work_mem = $db_work_mem
I, [2025-02-02T22:44:41.616367 #1] INFO -- : 在 /etc/postgresql/15/main/postgresql.conf 中将 (?-mix:#?default_text_search_config *=.*) 替换为 default_text_search_config = '$db_default_text_search_config'
I, [2025-02-02T22:44:41.617281 #1] INFO -- : 在 /etc/postgresql/15/main/postgresql.conf 中将 (?-mix:#?checkpoint_segments *=.*) 替换为 checkpoint_segments = $db_checkpoint_segments
I, [2025-02-02T22:44:41.618025 #1] INFO -- : 在 /etc/postgresql/15/main/postgresql.conf 中将 (?-mix:#?logging_collector *=.*) 替换为 logging_collector = $db_logging_collector
I, [2025-02-02T22:44:41.618477 #1] INFO -- : 在 /etc/postgresql/15/main/postgresql.conf 中将 (?-mix:#?log_min_duration_statement *=.*) 替换为 log_min_duration_statement = $db_log_min_duration_statement
I, [2025-02-02T22:44:41.619525 #1] INFO -- : 在 /etc/postgresql/15/main/pg_hba.conf 中将 (?-mix:^#local +replication +postgres +peer$) 替换为 local replication postgres peer
I, [2025-02-02T22:44:41.620175 #1] INFO -- : 在 /etc/postgresql/15/main/pg_hba.conf 中将 (?-mix:^host.*all.*all.*127.*$) 替换为 host all all 0.0.0.0/0 md5
I, [2025-02-02T22:44:41.620712 #1] INFO -- : 在 /etc/postgresql/15/main/pg_hba.conf 中将 (?-mix:^host.*all.*all.*::1\/128.*$) 替换为 host all all ::/0 md5
I, [2025-02-02T22:44:41.621360 #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
2025/02/02 22:44:44 socat[33] E connect(, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): Connection refused
I, [2025-02-02T22:44:44.396468 #1] INFO -- : 生成区域设置(这可能需要一段时间)...
en_US.UTF-8... 完成
生成完成。
I, [2025-02-02T22:44:44.397143 #1] INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/15/bin/postmaster -D /etc/postgresql/15/main
I, [2025-02-02T22:44:44.407890 #1] INFO -- : 文件 > /usr/local/bin/create_db chmod: +x chown:
I, [2025-02-02T22:44:44.425888 #1] INFO -- : 文件 > /var/lib/postgresql/take-database-backup chmod: +x chown: postgres:postgres
I, [2025-02-02T22:44:44.431023 #1] INFO -- : 文件 > /var/spool/cron/crontabs/postgres chmod: chown:
I, [2025-02-02T22:44:44.431796 #1] INFO -- : > sleep 5
2025-02-02 22:44:44.579 UTC [35] FATAL: database files are incompatible with server
2025-02-02 22:44:44.579 UTC [35] DETAIL: The data directory was initialized by PostgreSQL version 13, which is not compatible with this version 15.10 (Debian 15.10-1.pgdg120+1).
I, [2025-02-02T22:44:49.437316 #1] INFO -- :
I, [2025-02-02T22:44:49.437465 #1] INFO -- : > /usr/local/bin/create_db
createdb: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
Is the server running locally and accepting connections on that socket?
I, [2025-02-02T22:44:50.386458 #1] INFO -- :
I, [2025-02-02T22:44:50.387193 #1] INFO -- : > echo postgres installed!
I, [2025-02-02T22:44:50.390857 #1] INFO -- : postgres installed!
I, [2025-02-02T22:44:50.397000 #1] INFO -- : 文件 > /etc/service/redis/run chmod: +x chown:
I, [2025-02-02T22:44:50.402346 #1] INFO -- : 文件 > /etc/service/redis/log/run chmod: +x chown:
I, [2025-02-02T22:44:50.408171 #1] INFO -- : 文件 > /etc/runit/3.d/10-redis chmod: +x chown:
I, [2025-02-02T22:44:50.410184 #1] INFO -- : 在 /etc/redis/redis.conf 中将 daemonize yes 替换为
I, [2025-02-02T22:44:50.411697 #1] INFO -- : 在 /etc/redis/redis.conf 中将 (?-mix:^pidfile.*$) 替换为
I, [2025-02-02T22:44:50.413024 #1] INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2025-02-02T22:44:50.421152 #1] INFO -- :
I, [2025-02-02T22:44:50.422537 #1] INFO -- : 在 /etc/redis/redis.conf 中将 (?-mix:^logfile.*$) 替换为 logfile ""
I, [2025-02-02T22:44:50.423633 #1] INFO -- : 在 /etc/redis/redis.conf 中将 (?-mix:^bind .*$) 替换为
I, [2025-02-02T22:44:50.425443 #1] INFO -- : 在 /etc/redis/redis.conf 中将 (?-mix:^dir .*$) 替换为 dir /shared/redis_data
I, [2025-02-02T22:44:50.426827 #1] INFO -- : 在 /etc/redis/redis.conf 中将 (?-mix:^protected-mode yes) 替换为 protected-mode no
I, [2025-02-02T22:44:50.428734 #1] INFO -- : 在 /etc/redis/redis.conf 中将 # io-threads 4 替换为 io-threads $redis_io_threads
I, [2025-02-02T22:44:50.429680 #1] INFO -- : > echo redis installed
I, [2025-02-02T22:44:50.432601 #1] INFO -- : redis installed
I, [2025-02-02T22:44:50.433458 #1] INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2025-02-02T22:44:50.440508 #1] INFO -- : logfile ""
I, [2025-02-02T22:44:50.441420 #1] INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2025-02-02T22:44:50.445329 #1] INFO -- : > sleep 10
83:C 02 Feb 2025 22:44:50.505 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
83:C 02 Feb 2025 22:44:50.506 # Redis version=7.0.15, bits=64, commit=00000000, modified=0, pid=83, just started
83:C 02 Feb 2025 22:44:50.506 # Configuration loaded
83:M 02 Feb 2025 22:44:50.507 * monotonic clock: POSIX clock_gettime
83:M 02 Feb 2025 22:44:50.511 * Running mode=standalone, port=6379.
83:M 02 Feb 2025 22:44:50.511 # Server initialized
83:M 02 Feb 2025 22:44:50.511 # 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.
83:M 02 Feb 2025 22:44:50.517 * Loading RDB produced by version 7.0.7
83:M 02 Feb 2025 22:44:50.518 * RDB age 24 seconds
83:M 02 Feb 2025 22:44:50.518 * RDB memory usage when created 38.75 Mb
83:M 02 Feb 2025 22:44:50.757 * Done loading RDB, keys loaded: 4227, keys expired: 6.
83:M 02 Feb 2025 22:44:50.758 * DB loaded from disk: 0.244 seconds
83:M 02 Feb 2025 22:44:50.758 * Ready to accept connections
I, [2025-02-02T22:45:00.450421 #1] INFO -- :
I, [2025-02-02T22:45:00.451877 #1] INFO -- : > thpoff echo "thpoff is installed!"
I, [2025-02-02T22:45:00.459283 #1] INFO -- : thpoff is installed!
I, [2025-02-02T22:45:00.460391 #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, [2025-02-02T22:45:00.626908 #1] INFO -- :
I, [2025-02-02T22:45:00.627820 #1] INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'
I, [2025-02-02T22:45:00.790837 #1] INFO -- :
I, [2025-02-02T22:45:00.791787 #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, [2025-02-02T22:45:00.960579 #1] INFO -- :
I, [2025-02-02T22:45:00.961453 #1] INFO -- : > rm -f /etc/cron.d/anacron
I, [2025-02-02T22:45:00.985798 #1] INFO -- :
I, [2025-02-02T22:45:00.992040 #1] INFO -- : 文件 > /etc/cron.d/anacron chmod: chown:
I, [2025-02-02T22:45:01.005537 #1] INFO -- : 文件 > /etc/runit/1.d/copy-env chmod: +x chown:
I, [2025-02-02T22:45:01.015139 #1] INFO -- : 文件 > /etc/service/unicorn/run chmod: +x chown:
I, [2025-02-02T22:45:01.025647 #1] INFO -- : 文件 > /etc/service/nginx/run chmod: +x chown:
I, [2025-02-02T22:45:01.039764 #1] INFO -- : 文件 > /etc/runit/3.d/01-nginx chmod: +x chown:
I, [2025-02-02T22:45:01.051412 #1] INFO -- : 文件 > /etc/runit/3.d/02-unicorn chmod: +x chown:
I, [2025-02-02T22:45:01.052388 #1] INFO -- : 在 /etc/service/unicorn/run 中将 # postgres 替换为 if [ -f /root/install_postgres ]; then
/root/install_postgres
rm /root/install_postgres
fi
sv start postgres || exit 1
I, [2025-02-02T22:45:01.071224 #1] INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git clean -f
I, [2025-02-02T22:45:04.274698 #1] INFO -- :
I, [2025-02-02T22:45:04.275754 #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
'
来自 https://github.com/discourse/discourse
- [已删除] (none) -> origin/fix-directory-search-limit
- [已删除] (none) -> origin/fix/tag-rename-404
- [已删除] (none) -> origin/lock-step
- [已删除] (none) -> origin/remove-muted-from-hot-and-top-topic-lists
- [已删除] (none) -> origin/skip-back-button-animation
- [已删除] (none) -> origin/topic-list-item-style
- [已删除] (none) -> origin/translations-from-crowdin-main
- [已删除] (none) -> origin/translations-from-crowdin-stable
c64b5d6d7..4fbbfd45f main -> origin/main
* [新分支] 0-a-bot -> origin/0-a-bot
* [新分支] 0-a-dots -> origin/0-a-dots
+ 3c0b2f75f...0d2238318 allow-posts-link-in-sidebar -> origin/allow-posts-link-in-sidebar (强制更新)
c35147e8c..b7b952d42 composer-disable-submit -> origin/composer-disable-submit
* [新分支] d-menu-composer-flag -> origin/d-menu-composer-flag
* [新分支] dependabot/bundler/json_schemer-2.4.0 -> origin/dependabot/bundler/json_schemer-2.4.0
* [新分支] dependabot/npm_and_yarn/content-tag-3.1.1 -> origin/dependabot/npm_and_yarn/content-tag-3.1.1
* [新分支] dependabot/npm_and_yarn/ember-template-imports-4.3.0 -> origin/dependabot/npm_and_yarn/ember-template-imports-4.3.0
+ 3ebbe57f4...2b3058e5f dependabot/npm_and_yarn/uppy-b578ad6dea -> origin/dependabot/npm_and_yarn/uppy-b578ad6dea (强制更新)
+ 980ddf930...3f23f14af dev-refactor-username-validation-mixin -> origin/dev-refactor-username-validation-mixin (强制更新)
+ 72ff8f1eb...699aa3755 dev-refactor-username-validation-mixin-to-helper -> origin/dev-refactor-username-validation-mixin-to-helper (强制更新)
* [新分支] dev/async-content-component -> origin/dev/async-content-component
+ ec68ffb95...49d1a5682 dev/color-palette-editor -> origin/dev/color-palette-editor (强制更新)
* [新分支] dev/user-field-components-transformer -> origin/dev/user-field-components-transformer
+ 9835546b6...36a2182e3 feature/light-dark-mode-switcher -> origin/feature/light-dark-mode-switcher (强制更新)
62defce33..a61e5b5b5 feature_pm_editor -> origin/feature_pm_editor
* [新分支] fix/d-menu-pointerdown-event-trap -> origin/fix/d-menu-pointerdown-event-trap
* [新分支] loic-services-lock-followup -> origin/loic-services-lock-followup
* [新分支] migrate-fix -> origin/migrate-fix
* [新分支] pento/dev-refactor-automation-plugin-ui -> origin/pento/dev-refactor-automation-plugin-ui
+ de3691471...96f64af00 renato/pm -> origin/renato/pm (强制更新)
* [新分支] revert-31089-ellaestigoy-patch-2 -> origin/revert-31089-ellaestigoy-patch-2
5d4c2a89e..6405b2823 stable -> origin/stable
c64b5d6d7..4fbbfd45f tests-passed -> origin/tests-passed
* [新分支] tobiaseigen-patch-3 -> origin/tobiaseigen-patch-3
* [新分支] tobiaseigen-patch-3-1 -> origin/tobiaseigen-patch-3-1
415cccafb..c43caf483 user-fields-plugin-outlets-update -> origin/user-fields-plugin-outlets-update
* [新分支] ux-post-action-menu -> origin/ux-post-action-menu
b9c4ced94..4fe6a6f85 ux/admin-site-setting-inner-sidebar-experiment -> origin/ux/admin-site-setting-inner-sidebar-experiment
10566d84b..c540132fe ux/combined-themes-components-sidebar-links -> origin/ux/combined-themes-components-sidebar-links
I, [2025-02-02T22:45:05.833792 #1] INFO -- :
I, [2025-02-02T22:45:05.834721 #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
'
切换到新分支 'tests-passed'
I, [2025-02-02T22:45:23.134002 #1] INFO -- : 分支 'tests-passed' 设置为跟踪 'origin/tests-passed'。
I, [2025-02-02T22:45:23.135386 #1] INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git config user.discourse-version tests-passed
I, [2025-02-02T22:45:23.157717 #1] INFO -- :
I, [2025-02-02T22:45:23.158115 #1] INFO -- : > cd /var/www/discourse && mkdir -p tmp
I, [2025-02-02T22:45:23.164270 #1] INFO -- :
I, [2025-02-02T22:45:23.164768 #1] INFO -- : > cd /var/www/discourse && chown discourse:www-data tmp
I, [2025-02-02T22:45:23.169777 #1] INFO -- :
I, [2025-02-02T22:45:23.170523 #1] INFO -- : > cd /var/www/discourse && mkdir -p tmp/pids
I, [2025-02-02T22:45:23.174580 #1] INFO -- :
I, [2025-02-02T22:45:23.175314 #1] INFO -- : > cd /var/www/discourse && mkdir -p tmp/sockets
I, [2025-02-02T22:45:23.179731 #1] INFO -- :
I, [2025-02-02T22:45:23.180389 #1] INFO -- : > cd /var/www/discourse && touch tmp/.gitkeep
I, [2025-02-02T22:45:23.192093 #1] INFO -- :
I, [2025-02-02T22:45:23.192754 #1] INFO -- : > cd /var/www/discourse && mkdir -p /shared/log/rails
I, [2025-02-02T22:45:23.197150 #1] INFO -- :
I, [2025-02-02T22:45:23.197819 #1] INFO -- : > cd /var/www/discourse && bash -c "touch -a /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log"
I, [2025-02-02T22:45:23.203436 #1] INFO -- :
I, [2025-02-02T22:45:23.204114 #1] INFO -- : > cd /var/www/discourse && bash -c "ln -s /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log /var/www/discourse/log"
I, [2025-02-02T22:45:23.211529 #1] INFO -- :
I, [2025-02-02T22:45:23.212212 #1] INFO -- : > cd /var/www/discourse && bash -c "mkdir -p /shared/{uploads,backups}"
I, [2025-02-02T22:45:23.219642 #1] INFO -- :
I, [2025-02-02T22:45:23.220367 #1] INFO -- : > cd /var/www/discourse && bash -c "ln -s /shared/{uploads,backups} /var/www/discourse/public"
I, [2025-02-02T22:45:23.226515 #1] INFO -- :
I, [2025-02-02T22:45:23.227303 #1] INFO -- : > cd /var/www/discourse && bash -c "mkdir -p /shared/tmp/{backups,restores}"
I, [2025-02-02T22:45:23.233846 #1] INFO -- :
I, [2025-02-02T22:45:23.234649 #1] INFO -- : > cd /var/www/discourse && bash -c "ln -s /shared/tmp/{backups,restores} /var/www/discourse/tmp"
I, [2025-02-02T22:45:23.240500 #1] INFO -- :
I, [2025-02-02T22:45:23.241253 #1] INFO -- : > cd /var/www/discourse && chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp
I, [2025-02-02T22:45:23.289442 #1] INFO -- :
I, [2025-02-02T22:45:23.290301 #1] INFO -- : > cd /var/www/discourse && [ ! -d public/plugins ] || find public/plugins/ -maxdepth 1 -xtype l -delete
I, [2025-02-02T22:45:23.294275 #1] INFO -- :
I, [2025-02-02T22:45:23.295672 #1] INFO -- : 在 /etc/service/unicorn/run 中将 # redis 替换为 if [ ! -d /shared/redis_data ]; then
install -d -m 0755 -o redis -g redis /shared/redis_data
fi
sv start redis || exit 1
I, [2025-02-02T22:45:23.297441 #1] INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/docker_manager.git
正在克隆到 'docker_manager'...
I, [2025-02-02T22:45:24.504403 #1] INFO -- :
I, [2025-02-02T22:45:24.505077 #1] INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-reactions.git
正在克隆到 'discourse-reactions'...
I, [2025-02-02T22:45:25.072150 #1] INFO -- :
I, [2025-02-02T22:45:25.073070 #1] INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-post-voting.git
正在克隆到 'discourse-post-voting'...
I, [2025-02-02T22:45:25.789224 #1] INFO -- :
I, [2025-02-02T22:45:25.789995 #1] INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-data-explorer.git
正在克隆到 'discourse-data-explorer'...
I, [2025-02-02T22:45:26.390324 #1] INFO -- :
I, [2025-02-02T22:45:26.391108 #1] INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-adplugin.git
正在克隆到 'discourse-adplugin'...
I, [2025-02-02T22:45:26.964332 #1] INFO -- :
I, [2025-02-02T22:45:26.965491 #1] INFO -- : > cp /var/www/discourse/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf
I, [2025-02-02T22:45:26.977834 #1] INFO -- :
I, [2025-02-02T22:45:26.979171 #1] INFO -- : > rm /etc/nginx/sites-enabled/default
I, [2025-02-02T22:45:26.984268 #1] INFO -- :
I, [2025-02-02T22:45:26.985268 #1] INFO -- : > mkdir -p /var/nginx/cache
I, [2025-02-02T22:45:26.992770 #1] INFO -- :
I, [2025-02-02T22:45:26.994550 #1] INFO -- : 在 /etc/nginx/nginx.conf 中将 pid /run/nginx.pid; 替换为 daemon off;
I, [2025-02-02T22:45:27.000792 #1] INFO -- : 在 /etc/nginx/conf.d/discourse.conf 中将 (?m-ix:upstream[^\}]+\}) 替换为 upstream discourse { server 127.0.0.1:3000; }
I, [2025-02-02T22:45:27.002168 #1] INFO -- : 在 /etc/nginx/conf.d/discourse.conf 中将 (?-mix:server_name.+$) 替换为 server_name _ ;
I, [2025-02-02T22:45:27.003338 #1] INFO -- : 在 /etc/nginx/conf.d/discourse.conf 中将 (?-mix:client_max_body_size.+$) 替换为 client_max_body_size $upload_size ;
I, [2025-02-02T22:45:27.004378 #1] INFO -- : 在 /etc/nginx/nginx.conf 中将 (?-mix:worker_connections.+$) 替换为 worker_connections $nginx_worker_connections ;
I, [2025-02-02T22:45:27.005212 #1] INFO -- : > echo "done configuring web"
I, [2025-02-02T22:45:27.009156 #1] INFO -- : done configuring web
I, [2025-02-02T22:45:27.010219 #1] INFO -- : > cd /var/www/discourse && gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,""); print $0 }' Gemfile.lock)
I, [2025-02-02T22:45:27.694151 #1] INFO -- :
I, [2025-02-02T22:45:27.694950 #1] INFO -- : > cd /var/www/discourse && find /var/www/discourse ! -user discourse -exec chown discourse {} \+
I, [2025-02-02T22:45:34.440815 #1] INFO -- :
I, [2025-02-02T22:45:34.441602 #1] INFO -- : > cd /var/www/discourse && if [ -f yarn.lock ]; then
if [ -d node_modules/.pnpm ]; then
echo "This version of Discourse uses yarn, but pnpm node_modules are preset. Cleaning up..."
find ./node_modules ./app/assets/javascripts/*/node_modules -mindepth 1 -maxdepth 1 -exec rm -rf {} +
fi
su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'
else
su discourse -c 'CI=1 pnpm install --frozen-lockfile && pnpm prune'
fi
I, [2025-02-02T22:45:58.232874 #1] INFO -- : 范围:所有 17 个工作区项目
锁定文件是最新的,跳过解析步骤
进度:已解析 1,已重用 0,已下载 0,已添加 0
包:+37 -8
+++++++++++++++++++++++++++++++++++++--------
进度:已解析 37,已重用 4,已下载 0,已添加 0
进度:已解析 37,已重用 22,已下载 0,已添加 0
进度:已解析 37,已重用 29,已下载 0,已添加 2
进度:已解析 37,已重用 29,已下载 0,已添加 3
进度:已解析 37,已重用 29,已下载 1,已添加 8
进度:已解析 37,已重用 29,已下载 1,已添加 9
进度:已解析 37,已重用 29,已下载 2,已添加 12
进度:已解析 37,已重用 29,已下载 6,已添加 25
进度:已解析 37,已重用 29,已下载 8,已添加 30
进度:已解析 37,已重用 29,已下载 8,已添加 35
进度:已解析 37,已重用 29,已下载 8,已添加 36,完成
.../node_modules/@swc/core postinstall$ node postinstall.js
.../node_modules/@swc/core postinstall: 完成
devDependencies:
- @discourse/lint-configs 2.3.0
+ @discourse/lint-configs 2.3.1
- @swc/core 1.10.11
+ @swc/core 1.10.12
- ember-template-lint 6.0.0
+ ember-template-lint 6.1.0
完成,耗时 18s
锁定文件是最新的,跳过解析步骤
已是最新
I, [2025-02-02T22:45:58.289829 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle install --jobs $(($(nproc) - 1)) --retry 3'
警告:Gem::Specification.reset 期间存在未解析或模糊的规范:
stringio (>= 0)
此 gem 的可用/已安装版本:
- 3.1.2
- 3.1.1
警告:清除未解析的规范。尝试 'gem cleanup <gem>'
如果这导致问题,请报告错误。
I, [2025-02-02T22:46:18.776290 #1] INFO -- : 正在从 https://rubygems.org/ 获取 gem 元数据........
正在获取 discourse-fonts 0.0.18
正在安装 discourse-fonts 0.0.18
正在获取 puma 6.6.0
正在安装带有原生扩展的 puma 6.6.0
正在获取 rails_failover 2.2.0
正在安装 rails_failover 2.2.0
捆绑完成!147 个 Gemfile 依赖项,现在安装了 189 个 gem。
'test' 和 'development' 组中的 gem 未安装。
捆绑的 gem 已安装到 `./vendor/bundle`
3 个你直接安装的 gemy depend on are looking for funding.
Run `bundle fund` for details
I, [2025-02-02T22:46:18.777164 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle clean'
I, [2025-02-02T22:46:19.529467 #1] INFO -- : Removing discourse-fonts (0.0.17)
Removing puma (6.5.0)
Removing rails_failover (2.1.1)
I, [2025-02-02T22:46:19.533137 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'LOAD_PLUGINS=0 bundle exec rake plugin:pull_compatible_all'
Symlinking fonts from discourse-fonts gem
I, [2025-02-02T22:46:26.972073 #1] INFO -- : discourse-adplugin is already at latest compatible version
discourse-data-explorer is already at latest compatible version
discourse-post-voting is already at latest compatible version
discourse-reactions is already at latest compatible version
docker_manager is already at latest compatible version
I, [2025-02-02T22:46:26.974297 #1] INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2025-02-02T22:46:26.985679 #1] INFO -- : > sleep 10
464:C 02 Feb 2025 22:46:27.008 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
464:C 02 Feb 2025 22:46:27.009 # Redis version=7.0.15, bits=64, commit=00000000, modified=0, pid=464, just started
464:C 02 Feb 2025 22:46:27.009 # Configuration loaded
464:M 02 Feb 2025 22:46:27.010 * monotonic clock: POSIX clock_gettime
464:M 02 Feb 2025 22:46:27.010 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
464:M 02 Feb 2025 22:46:27.010 # Failed listening on port 6379 (TCP), aborting.
I, [2025-02-02T22:46:36.993636 #1] INFO -- :
I, [2025-02-02T22:46:37.000816 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
URGENT: Failed to initialize site default: ActiveRecord::ConnectionNotEstablished connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused
Is the server running locally and accepting connections on that socket?
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:69:in `rescue in new_client'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:57:in `new_client'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:982:in `connect'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:994:in `reconnect'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:662:in `block in reconnect!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:661:in `reconnect!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:763:in `block in verify!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:754:in `verify!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:771:in `connect!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:977:in `block in with_raw_connection'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:976:in `with_raw_connection'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql/quoting.rb:128:in `quote_string'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract/quoting.rb:76:in `quote'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql/quoting.rb:122:in `quote'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql/schema_statements.rb:1099:in `quoted_scope'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql/schema_statements.rb:1076:in `data_source_sql'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:60:in `table_exists?'
/var/www/discourse/lib/site_settings/db_provider.rb:58:in `table_exists?'
/var/www/discourse/lib/site_settings/db_provider.rb:14:in `all'
/var/www/discourse/lib/site_settings/defaults_provider.rb:30:in `db_all'
/var/www/discourse/lib/site_setting_extension.rb:360:in `block in refresh!'
/var/www/discourse/lib/site_setting_extension.rb:353:in `synchronize'
/var/www/discourse/lib/site_setting_extension.rb:353:in `refresh!'
/var/www/discourse/config/initializers/005-site_settings.rb:20:in `block (2 levels) in <main>'
/var/www/discourse/lib/freedom_patches/rails_multisite.rb:16:in `block in safe_each_connection'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rails_multisite-6.1.0/lib/rails_multisite/connection_management/null_instance.rb:49:in `with_connection'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rails_multisite-6.1.0/lib/rails_multisite/connection_management/null_instance.rb:36:in `each_connection'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rails_multisite-6.1.0/lib/rails_multisite/connection_management.rb:21:in `each_connection'
/var/www/discourse/lib/freedom_patches/rails_multisite.rb:9:in `each_active_connection'
/var/www/discourse/lib/freedom_patches/rails_multisite.rb:14:in `safe_each_connection'
/var/www/discourse/config/initializers/005-site_settings.rb:18:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:407:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:407:in `block in make_lambda'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:179:in `block in call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:668:in `block (2 levels) in default_terminator'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:667:in `catch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:667:in `block in default_terminator'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:180:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:559:in `block in invoke_before'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:559:in `each'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:559:in `invoke_before'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:109:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/reloader.rb:96:in `prepare!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application/finisher.rb:74:in `block in <module:Finisher>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/initializable.rb:32:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/initializable.rb:32:in `run'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/usr/local/lib/ruby/3.3.0/tsort.rb:231:in `block in tsort_each'
/usr/local/lib/ruby/3.3.0/tsort.rb:353:in `block (2 levels) in each_strongly_connected_component'
/usr/local/lib/ruby/3.3.0/tsort.rb:434:in `each_strongly_connected_component_from'
/usr/local/lib/ruby/3.3.0/tsort.rb:352:in `block in each_strongly_connected_component'
/usr/local/lib/ruby/3.3.0/tsort.rb:350:in `each'
/usr/local/lib/ruby/3.3.0/tsort.rb:350:in `call'
/usr/local/lib/ruby/3.3.0/tsort.rb:350:in `each_strongly_connected_component'
/usr/local/lib/ruby/3.3.0/tsort.rb:229:in `tsort_each'
/usr/local/lib/ruby/3.3.0/tsort.rb:208:in `tsort_each'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/initializable.rb:60:in `run_initializers'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application.rb:435:in `initialize!'
/var/www/discourse/config/environment.rb:7:in `<main>'
/usr/local/lib/ruby/3.3.0/bundled_gems.rb:69:in `require'
/usr/local/lib/ruby/3.3.0/bundled_gems.rb:69:in `block (2 levels) in replace_require'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.7.1/lib/zeitwerk/core_ext/kernel.rb:34:in `require'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application.rb:411:in `require_environment!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application.rb:559:in `block in run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `block in execute'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `each'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `execute'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:241:in `each'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:241:in `invoke_prerequisites'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:241:in `each'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:241:in `invoke_prerequisites'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/task.rb:188:in `invoke'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:188:in `invoke_task'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `block (2 levels) in top_level'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `each'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `block in top_level'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:147:in `run_with_threads'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:132:in `top_level'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:83:in `block in run'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:214:in `standard_exception_handling'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/lib/rake/application.rb:80:in `run'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/bin/rake:25:in `load'
/var/www/discourse/vendor/bundle/ruby/3.3.0/bin/rake:25:in `<top (required)>'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/cli/exec.rb:58:in `load'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/cli/exec.rb:23:in `run'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/cli.rb:455:in `exec'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/cli.rb:35:in `dispatch'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/cli.rb:29:in `start'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/exe/bundle:28:in `block in <top (required)>'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/local/lib/ruby/gems/3.3.0/gems/bundler-2.5.18/exe/bundle:20:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
rake aborted!
ActiveRecord::ConnectionNotEstablished: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused (ActiveRecord::ConnectionNotEstablished)
Is the server running locally and accepting connections on that socket?
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:69:in `rescue in new_client'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:57:in `new_client'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:982:in `connect'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:994:in `reconnect'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:662:in `block in reconnect!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:661:in `reconnect!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:763:in `block in verify!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:754:in `verify!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:771:in `connect!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:977:in `block in with_raw_connection'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:976:in `with_raw_connection'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql/quoting.rb:128:in `quote_string'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract/quoting.rb:76:in `quote'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql/quoting.rb:122:in `quote'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql/schema_statements.rb:1099:in `quoted_scope'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql/schema_statements.rb:1076:in `data_source_sql'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:60:in `table_exists?'
/var/www/discourse/config/initializers/006-ensure_login_hint.rb:8:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:407:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:407:in `block in make_lambda'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:179:in `block in call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:668:in `block (2 levels) in default_terminator'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:667:in `catch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:667:in `block in default_terminator'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:180:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:559:in `block in invoke_before'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:559:in `each'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:559:in `invoke_before'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:109:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/reloader.rb:96:in `prepare!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application/finisher.rb:74:in `block in <module:Finisher>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/initializable.rb:32:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/initializable.rb:32:in `run'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/initializable.rb:60:in `run_initializers'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application.rb:435:in `initialize!'
/var/www/discourse/config/environment.rb:7:in `<main>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.7.1/lib/zeitwerk/core_ext/kernel.rb:34:in `require'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application.rb:411:in `require_environment!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application.rb:559:in `block in run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Caused by:
PG::ConnectionBad: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused (PG::ConnectionBad)
Is the server running locally and accepting connections on that socket?
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/pg-1.5.9/lib/pg/connection.rb:837:in `connect_start'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/pg-1.5.9/lib/pg/connection.rb:837:in `connect_to_hosts'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/pg-1.5.9/lib/pg/connection.rb:772:in `new'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/pg-1.5.9/lib/pg.rb:63:in `connect'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:58:in `new_client'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:982:in `connect'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:994:in `reconnect'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:662:in `block in reconnect!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:661:in `reconnect!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:763:in `block in verify!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:754:in `verify!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:771:in `connect!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:977:in `block in with_raw_connection'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:976:in `with_raw_connection'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql/quoting.rb:128:in `quote_string'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract/quoting.rb:76:in `quote'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql/quoting.rb:122:in `quote'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql/schema_statements.rb:1099:in `quoted_scope'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/postgresql/schema_statements.rb:1076:in `data_source_sql'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:60:in `table_exists?'
/var/www/discourse/config/initializers/006-ensure_login_hint.rb:8:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:407:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:407:in `block in make_lambda'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:179:in `block in call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:668:in `block (2 levels) in default_terminator'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:667:in `catch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:667:in `block in default_terminator'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:180:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:559:in `block in invoke_before'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:559:in `each'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:559:in `invoke_before'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/callbacks.rb:109:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/reloader.rb:96:in `prepare!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application/finisher.rb:74:in `block in <module:Finisher>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/initializable.rb:32:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/initializable.rb:32:in `run'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/initializable.rb:60:in `run_initializers'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application.rb:435:in `initialize!'
/var/www/discourse/config/environment.rb:7:in `<main>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.7.1/lib/zeitwerk/core_ext/kernel.rb:34:in `require'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application.rb:411:in `require_environment!'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application.rb:559:in `block in run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => db:migrate => db:load_config => environment
(See full trace by running task with --trace)
I, [2025-02-02T22:46:42.249230 #1] INFO -- :
I, [2025-02-02T22:46:42.277834 #1] INFO -- : Terminating async processes
I, [2025-02-02T22:46:42.278274 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 83
83:signal-handler (1738536402) Received SIGTERM scheduling shutdown...
83:M 02 Feb 2025 22:46:42.297 # User requested shutdown...
83:M 02 Feb 2025 22:46:42.297 * Saving the final RDB snapshot before exiting.
83:M 02 Feb 2025 22:46:43.747 * DB saved on disk
83:M 02 Feb 2025 22:46:43.747 # Redis is now ready to exit, bye bye...
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 467 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "tag"=>"migrate", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap failed with exit code 1
** 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.