Yt.w
2025 年2 月 24 日 17:39
1
你好,有人可以帮我吗?
我,[2025-02-24T17:35:41.516926 #1] 信息 -- : 正在终止异步进程
我,[2025-02-24T17:35:41.516987 #1] 信息 -- : 发送 INT 到 HOME=/var/lib/postgresql 用户=postgres 执行 chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/15/bin/postmaster -D /etc/postgresql/15/main pid: 38
105:信号处理器 (1740418541) 收到 SIGTERM,安排关机...
我,[2025-02-24T17:35:41.517067 #1] 信息 -- : 发送 TERM 到执行 chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 105
2025-02-24 17:35:41.517 UTC [38] 日志: 收到快速关机请求
2025-02-24 17:35:41.518 UTC [38] 日志: 中断任何活动的事务
2025-02-24 17:35:41.521 UTC [38] 日志: 后台工作 "逻辑复制启动器" (PID 52) 以退出代码 1 退出
105:M 2025 年 2 月 24 日 17:35:41.523 # 用户请求关机...
105:M 2025 年 2 月 24 日 17:35:41.523 * 在退出前保存最终的 RDB 快照。
2025-02-24 17:35:41.525 UTC [47] 日志: 正在关机
2025-02-24 17:35:41.538 UTC [47] 日志: 检查点开始:立即关机
2025-02-24 17:35:41.550 UTC [47] 日志: 检查点完成:写入了 0 个缓冲区 (0.0%);添加了 0 个 WAL 文件,删除了 0 个,回收了 0 个;写入时间=0.005 秒,同步=0.001 秒,总计=0.025 秒;同步文件=0,最长=0.000 秒,平均=0.000 秒;距离=0 kB,估算=1122 kB
2025-02-24 17:35:41.581 UTC [38] 日志: 数据库系统已关机
105:M 2025 年 2 月 24 日 17:35:41.657 * 数据库已保存到磁盘
105:M 2025 年 2 月 24 日 17:35:41.657 * Redis 现已准备退出,再见...
失败
--------------------
Pups::ExecError: cd /var/www/discourse && sudo -E -u discourse bundle exec rake s3:upload_assets 失败,返回 #Process::Status: pid 2845 退出码 1
失败位置:/usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
执行失败,参数为 {"cd"=>"$home", "cmd"=>["sudo -E -u discourse bundle exec rake s3:upload_assets", "sudo -E -u discourse bundle exec rake s3:expire_missing_assets"]}
引导失败,退出码为 1
** 引导失败 **请向上滚动,查看早期错误信息,可能会有多条。
./discourse-doctor 可能有助于诊断问题。
c08b2ad74e9f1171f7677979af4e41a46be92877a0783350b2f020359895a431
Yt.w
2025 年2 月 24 日 18:22
3
我, [2025-02-24T18:17:21.167441 #1] 信息 -- : cd /var/www/discourse 6 sudo -E -u discourse bundle exec rake s3:upload_assets
rake 异常终止!
Aws::S3::Errors::InvalidArgument: 收到此 API 调用不支持的头 'x-amz-checksum-crc32'。 (Aws::S3::Errors::InvalidArgument)
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-core-3.219.0/lib/seahorse/client/plugins/raise_response_errors.rb:17:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/plugins/sse_cpk.rb:24:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/plugins/dualstack.rb:21:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/plugins/accelerate.rb:43:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-core-3.219.0/lib/aws-sdk-core/plugins/checksum_algorithm.rb:169:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-core-3.219.0/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:16:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-core-3.219.0/lib/aws-sdk-core/plugins/invocation_id.rb:16:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-core-3.219.0/lib/aws-sdk-core/plugins/idempotency_token.rb:19:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-core-3.219.0/lib/aws-sdk-core/plugins/param_converter.rb:26:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-core-3.219.0/lib/seahorse/client/plugins/request_callback.rb:89:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-core-3.219.0/lib/aws-sdk-core/plugins/response_paging.rb:12:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-core-3.219.0/lib/seahorse/client/plugins/response_target.rb:24:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-core-3.219.0/lib/aws-sdk-core/plugins/telemetry.rb:39:in `block in call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-core-3.219.0/lib/aws-sdk-core/telemetry/no_op.rb:29:in `in_span'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-core-3.219.0/lib/aws-sdk-core/plugins/telemetry.rb:53:in `span_wrapper'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-core-3.219.0/lib/aws-sdk-core/plugins/telemetry.rb:39:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-core-3.219.0/lib/seahorse/client/request.rb:72:in `send_request'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/client.rb:17315:in `put_object'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/object.rb:2994:in `block in put'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-core-3.219.0/lib/aws-sdk-core/plugins/user_agent.rb:69:in `metric'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-s3-1.182.0/lib/aws-sdk-s3/object.rb:2993:in `put'
/var/www/discourse/lib/s3_helper.rb:82:in `upload'
/var/www/discourse/lib/tasks/s3.rake:41:in `block in upload'
/var/www/discourse/lib/tasks/s3.rake:41:in `open'
/var/www/discourse/lib/tasks/s3.rake:41:in `upload'
/var/www/discourse/lib/tasks/s3.rake:197:in `block (2 levels) in main'
/va
```{"content":"r/www/discourse/lib/tasks/s3.rake:197: in `each'\n/var/www/discourse/lib/tasks/s3.rake:197: in `block in <main>'\n/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/exe/rake:27: in `<top (required)>'\n/usr/local/bin/bundle:25: in `load'\n/usr/local/bin/bundle:25: in `<main>'\n任务: TOP => s3:upload_assets\n(通过添加 --trace 运行任务可查看完整追踪)\nI, [2025-02-24T18:17:32.242989 #1] INFO -- : 安装 CORS 规则...\n跳过\n 跳过:assets/break_string-cc617154cd957804f2f6a1f3bc68258c9cdca3d4b9a322bf777d145fed04790e.js\n跳过:assets/break_string-cc617154cd957804f2f6a1f3bc68258c9cdca3d4b9a322bf777d145fed04790e.br.js\n跳过:assets/break_string-cc617154cd957804f2f6a1f3bc68258c9cdca3d4b9a322bf777d145fed04790e.gz.js\n跳过:assets/break_string-cc617154cd957804f2f6a1f3bc68258c9cdca3d4b9a322bf777d145fed04790e.js.map\n跳过:assets/service-worker-9312562dd27728d5fd952130f6bb72f4fd253fec8ef551a6e7c3c8ecd9b256da.js\n跳过:assets/service-worker-9312562dd27728d5fd952130f6bb72f4fd253fec8ef551a6e7c3c8ecd9b256da.br.js\n跳过:assets/service-worker-9312562dd27728d5fd952130f6bb72f4fd253fec8ef551a6e7c3c8ecd9b256da.gz.js\n跳过:assets/service-worker-9312562dd27728d5fd952130f6bb72f4fd253fec8ef551a6e7c3c8ecd9b256da.js.map\n跳过:assets/locales/i18n-3b40e842fd72b9bcc74ea83e094c823cd9ca535e4ecc5e78722e6f99d3656137.js\n跳过:assets/locales/i18n-3b40e842fd72b9bcc74ea83e094c823cd9ca535e4ecc5e78722e6f99d3656137.br.js\n跳过:assets/locales/i18n-3b40e842fd72b9bcc74ea83e094c823cd9ca535e4ecc5e78722e6f99d3656137.gz.js\n跳过:assets/scripts/discourse-test-listen-boot-c65930f97c9935680e942f8e32df616cc91ab7c9371b86db6e5ddf9ad868ae22.js\n跳过:assets/scripts/discourse-test-listen-boot-c65930f97c9935680e942f8e32df616cc91ab7c9371b86db6e5ddf9ad868ae22.br.js\n跳过:assets/scripts/disco..."}
Jagster
(Jakke Lehtonen)
2025 年2 月 24 日 18:30
4
我不确定,但你的 AWS 设置看起来有些问题。至少是这样。
Yt.w
2025 年2 月 24 日 18:33
5
@Falco 我猜最新版本的 discourse 不再支持 BackBlaze 了
我发现了这条推文,不确定是否直接相关:https://x.com/jkostolansky/status/1880623631145030054
opened 02:12AM - 16 Jan 25 UTC
closed 04:53PM - 18 Jun 25 UTC
announcement
In aws-sdk-s3 v1.178.0, we released changes to the S3 client that adopts new def… ault integrity protections. For more information on default integrity behavior, please refer to the official [SDK documentation](https://docs.aws.amazon.com/sdkref/latest/guide/feature-dataintegrity.html). In SDK releases from this version on, clients default to enabling an additional checksum on all Put calls and enabling validation on Get calls.
You can disable default integrity protections for S3. We do not recommend this because checksums are important to S3 integrity posture. Integrity protections can be disabled by setting the config flag to `WHEN_REQUIRED`, or by using the related AWS shared config file settings or environment variables.
**Disclaimer**: the AWS SDKs and CLI are designed for usage with official AWS services. We may introduce and enable new features by default, such as these new [default integrity protections](https://aws.amazon.com/blogs/aws/introducing-default-data-integrity-protections-for-new-objects-in-amazon-s3/), prior to them being supported or otherwise handled by third-party service implementations. You can disable the new behavior with the `WHEN_REQUIRED` value for the `request_checksum_calculation` and `response_checksum_validation` configuration options covered in [Data Integrity Protections for Amazon S3](https://docs.aws.amazon.com/sdkref/latest/guide/feature-dataintegrity.html).
3 个赞
Yt.w
2025 年2 月 24 日 18:36
7
是的,我猜那就是问题所在
Aws::S3::Errors::InvalidArgument: Unsupported header 'x-amz-checksum-crc32' received for this API call. (Aws::S3::Errors::InvalidArgument)
有什么方法可以手动降级 aws-sdk-s3 gem 吗?
pfaffman
(Jay Pfaffman)
2025 年2 月 24 日 18:37
8
可能是你的 S3 设置有问题?密钥错误?信用卡过期?
你的 S3 配置了多久了?
Yt.w
2025 年2 月 24 日 18:42
10
b2 不支持 x-amz-checksum-crc32。我猜这就是原因。
Falco
(Falco)
2025 年2 月 24 日 18:46
11
尝试在您的环境变量中添加
AWS_REQUEST_CHECKSUM_CALCULATION: WHEN_REQUIRED
AWS_RESPONSE_CHECKSUM_VALIDATION: WHEN_REQUIRED
2 个赞
Yt.w
2025 年2 月 24 日 19:00
12
你好,它仍然给我错误
env:
DISCOURSE_ENABLE_CORS: true
AWS_REQUEST_CHECKSUM_CALCULATION: WHEN_REQUIRED
AWS_RESPONSE_CHECKSUM_VALIDATION: WHEN_REQUIRED
DISCOURSE_USE_S3: true
rake aborted!
Aws::S3::Errors::InvalidArgument: 收到不支持的头部 'x-amz-checksum-crc32' 用于此 API 调用。 (Aws::S3::Errors::InvalidArgument)
FAILED
--------------------
Pups::ExecError: 在 /var/www/discourse 下执行命令失败 使用 sudo -E -u discourse bundle exec rake s3:expire_missing_assets 失败,返回状态 #<Process::Status: pid 2900 退出码 1>
失败位置:/usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
执行失败,参数为 {"cd"=>"$home", "cmd"=>["sudo -E -u discourse bundle exec rake s3:upload_assets", "sudo -E -u discourse bundle exec rake s3:expire_missing_assets"]}
引导失败,退出代码为 1
** 启动引导失败 ** 请向上滚动查看之前的错误信息,可能不止一个。
./discourse-doctor 可能有助于诊断问题。
1 个赞
Falco
(Falco)
2025 年2 月 24 日 20:13
13
据报道,AWS SDK 不会为 DELETE 操作遵守这些 ENVs,因此您需要暂时删除
- sudo -E -u discourse bundle exec rake s3:expire_missing_assets
行。
3 个赞
pfaffman
(Jay Pfaffman)
2025 年2 月 24 日 21:07
14
1 个赞
Falco
(Falco)
2025 年2 月 24 日 21:08
15
确认它有效之后?当然。
另外,它将影响大多数提供商,因此大多数克隆都需要进行调整。
2 个赞
Yt.w
2025 年2 月 25 日 04:06
16
谢谢,我将在维护期间尝试,
删除
- sudo -E -u discourse bundle exec rake s3:expire_missing_assets
会有什么副作用吗?
Yt.w
2025 年2 月 25 日 15:45
18
那么,如果我不手动删除资产,理论上它会无限扩展吗?
Yt.w
2025 年2 月 25 日 15:50
20
这听起来不是一个非常严重的问题,但有什么办法可以解决吗?
上一个版本没有出现问题,对吧?