dylanb
(Dylan Burkhardt)
2022 年 10 月 12 日午後 12:17
1
しばらくの間、Discourse のアップグレードを行っていませんでしたが、ようやく実施しました。Web アプリから試したところエラーが発生し、サーバーにアクセスしてコンテナの再構築を試みましたが、いくつかのスペースの問題が発生しました。VM を拡張してアプリの再構築を試みたところ、エラーが発生し、コンテナを起動できなくなりました。
指示に従って discourse-doctor を実行したところ、これが主なエラーのようです。
2022-10-12 12:12:37.418 UTC [1669] LOG: database system was shut down at 2022-10-12 12:09:46 UTC
2022-10-12 12:12:37.452 UTC [1666] LOG: database system is ready to accept connections
I, [2022-10-12T12:12:42.229967 #1] INFO -- :
I, [2022-10-12T12:12:42.230254 #1] INFO -- : > su postgres -c 'createdb discourse' || true
Error: PostgreSQL version 13 is not installed
I, [2022-10-12T12:12:42.270949 #1] INFO -- :
I, [2022-10-12T12:12:42.271177 #1] INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
psql: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
I, [2022-10-12T12:12:42.323520 #1] INFO -- :
I, [2022-10-12T12:12:42.323738 #1] INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
psql: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
I, [2022-10-12T12:12:42.375939 #1] INFO -- :
I, [2022-10-12T12:12:42.376152 #1] INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
psql: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
I, [2022-10-12T12:12:42.429960 #1] INFO -- :
I, [2022-10-12T12:12:42.430282 #1] INFO -- : Terminating async processes
I, [2022-10-12T12:12:42.430313 #1] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgr es:ssl-cert /usr/lib/postgresql/10/bin/postmaster -D /etc/postgresql/10/main pid: 1666
2022-10-12 12:12:42.430 UTC [1666] LOG: received fast shutdown request
2022-10-12 12:12:42.445 UTC [1666] LOG: aborting any active transactions
2022-10-12 12:12:42.446 UTC [1666] LOG: worker process: logical replication launcher (PID 1675) exited with exit code 1
2022-10-12 12:12:42.447 UTC [1670] LOG: shutting down
2022-10-12 12:12:42.562 UTC [1666] LOG: database system is shut down
FAILED
--------------------
Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 1699 exit 2>
Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params "su postgres -c 'psql $db_name -c \\\"alter schema public owner to $db_user;\\\"'"
bootstrap failed with exit code 2
** 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.
4f664b8bc922e1b17fb754c66f5f729d1a78d609d10fe228677248e3cace99bb
==================== END REBUILD LOG ====================
Failed to rebuild app.
復旧のためのヒントはありますか?
pfaffman
(Jay Pfaffman)
2022 年 10 月 12 日午後 12:19
2
最後にアップグレードしてからどのくらい経ちましたか? PostgreSQL 13 アップデート に従いましたか?
複数回再構築を試しましたか?
dylanb
(Dylan Burkhardt)
2022 年 10 月 12 日午後 12:49
3
どうにかこうにかすべて動作するようになりました。手動で古いPSQLを強制していたようです。しかし、フォーラム全体が消えてしまいました。 今はただの空白のフォーラムです。
バックアップから復元して、うまくいくことを願っています。
RGJ
(Richard - Communiteq)
2022 年 10 月 12 日午後 12:50
4
(非推奨の)ゲストゲートプラグインを削除し、テーマコンポーネントに置き換える必要があります。
Hello This theme component is created from Guest Gate (Sign Up Popup Plugin) . It can lock topics for anon visitors with a modal and force them to Sign Up or Login. The component can be use for an alert modal, encouraging visitors to sign up but allowing them to close the modal (for this, leave the dismissable false setting unchecked). Options include changing the number of topics that can be viewed before the modal is displayed.
[Screenshot 2022-04-23 at 22.05.29]
Tip: If you use the …
「いいね!」 5
dylanb
(Dylan Burkhardt)
2022 年 10 月 12 日午後 1:32
5
復元を開始しましたが、動作中にログアウトしてしまいました。
復元が完了したかどうか追跡する方法はありますか?サイトに多数のエラー(SSO経由でログインできないなど)が発生しており、完了するまで何もしたくありません。
ログに次のエラーが表示されています。
NoMethodError (undefined method `external_id' for #<Topic:0x00007f6463504ac8>
Did you mean? extend)
(eval):2:in `external_id'
app/serializers/topic_view_serializer.rb:109:in `include_external_id?'
(eval):36:in `_fast_attributes'
app/controllers/application_controller.rb:545:in `render_json_dump'
app/controllers/topics_controller.rb:1204:in `block (2 levels) in perform_show_response'
app/controllers/topics_controller.rb:1194:in `perform_show_response'
app/controllers/topics_controller.rb:169:in `show'
app/controllers/application_controller.rb:413:in `block in with_resolved_locale'
app/controllers/application_controller.rb:413:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:71:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:366:in `call'
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/enforce_hostname.rb:23:in `call'
lib/middleware/request_tracker.rb:202:in `call'
activemodel (7.0.3.1) lib/active_model/attribute_methods.rb:458:in `method_missing'
(eval):2:in `external_id'
app/serializers/topic_view_serializer.rb:109:in `include_external_id?'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:375:in `include?'
(eval):36:in `_fast_attributes'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:468:in `rescue in attributes'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:455:in `attributes'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:480:in `_serializable_hash'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:359:in `serializable_hash'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:347:in `as_json'
activesupport (7.0.3.1) lib/active_support/json/encoding.rb:22:in `encode'
activesupport (7.0.3.1) lib/active_support/json/encoding.rb:22:in `encode'
activesupport (7.0.3.1) lib/active_support/core_ext/object/json.rb:42:in `to_json'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:331:in `to_json'
multi_json (1.15.0) lib/multi_json/adapters/oj.rb:56:in `dump'
multi_json (1.15.0) lib/multi_json/adapters/oj.rb:56:in `dump'
multi_json (1.15.0) lib/multi_json/adapter.rb:25:in `dump'
multi_json (1.15.0) lib/multi_json.rb:139:in `dump'
app/controllers/application_controller.rb:545:in `render_json_dump'
app/controllers/topics_controller.rb:1204:in `block (2 levels) in perform_show_response'
actionpack (7.0.3.1) lib/action_controller/metal/mime_responds.rb:214:in `respond_to'
app/controllers/topics_controller.rb:1194:in `perform_show_response'
app/controllers/topics_controller.rb:169:in `show'
plugins/discourse-category-lockdown/plugin.rb:65:in `show'
actionpack (7.0.3.1) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack (7.0.3.1) lib/abstract_controller/base.rb:215:in `process_action'
actionpack (7.0.3.1) lib/action_controller/metal/rendering.rb:53:in `process_action'
actionpack (7.0.3.1) lib/abstract_controller/callbacks.rb:234:in `block in process_action'
activesupport (7.0.3.1) lib/active_support/callbacks.rb:118:in `block in run_callbacks'
app/controllers/application_controller.rb:413:in `block in with_resolved_locale'
app/controllers/application_controller.rb:413:in `with_resolved_locale'
activesupport (7.0.3.1) lib/active_support/callbacks.rb:127:in `block in run_callbacks'
activesupport (7.0.3.1) lib/active_support/callbacks.rb:138:in `run_callbacks'
actionpack (7.0.3.1) lib/abstract_controller/callbacks.rb:233:in `process_action'
actionpack (7.0.3.1) lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack (7.0.3.1) lib/action_controller/metal/instrumentation.rb:67:in `block in process_action'
activesupport (7.0.3.1) lib/active_support/notifications.rb:206:in `block in instrument'
activesupport (7.0.3.1) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport (7.0.3.1) lib/active_support/notifications.rb:206:in `instrument'
actionpack (7.0.3.1) lib/action_controller/metal/instrumentation.rb:66:in `process_action'
actionpack (7.0.3.1) lib/action_controller/metal/params_wrapper.rb:259:in `process_action'
activerecord (7.0.3.1) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
actionpack (7.0.3.1) lib/abstract_controller/base.rb:151:in `process'
actionview (7.0.3.1) lib/action_view/rendering.rb:39:in `process'
rack-mini-profiler (3.0.0) lib/mini_profiler/profiling_methods.rb:85:in `block in profile_method'
actionpack (7.0.3.1) lib/action_controller/metal.rb:188:in `dispatch'
actionpack (7.0.3.1) lib/action_controller/metal.rb:251:in `dispatch'
actionpack (7.0.3.1) lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
actionpack (7.0.3.1) lib/action_dispatch/routing/route_set.rb:32:in `serve'
actionpack (7.0.3.1) lib/action_dispatch/journey/router.rb:50:in `block in serve'
actionpack (7.0.3.1) lib/action_dispatch/journey/router.rb:32:in `each'
actionpack (7.0.3.1) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (7.0.3.1) lib/action_dispatch/routing/route_set.rb:852:in `call'
lib/middleware/omniauth_bypass_middleware.rb:71:in `call'
rack (2.2.4) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.2.4) lib/rack/conditional_get.rb:27:in `call'
rack (2.2.4) lib/rack/head.rb:12:in `call'
actionpack (7.0.3.1) lib/action_dispatch/http/permissions_policy.rb:38:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:366:in `call'
rack (2.2.4) lib/rack/session/abstract/id.rb:266:in `context'
rack (2.2.4) lib/rack/session/abstract/id.rb:260:in `call'
actionpack (7.0.3.1) lib/action_dispatch/middleware/cookies.rb:697:in `call'
actionpack (7.0.3.1) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
activesupport (7.0.3.1) lib/active_support/callbacks.rb:99:in `run_callbacks'
actionpack (7.0.3.1) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (7.0.3.1) lib/action_dispatch/middleware/debug_exceptions.rb:28:in `call'
actionpack (7.0.3.1) lib/action_dispatch/middleware/show_exceptions.rb:26:in `call'
logster (2.11.3) lib/logster/middleware/reporter.rb:43:in `call'
railties (7.0.3.1) lib/rails/rack/logger.rb:40:in `call_app'
railties (7.0.3.1) lib/rails/rack/logger.rb:27:in `call'
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
actionpack (7.0.3.1) lib/action_dispatch/middleware/remote_ip.rb:93:in `call'
request_store (1.5.1) lib/request_store/middleware.rb:19:in `call'
actionpack (7.0.3.1) lib/action_dispatch/middleware/request_id.rb:26:in `call'
lib/middleware/enforce_hostname.rb:23:in `call'
rack (2.2.4) lib/rack/method_override.rb:24:in `call'
actionpack (7.0.3.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
rack (2.2.4) lib/rack/sendfile.rb:110:in `call'
actionpack (7.0.3.1) lib/action_dispatch/middleware/host_authorization.rb:131:in `call'
rack-mini-profiler (3.0.0) lib/mini_profiler/profiler.rb:249:in `call'
message_bus (4.2.0) lib/message_bus/rack/middleware.rb:60:in `call'
lib/middleware/request_tracker.rb:202:in `call'
railties (7.0.3.1) lib/rails/engine.rb:530:in `call'
railties (7.0.3.1) lib/rails/railtie.rb:226:in `public_send'
railties (7.0.3.1) lib/rails/railtie.rb:226:in `method_missing'
rack (2.2.4) lib/rack/urlmap.rb:74:in `block in call'
rack (2.2.4) lib/rack/urlmap.rb:58:in `each'
rack (2.2.4) lib/rack/urlmap.rb:58:in `call'
unicorn (6.1.0) lib/unicorn/http_server.rb:634:in `process_client'
unicorn (6.1.0) lib/unicorn/http_server.rb:739:in `worker_loop'
unicorn (6.1.0) lib/unicorn/http_server.rb:547:in `spawn_missing_workers'
unicorn (6.1.0) lib/unicorn/http_server.rb:143:in `start'
unicorn (6.1.0) bin/unicorn:128:in `<top (required)>'
vendor/bundle/ruby/2.7.0/bin/unicorn:25:in `load'
vendor/bundle/ruby/2.7.0/bin/unicorn:25:in `<main>'
うーん、ゲストゲートを無効にし、もう一度再構築したら、稼働しました。皆さん、ありがとうございました。
「いいね!」 4
system
(system)
クローズされました:
2022 年 11 月 11 日午後 1:33
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.