新品のDiscourseをインストールしました。すべて正常に動作します。最初の Вход (account) を作成し、メールを受信し、ログインすることができます。
phpbb3フォーラムをインポートする必要があります。インポートユーティリティを使用して、Discourseに履歴データを投入したいと考えているため、Migrate a phpBB3 forum to Discourse の指示に従いました。
コピーコマンドを実行しました。
cp containers/app.yml containers/import.yml
そして、テンプレート行を追加するためにファイルを編集しました。私のサイトではTLS証明書にLetsEncryptを使用しているため、SSLおよびLetsEncryptのテンプレート行はコメント解除されています。これは、指示に示されている例とは少し異なります。いずれにせよ、コメントアウトされた行とコメント解除された行の両方で試しましたが、これらの行が原因であるとは考えていません。
残りの指示に従い、最終的にコンテナの再構築コマンドを実行しました。コマンドは正常に完了しません。
94:M 23 Jul 2024 20:14:40.761 * Saving the final RDB snapshot before exiting.
94:M 23 Jul 2024 20:14:40.855 * DB saved on disk
94:M 23 Jul 2024 20:14:40.857 # Redis is now ready to exit, bye bye...
2024-07-23 20:14:41.235 UTC [32] LOG: database system is shut down
FAILED
--------------------
Errno::ENOENT: No such file or directory @ rb_sysopen - /etc/service/unicorn/run
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/replace_command.rb:11:in `read'
replace failed with the params {"tag"=>"precompile", "filename"=>"/etc/service/unicorn/run", "from"=>"PRECOMPILE_ON_BOOT=1", "to"=>"PRECOMPILE_ON_BOOT=0"}
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.
6f1a0b5cd0cfc8ed542938b7439aeff0a21a0135c58617fa5a05e68fd6fcc70d
この問題にどのように対処すればよいか分かりません。複数回、複数の場所でインストールしました。調べたところ、この再構築ステップ(実際のデータインポートではない)は実行されるはずのようです。これは最新のDiscourseの問題でしょうか?数ヶ月前にテストとして、インポートを最初から最後まで正常に実行しました。
pfaffman
(Jay Pfaffman)
2024 年 7 月 28 日午前 10:44
2
はい。
出力のさらに詳しい情報や、以前のエラーメッセージを確認する必要があります。
「いいね!」 1
共通の開始点を作成するために、VPS(Ubuntu 22.04)を再インストールし、apt update && apt upgrade を実行してから、標準の Discourse インストールプロセスを開始しました。
この情報が重要である場合に備えて、最初の ./discourse-setup の実行中に情報を入力する際に間違いを犯したため、control-C を発行してから ./discourse-setup を再度実行しました。 ./discourse-setup の 2 回目の実行では、以下に示すように新しい discourse/base がプルされました。
root@discourse:/var/discourse# ./discourse-setup
The configuration file containers/app.yml already exists!
. . . reconfiguring . . .
Saving old file as app.yml.2024-07-29-151604.bak
Stopping existing container in 5 seconds or Control-C to cancel.
x86_64 arch detected.
WARNING: We are about to start downloading the Discourse base image
This process may take anywhere between a few minutes to an hour, depending on your network speed
Please be patient
2.0.20240708-0023: Pulling from discourse/base
76956b537f14: Pull complete
c5ffad89ad3c: Pull complete
71c31a50a587: Pull complete
c1a1234dcb61: Pull complete
9980a27afc32: Pull complete
4f4fb700ef54: Pull complete
304b565c70c9: Pull complete
8ad811162d08: Pull complete
2c324dce526d: Pull complete
52d141c2b1c8: Pull complete
4c08fdcd145a: Pull complete
1b6035ac25c0: Pull complete
9208d0f90623: Pull complete
513dccf6f63f: Pull complete
e0b141854963: Pull complete
4476d7dd9441: Pull complete
0fad77941078: Pull complete
46c34476ea19: Pull complete
ff0b86516349: Pull complete
c33170d09c8b: Pull complete
ed4a793ffe51: Pull complete
3a7b2554e089: Pull complete
3ad8a6408839: Pull complete
e7c58bcc7f57: Pull complete
59b2407fe431: Pull complete
315160f4d4f8: Pull complete
ad328ba96976: Pull complete
825dca2e642e: Pull complete
9fbd8c908047: Pull complete
b1d30330e969: Pull complete
8c76c65bb8e8: Pull complete
9279965667b5: Pull complete
a0ae3eb4d088: Pull complete
819fb509ef8b: Pull complete
c962935d47d4: Pull complete
63b444b5bd1e: Pull complete
7efa1c09faf6: Pull complete
46c4327ce462: Pull complete
b095ebe7bdf6: Pull complete
3aa16a533cab: Pull complete
41419e4f1948: Pull complete
589837814d9a: Pull complete
bd025ad1b844: Pull complete
24762ff7528f: Pull complete
fe364253c657: Pull complete
Digest: sha256:025e9c1f6848c4726544c6ae873d710c62f547b72afb7f537aaa44eb5377cb5c
Status: Downloaded newer image for discourse/base:2.0.20240708-0023
docker.io/discourse/base:2.0.20240708-0023
app was not started !
./discourse-doctor may help diagnose the problem.
Found 3GB of memory and 2 physical CPU cores
setting db_shared_buffers = 768MB
setting UNICORN_WORKERS = 4
containers/app.yml memory parameters updated.
Discourseのインストールは続行され、完了しました。最初の Счётчик を作成し、ログインすることができました。
I, [2024-07-29T15:42:21.624379 #1] INFO -- : Replacing location @discourse { with location @discourse {
add_header Strict-Transport-Security 'max-age=31536000'; # remember the certificate for a year and automatically connect to HTTPS for this domain in /etc/nginx/conf.d/discourse.conf
I, [2024-07-29T15:42:21.627858 #1] INFO -- : > echo "Beginning of custom commands"
I, [2024-07-29T15:42:21.634022 #1] INFO -- : Beginning of custom commands
I, [2024-07-29T15:42:21.637436 #1] INFO -- : > echo "End of custom commands"
I, [2024-07-29T15:42:21.642766 #1] INFO -- : End of custom commands
I, [2024-07-29T15:42:21.648034 #1] INFO -- : Terminating async processes
I, [2024-07-29T15:42:21.649479 #1] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 57
2024-07-29 15:42:21.651 UTC [57] LOG: received fast shutdown request
I, [2024-07-29T15:42:21.652067 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 120
120:signal-handler (1722267741) Received SIGTERM scheduling shutdown...
2024-07-29 15:42:21.658 UTC [57] LOG: aborting any active transactions
120:M 29 Jul 2024 15:42:21.667 # User requested shutdown...
120:M 29 Jul 2024 15:42:21.668 * Saving the final RDB snapshot before exiting.
2024-07-29 15:42:21.682 UTC [57] LOG: background worker "logical replication launcher" (PID 72) exited with exit code 1
120:M 29 Jul 2024 15:42:21.682 * DB saved on disk
120:M 29 Jul 2024 15:42:21.683 # Redis is now ready to exit, bye bye...
2024-07-29 15:42:21.685 UTC [67] LOG: shutting down
2024-07-29 15:42:21.806 UTC [57] LOG: database system is shut down
sha256:6a6d6a8ea3559ad031a84fd48a164686e9440d7e857cb39619c2baba84a4b966
2b8eddd7b72415507d10cc404c40459c19c7ad3e025cb7bb69bcddb3c98b0197
+ /usr/bin/docker run --shm-size=512m -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=4 -e UNICORN_SIDEKIQS=1 -e RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 -e RUBY_GC_HEAP_INIT_SLOTS=400000 -e RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e LETSENCRYPT_DIR=/shared/letsencrypt -e DISCOURSE_FORCE_HTTPS=true -e LC_ALL=en_US.UTF-8 -e LANGUAGE=en_US.UTF-8 -e DISCOURSE_HOSTNAME=discourse3.greenbullfrog.com -e DISCOURSE_DEVELOPER_EMAILS=discourse-admin@greenbullfrog.com -e DISCOURSE_SMTP_ADDRESS=box.greenbullfrog.com -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=discourse@greenbullfrog.com -e DISCOURSE_SMTP_PASSWORD=lAtDyjbyqztzhrG -e DISCOURSE_SMTP_DOMAIN=discourse3.greenbullfrog.com -e DISCOURSE_NOTIFICATION_EMAIL=noreply@discourse3.greenbullfrog.com -e LETSENCRYPT_ACCOUNT_EMAIL=letsencrypt@greenbullfrog.com -h discourse-app -e DOCKER_HOST_IP=172.17.0.1 --name app -t -p 80:80 -p 443:443 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log --mac-address 02:f9:8c:dd:3d:63 local_discourse/app /sbin/boot
a78541042858ed6a4dd739bb7c8243a50a4064f595fdf968c22c8b63afb68979
root@discourse:/var/discourse#
次に、Migrate a phpBB3 forum to Discourse で説明されているプロセスを開始しました。
import.yml ファイルの先頭は次のとおりです。
root@discourse:/var/discourse# head -23 containers/import.yml
## this is the all-in-one, standalone Discourse Docker container template
##
## After making changes to this file, you MUST rebuild
## /var/discourse/launcher rebuild app
##
## BE *VERY* CAREFUL WHEN EDITING!
## YAML FILES ARE SUPER SUPER SENSITIVE TO MISTAKES IN WHITESPACE OR ALIGNMENT!
## visit http://www.yamllint.com/ to validate this file as needed
templates:
- "templates/postgres.template.yml"
- "templates/redis.template.yml"
- "templates/web.template.yml"
## Uncomment the next line to enable the IPv6 listener
#- "templates/web.ipv6.template.yml"
- "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
- "templates/web.ssl.template.yml"
- "templates/web.letsencrypt.ssl.template.yml"
- "templates/import/phpbb3.template.yml"
## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
root@discourse:/var/discourse#
問題は、/var/discourse/launcher rebuild import コマンドを実行したときに発生します。長さのため、そのコマンドのログを投稿することはできません。ただし、次の NextCloud リンクからダウンロードできます。
pfaffman
(Jay Pfaffman)
2024 年 7 月 29 日午後 8:48
4
@gerhard 、これはあなたの専門分野かもしれません。
tkforbes:
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/replace_command.rb:11:in `read'
replace failed with the params {"tag"=>"precompile", "filename"=>"/etc/service/unicorn/run", "from"=>"PRECOMPILE_ON_BOOT=1", "to"=>"PRECOMPILE_ON_BOOT=0"}
bootstrap failed with exit code 1
phpbb3テンプレートが/etc/service/unicornを削除し、その後webテンプレートがそのファイルを変更しようとしていることが問題だと思います。
最も簡単な解決策は、web.template.ymlからこれらの行を削除することかもしれません。
- replace:
tag: precompile
filename: /etc/service/unicorn/run
from: PRECOMPILE_ON_BOOT=1
to: "PRECOMPILE_ON_BOOT=0"
しかし、元のコンテナをビルドしてから、次のようなことを行う必要があります。
git checkout templates/web.template.yml
再度ビルドする前に。
「いいね!」 1
ご指示ありがとうございます、@pfaffman様 。
残念ながら、再構築を実行したままにしてしまい、SSHセッションが切断された状態で戻ってきたため、ビルド出力のすべてをキャプチャできませんでした。再構築によりDockerイメージが作成され、コンテナが起動したため、正常に終了したとほぼ満足していました。
phpbb3のデータをローカルインポートに適した場所に配置し、開始コマンドを発行しました。インポートは現在進行中ですが、完了までには時間がかかります。明日、結果を報告します。
「いいね!」 1
インポートは完了し、ほとんどのデータが移行されたようです。phpbb の一部のユーザー アカウントには、Discourse を混乱させるメール アカウントがあるようです。末尾のスペースが原因である可能性があります。全体の手順を再実行する前にクリーンアップを試みます。
ご協力ありがとうございます。インポートユーティリティには修正が提供されると思いますが、そうでなければ現在の Discourse バージョンのビルドに失敗します。多くの人が技術的なスキルを持たず、エラーに遭遇したらあきらめてしまうと思います。その結果、Discourse コミュニティが減少し、歴史的な議論が破棄または削除された phpbb サイトで失われることになります。
system
(system)
クローズされました:
2024 年 8 月 29 日午前 11:07
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.