再構築を試みた際に、初めて以下のエラーが発生しました。
2022-10-04 14:39:49.780 UTC [1700] FATAL: lock file "postmaster.pid" is empty
2022-10-04 14:39:49.780 UTC [1700] HINT: Either another server is starting, or the lock file is the remnant of a previous server startup crash.
ヒントは読めますが、次にどうすればよいかわかりません。何か洞察をいただけないでしょうか?
pfaffman
(Jay Pfaffman)
2022 年 10 月 4 日午後 3:15
2
これはいつ起こっていますか?標準的なインストールですか?
標準インストールと ./launcher rebuild app 実行後
pfaffman
(Jay Pfaffman)
2022 年 10 月 4 日午後 3:19
4
試してみてはどうでしょうか
./launcher start app
これは以前にも機能しましたか?
エラーですか、それとも警告ですか。ブラウザで開こうとしましたか?
以下は何と表示されますか?
docker ps
Response to ./launcher start app:
57c2a0746e93
Nothing to do, your container has already started!
そしてブラウザで 502 Bad Gateway と表示されます。
docker ps の出力
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
57c2a0746e93 local_discourse/app “/sbin/boot” 6 months ago Up 16 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp, 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp app
pfaffman
(Jay Pfaffman)
2022 年 10 月 4 日午後 3:24
7
奇妙ですね。再起動してもう一度再構築してみます。
あるいは
./launcher stop app; ./launcher rebuild app
古いコンテナを実行しています。つい最近作成したものではありません(6か月前に作成)。
そして、再構築中に気づかなかった他のエラーがあったのかもしれません。
同じ結果
2022-10-04 15:26:43.452 UTC [1699] FATAL: lock file "postmaster.pid" is empty
2022-10-04 15:26:43.452 UTC [1699] HINT: Either another server is starting, or the lock file is the remnant of a previous server startup crash.
sam
(Sam Saffron)
2022 年 11 月 21 日午前 1:34
9
デバッグするにはデータが不足しています。
これは、ビルドプロセスがPGが既に実行されていると考えているために発生しているため、PGのアップグレードプロセスに何か問題がある可能性があります。何が起きているのか確認するために、ランチャーの完全なログ(パスワードは削除してください)を含めていただけますか。
Ed_S
(Ed S)
2022 年 11 月 23 日午後 5:45
10
正常に動作しているシステムを確認すると役立つかもしれません。ロックファイルはここにあります。
# ls -l /var/discourse/shared/standalone/postgres_data/postmaster.pid
-rw------- 1 systemd-resolve input 92 Nov 15 16:20 /var/discourse/shared/standalone/postgres_data/postmaster.pid
そして11月15日は、私が最後にアプリを起動した日付です。アプリに入ると、postgresプロセスが見えます。
# cd /var/discourse/
# ./launcher enter app
x86_64 arch detected.
# ps auxfc|egrep -1 postm
root 45 0.0 0.0 2332 0 ? S Nov15 0:00 \_ svlogd
postgres 48 0.0 0.1 213160 1784 ? S Nov15 0:27 \_ postmaster
postgres 67 0.0 2.6 213380 26924 ? Ss Nov15 0:34 \_ postmaster
postgres 68 0.0 0.4 213292 4236 ? Ss Nov15 0:15 \_ postmaster
postgres 69 0.0 0.1 213160 1068 ? Ss Nov15 3:44 \_ postmaster
postgres 70 0.0 0.1 213840 1520 ? Ss Nov15 0:16 \_ postmaster
postgres 71 0.0 0.0 68184 380 ? Ss Nov15 0:56 \_ postmaster
postgres 72 0.0 0.0 213716 468 ? Ss Nov15 0:00 \_ postmaster
postgres 92 0.0 0.0 225364 324 ? Ss Nov15 0:01 \_ postmaster
postgres 176 0.0 0.1 217944 1484 ? Ss Nov15 0:01 \_ postmaster
postgres 9126 0.0 0.7 215052 7336 ? Ss Nov16 0:19 \_ postmaster
postgres 1574 0.0 5.7 223540 58300 ? Ss 17:28 0:00 \_ postmaster
postgres 1973 0.0 3.3 221032 33960 ? Ss 17:34 0:00 \_ postmaster
postgres 2320 0.1 3.5 218080 36120 ? Ss 17:39 0:00 \_ postmaster
postgres 2321 0.1 2.9 218068 29928 ? Ss 17:39 0:00 \_ postmaster
postgres 2336 0.0 1.4 215052 14340 ? Ss 17:40 0:00 \_ postmaster
# exit
アプリを停止した場合、その場所にはロックファイルがなく、postgresプロセスも実行されていないことを期待します。(もちろん、コンテナはもはや実行されていないため、psコマンドをホストで直接実行する必要があります。)
あなたの状況では、まずアプリを停止し、postgresプロセスが実行されていないことを確認するのが良いと思います。互いに競合しているインスタンスが2つ実行されている可能性があります。
可能性は低いですが、ディスクがいっぱいになってロックファイルが空になっている可能性もあります。あるいは、何らかの権限の問題があるのかもしれません。
編集:コンテナ内では、ロックファイルの場所と所有権が異なります。
# ./launcher enter app
x86_64 arch detected.
# ls -l /shared/postgres_data/postmaster.pid
-rw------- 1 postgres postgres 92 Nov 15 16:20 /shared/postgres_data/postmaster.pid
# exit
logout
#
Samが指摘しているように、さらに情報を見る必要があります。
「いいね!」 1