いや、そんなことはありません。18TB空きがあります…(笑)。
承知いたしました。
./launcher rebuild app
を実行しましたが、以下のエラーが表示されます。
I, [2022-04-29T16:46:00.618865 #1] INFO -- : \u003e cd /var/www/discourse \u0026\u0026 [ ! -d 'node_modules' ] || su discourse -c 'yarn install --production \u0026\u0026 yarn cache clean'
warning Skipping preferred cache folder "/home/discourse/.cache/yarn" because it is not writable.
warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-1000".
warning Cannot find a suitable global folder. Tried these: "/usr/local, /home/discourse/.yarn"
warning Skipping preferred cache folder "/home/discourse/.cache/yarn" because it is not writable.
warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-1000".
warning Cannot find a suitable global folder. Tried these: "/usr/local, /home/discourse/.yarn"
warning Skipping preferred cache folder "/home/discourse/.cache/yarn" because it is not writable.
warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-1000".
そして、以下のメッセージで終了します。
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse \u0026\u0026 su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #\u003cProcess::Status: pid 720 exit 1\u003e
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 {\"cd\"=\u003e\"$home\", \"hook\"=\u003e\"assets_precompile\", \"cmd\"=\u003e[\"su discourse -c 'bundle exec rake themes:update assets:precompile'\"]}\nbootstrap 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.
922dd1e5bd9c3ec682864fff915db30c7b69626a80ec8100a44e8caf88565d1c7e
/home/discourse は 777 に設定されているにもかかわらず、以下のエラーが発生します。
warning Skipping preferred cache folder "/home/discourse/.cache/yarn" because it is not writable.
warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-1000".
warning Cannot find a suitable global folder. Tried these: "/usr/local, /home/discourse/.yarn"
node:fs:1336
handleErrorFromBinding(ctx);
^
Error: EACCES: permission denied, mkdir '/home/discourse/.config/configstore'
You don't have access to this file.
また、以下のエラーも表示されます。/home/discourse は 777 に設定されており、それでもアクセス権がないようです。どのように所有権とアクセス権を設定すればよいのでしょうか? discourse ユーザーはコンテナ内にのみ存在します。
I, [2022-04-29T16:45:47.705749 #1] INFO -- : \u003e cd /var/www/discourse \u0026\u0026 su discourse -c 'bundle install --deployment --retry 3 --jobs 4 --verbose --without test development'
[DEPRECATED] The `--deployment` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local deployment 'true'`, and stop using this flag
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local without 'test development'`, and stop using this flag
`/home/discourse` is not writable.
他に表示されるエラーは、ポート 6379 に関するエラーのみです。ポートを開く際に何か見落としていることはありますか?
130:M 29 Apr 2022 16:45:10.722 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
130:M 29 Apr 2022 16:45:10.722 # Failed listening on port 6379 (TCP), aborting.
Updating files: 100% (31051/31051), done.
その後、フォーラムは停止していましたが、discourse-doctor を実行しました。以下のメッセージにもかかわらず、フォーラムは再起動されました。
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse \u0026\u0026 su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #\u003cProcess::Status: pid 722 exit 1\u003e
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 {\"cd\"=\u003e\"$home\", \"hook\"=\u003e\"assets_precompile\", \"cmd\"=\u003e[\"su discourse -c 'bundle exec rake themes:update assets:precompile'\"]}\nbootstrap 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.
922dd1e5bd9c3ec682864fff915eb2c12f4bf88805d555bc78f067ac2910540a
==================== END REBUILD LOG ====================
Failed to rebuild app.
Checking your domain name . . .
Connection to discussion.scottibyte.com succeeded.
You should probably remove any non-standard plugins and rebuild.
Attempting to restart existing container. . .
x86_64 arch detected.
starting up existing container
+ /usr/bin/docker start app
app
ce20d9cd2ce local_discourse/app “/sbin/boot” 12 days ago Up Less than a second 0.0.0.0:80-\u003e80/tcp, :::80-\u003e80/tcp, 0.0.0.0:443-\u003e443/tcp, :::443-\u003e443/tcp app
Restarted the container.
==================== PLUGINS ====================
- git clone https://github.com/discourse/docker_manager.git
No non-official plugins detected.
See https://github.com/discourse/discourse/blob/main/lib/plugin/metadata.rb for the official list.
discourse-doctor は以下のエラーを検出しました。
d.indkey, pg_get_indexdef(d.indexrelid), t.oid,
pg_catalog.obj_description(i.oid, 'pg_class') AS comment
FROM pg_class t
INNER JOIN pg_index d ON t.oid = d.indrelid
INNER JOIN pg_class i ON d.indexrelid = i.oid
LEFT JOIN pg_namespace n ON n.oid = i.relnamespace
WHERE i.relkind IN ('i', 'I')
AND d.indisprimary = 'f'
AND t.relname = 'user_search_data'
AND n.nspname = ANY (current_schemas(false))
ORDER BY i.relname
2022-04-29 16:59:55.223 UTC [720] discourse@discourse LOG: duration: 174.472 ms execute \u003cunnamed\u003e: INSERT INTO "user_search_data" ("raw_data","user_id","locale","version","search_data") VALUES ('system system', -1, 'en', 3, '''system'':1A,2B ') ON CONFLICT ("user_id") DO UPDATE SET "raw_data"=excluded."raw_data","locale"=excluded."locale","version"=excluded."version","search_data"=excluded."search_data" RETURNING "user_id"
I, [2022-04-29T16:59:55.668214 #1] INFO -- :
I, [2022-04-29T16:59:55.668479 #1] INFO -- : \u003e cd /var/www/discourse \u0026\u0026 su discourse -c 'bundle exec rake themes:update assets:precompile'
warning Skipping preferred cache folder "/home/discourse/.cache/yarn" because it is not writable.
warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-1000".
warning Cannot find a suitable global folder. Tried these: "/usr/local, /home/discourse/.yarn"
node:fs:1336
handleErrorFromBinding(ctx);
^
Error: EACCES: permission denied, mkdir '/home/discourse/.config/configstore'
You don't have access to this file.
at Object.mkdirSync (node:fs:1336:3)
at AsyncFunction.module.exports.sync (/var/www/discourse/app/assets/javascripts/node_modules/make-dir/index.js:114:6)
at Configstore.set all [as all] (/var/www/discourse/app/assets/javascripts/node_modules/configstore/index.js:59:12)
at Configstore.set (/var/www/discourse/app/assets/javascripts/node_modules/configstore/index.js:91:12)
at clientId (/var/www/discourse/app/assets/javascripts/node_modules/ember-cli/lib/cli/index.js:55:17)
at module.exports (/var/www/discourse/app/assets/javascripts/node_modules/ember-cli/lib/cli/index.js:105:13)
at Object.\u003canonymous\u003e (/var/www/discourse/app/assets/javascripts/node_modules/ember-cli/bin/ember:34:1)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32) {
errno: -13,
syscall: 'mkdir',
code: 'EACCES',
path: '/home/discourse/.config/configstore'
}
error Command failed with exit code 1.
discourse-doctor の後、フォーラムは同じエラーで再び起動しましたが、グラフィックは要件であり、このバージョンではグラフィックが機能しなくなったと考えています。このエラーは 2.9.0 beta3 で発生し、現在は 2.9.0 beta 4 です。ダウングレードまたはこの問題を修正する方法はありますか?
@JammyDodger 結局これに行き着きます。
$ yarn install --production
Error: EACCES: permission denied, open '/home/discourse/.config/yarn'
/home/discourse には .config がないことに注意してください。そこで、.config を作成しました。Discourse-Doctor の後にフォーラムがオンラインに戻るのは、既存の、再構築前のバージョンのサイトを再起動しているためです。そのため、オンラインにはなりますが、残念ながら元の状態に戻ってしまいます。
最近のバックアップがあれば、新しいドロップレットを起動して新しいインスタンスにサイトを復元する方が早いかもしれません。
同様のエラーについてサイトを検索しましたが、個人的な経験がないため、回答を理解できず、アドバイスすることができませんでした。
@pfaffman は通常、これらの問題に詳しいです。これは機能しますか、それとも全く的外れですか?
最後の手段として、管理GUIからバックアップを実行しました。ログにはバックアップが成功したと表示されました。バックアップをダウンロードしようとしました。フォーラムはバックアップへのリンクを記載したメールを送ってきました。それをクリックするとダウンロードされたように見えましたが、ファイルはダウンロードされませんでした。私のフォーラムにはバックアップが表示されますが、どれもダウンロードできません。最悪の場合、Discourseをゼロからインストールしてバックアップをアップロードしようと思いました。残念ながら、現在のフォーラムからバックアップをダウンロードできず、ログにもエラーはありません。この製品は、私が完全な初心者であるかのように感じさせます。私はそうではありません。
コンテナ内で指示通り chown を実行しました。バックアップリンクのメールが届きました。それをクリックしました。Ubuntuデスクトップにダウンロードフォルダを指定しました。すぐに戻ってきて、何もダウンロードされていません。フォーラムのメモ2年分とYouTubeチャンネルを削除寸前の状態です。この製品は、修復、バックアップ、復元のあらゆる試みを拒否します。
より知識のある人が具体的なアドバイスを提供できるようになるまで、これ以上のリスクの高い変更は保留することをお勧めします。これは非常にイライラすることだと思いますが、性急な行動は後悔につながる可能性があります。
サーバーの信頼できる画像バックアップが複数あり、いつでも復元できます。問題は、サーバーから現在のデータが必要なのに、Discourse がバックアップのコピーを提供してくれないことです。この先どうすればいいかわかりません。すべてのグラフィックをスクリーンショットし、テキストをコピーして、動作する phpBB ですべてを再作成することを検討しています。
それで、私の問題はバックアップのアップロードではなく、フォーラムからバックアップをダウンロードすることです。ランチャーの問題を修正しようとして、コンテナ内の /home/discourse を root から discourse に chown しました。ランチャーを再度実行したところ…
warning 優先キャッシュフォルダ "/home/discourse/.cache/yarn" は書き込み可能ではないためスキップします。
warning リスト内の次に書き込み可能なキャッシュフォルダを選択しました。それは "/tmp/.yarn-cache-1000" になります。
warning 適切なグローバルフォルダが見つかりません。試した場所: "/usr/local, /home/discourse/.yarn"
warning 優先キャッシュフォルダ "/home/discourse/.cache/yarn" は書き込み可能ではないためスキップします。
warning リスト内の次に書き込み可能なキャッシュフォルダを選択しました。それは "/tmp/.yarn-cache-1000" になります。
この製品は何百ものエラーに満ちており、1つか2つ修正しても改善は見られません。2週間前は正常に動作していましたが、その後自己破壊し、この混乱を修正する場所がどこにもありません。
それは良いですね。
そのセーフティネットに満足していて、実験に伴うリスクを認識し、喜んで引き受ける限りです。私はセルフホストしていますが、大切にしているコンテンツがある場合、ガイダンスなしで「予定外」のことをするのはかなり神経質になることがあります。
セットアップと、これまでのサーバーのメンテナンス方法について、もう少し詳しく教えていただけますか?そうすれば、これがどのように発生したのかが明らかになり、コミュニティ内で同様の問題を経験したことがある誰かに馴染みのあるものになるかもしれません。どのようなサーバーとスペックをお持ちですか?標準のインストールガイドに従ったとのことですが、ルーチンコマンドの一部が不明確でした。サーバーの重要なアップデートを見逃した可能性はありますか?
ウェブインターフェイスからダウンロードする代わりに、scp または rsync を使用して別の場所にダウンロードすることもできます。
何が起こっているのか理解できません。
UX アップグレードで言及されている /home/discourse はコンテナ内にあるため、ローカルファイルシステムでこれらのファイルが表示されることは期待できません。
しかし、コンテナの内外の違いは理解しているはずです。
そのコンテナを見ていないので、再構築には何も影響しません。
git pull を実行しましたか?
master ブランチではなく main ブランチにいますか?
OK。JammyDodgerさん、大きな進歩です。ご協力ありがとうございました。Discourseサーバーの1月のバックアップを復元しました。完璧に起動し、その後「git pull」とapp rebuildで最新版にアップグレードしました。良いニュースは、エラーがゼロになったことです。
古いサーバーからバックアップをエクスポートしてインポートすることに成功しました。すべてのデータがフォーラムにあり、フォーラムにエラーはありません。
残念ながら、グラフィックを含む投稿の編集や、グラフィックを含む新しい投稿の作成はまだできません。500エラーが発生するか、「投稿を作成できませんでした」というメッセージが表示されるだけです。https://discussion.scottibyte.com/ でお試しください。良いニュースは、投稿がテキストのみであれば問題なく、最新バージョンにアップデートされ、エラーがないことです。
投稿の作成時または既存の投稿の編集時に、Discourse が画像アップロードキャッシュにアクセスできないことが原因であると思われます。また、Discourse は 2.9.0.beta4 に完全にアップグレードされています。beta1 ではこの問題は発生しませんでした。beta3 または beta4 で発生したと思われます。既存の投稿に画像を含めて編集しようとすると、編集の保存時に 500 エラーが発生します。画像を含む新しい投稿を作成すると、次のエラーが表示されます。
画像が埋め込まれていないテキストとハイパーリンクのみの投稿を編集または作成する場合は、正常に機能します。
Discourse 2.9.0.beta4 で、画像が含まれる既存の投稿を編集すると、次のエラーが発生して失敗します。
画像をアップロードするとすぐに新しいトピックの作成に失敗し、次のエラーが発生します。
これを修正する方法について、何かアイデアはありますか? beta4 にアップグレードしてから発生するようになりました。
こんにちは @vmsman さん ![]()
問題に関する投稿は、クロス投稿して複数作成するのではなく、1つのトピックにまとめていただけますでしょうか。誰かが助けてくれる場合、すべての関連情報が1か所に集まるため、追跡が容易になります。 ![]()
これは良いニュースですね。
動作するバックアップがあれば、新しいインスタンスを起動してそこにインストールすることは可能でしょうか?
アップグレードしました。再構築のバグはすべて解消されました。バックアップを復元しました。それでも画像をアップロードできません。
サーバーをゼロから新規構築しました。エラーはありませんでした。バックアップを復元しました。グラフィックを含む投稿の編集で、同じ500エラーが発生しています。画像を含む投稿の作成もできません。バックアップを復元する前に、クリーンインストールから投稿を作成しようとしましたが、グラフィックは機能しませんでした。Discourse 2.9.0.beta4で何かが変更されたに違いありません。beta2ではすべて機能していました。これはネットワークの落とし穴に違いないと結論せざるを得ません。Discourseとその他のホストされたアプリはNginX Proxy Managerの後ろにあり、他のすべてのアプリは正常に動作しています。テストとして、NginX Proxy Managerを外し、サーバーを直接公開したところ、エラーはなくなりました。したがって、beta4はネットワークに関して何か異なることをしていると結論付けます。
何か良い考えがあるようですね。
タイトルをもう一度更新して、もう少し反応が得られるか見てみましょう。
残念ながら、標準的なインストールしか知らないので、NginX Proxy の知識は全くありません。![]()







