CLI에서 업데이트를 수행했습니다:
cd /var/discourse
git pull
./launcher rebuild app
모든 작업이 정상적으로 완료되었지만 502 Bad Gateway 오류가 발생했습니다.
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6598e9407e29 local_discourse/app "/sbin/boot" 35 minutes ago Up 22 minutes 0.0.0.0:2045->80/tcp app
./launcher logs app
(105) exiting
ok: run: redis: (pid 47) 17s
ok: run: postgres: (pid 44) 17s
supervisor pid: 114 unicorn pid: 118
config/unicorn_launcher: line 71: kill: (118) - No such process
config/unicorn_launcher: line 15: kill: (118) - No such process
(114) exiting
ok: run: redis: (pid 47) 21s
ok: run: postgres: (pid 44) 21s
supervisor pid: 123 unicorn pid: 127
config/unicorn_launcher: line 71: kill: (127) - No such process
config/unicorn_launcher: line 15: kill: (127) - No such process
(123) exiting
ok: run: redis: (pid 47) 26s
ok: run: postgres: (pid 44) 26s
supervisor pid: 132 unicorn pid: 136
curl localhost:2045
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>
Discourse는 LXC 컨테이너 내부에서 실행 중입니다. 제 두 번째 포럼도 LXC 컨테이너 내부에 있지만 업데이트 후 정상적으로 작동합니다. 정말 이상합니다.
어떤 조언을 주실 수 있을까요?
업데이트:
어떤 ruby 프로세스가 여전히 실행 중이고 CPU를 많이 사용하고 있는 것을 확인했습니다:
/usr/local/bin/ruby /usr/local/bin/bundle exec config/unicorn_launcher -E production -c config/unicorn.conf.rb
업데이트 2:
LXC 컨테이너를 비특권(unprivileged)에서 특권(privileged) 컨테이너로 변경하여 문제를 해결했습니다.