Upgrade failed - could use some help to try and fix using SSH

Yesterday I had an admin message about upgrades. From the web UI, I did the Docker upgrade first and this seemed to go well. After it finished, the upgrade button for Discourse was enabled and I initiated that. At some point something broke and now our site is down. I was on my phone at the time and I didn’t manage to look at the log carefully to see where exactly things broke, before

I’m currently pocking around over SSH and about to try ./launcher rebuild app to hopefully get a better idea about what exactly is the problem in the upgrade. I’ve never done Discourse command-line repair and I want to make sure that I don’t blow away our data. Looking over app.yml, I see that the container is stateless - great - and that all the data is on the host, accessed as a shared volume.

I ran discourse-doctor and it looks like disk space is not the issue. Will the rebuild app command touch the local data store?

Yes, do the ./launcher rebuild app that should do it. It will not blow away your data.

If you’d rather not to it yourself, please see Automatic Rebuilds When You Need Them.

Thanks, the rebuild seems to have worked - the GitHub avatars and favicon don’t show for some reason, though.

안녕하세요!
업그레이드를 진행했는데 페이지에서 504 Gateway Time-out 오류가 발생했습니다.
아래 명령어를 실행해 봤는데도 여전히 작동하지 않습니다.

cd /var/discourse
git pull; ./launcher rebuild app

왜 여전히 작동하지 않는지 혹시 원인을 아시나요?

아니요. 어떤 아이디어를 가질 가능성이 거의 없습니다. 제 추측으로는 서버가 완전히 재시작될 때까지 기다리지 않은 것 같지만, 무엇이든 원인이 될 수 있습니다. 재구축이 오류 없이 완료되었나요? 디스크 공간이 부족합니까? docker ps 명령을 실행했을 때 컨테이너가 실행 중인지 확인해 보셨나요?

Docker ps 명령어로 다음을 확인했습니다:
Captura de pantalla 2020-11-04 a las 16.52.52

./launcher를 입력하고 app을 실행하면 Container is not running이라는 메시지가 표시됩니다. 어떻게 해야 실행할 수 있나요?

로그 파일에서는 다음 내용을 확인했습니다:
Could not find rake-13.0.1 in any of the sources
Run bundle install to install missing gems.
이것이 중요한가요?
감사합니다

그 컨테이너 이름은 재빌드가 아직 진행 중이며, 그것도 겨우 4분 동안만 진행되고 있다는 뜻입니다.

다음 명령어로 로그를 추적할 수 있습니다.

docker logs -tf sweet_chatelet

로그가 계속 업데이트되고 있나요?

리빌드가 완료되었지만, 다음과 같은 내용만 표시됩니다:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

그리고 ./launcher에 app을 입력하면 다음 메시지가 표시됩니다:
Error response from daemon: Container … is not running

즉, 재빌드 과정에서 특정 단계에서 실패하고 있습니다.

./launcher rebuild app 명령만 실행하여 새 재빌드를 시도하고 로그를 확인해 보세요. 다른 실패로 중단되면 위로 스크롤하여 오류 메시지를 검색해 보세요. 오류 메시지에 문제가 무엇인지 표시됩니다. 해당 메시지를 여기에 복사해 주시면 도움을 드릴 수 있습니다.

@Falco ./launcher logs app를 실행하면 다음과 같은 메시지가 표시됩니다:
소스에서 rake-13.0.1을 찾을 수 없음
누락된 gem을 설치하려면 bundle install을 실행하세요.

이게 전부 로그인가요? 로그의 더 큰 부분을 공유해 주실 수 있나요?

이 서버가 어떤 이상한 방화벽이나 기업 환경 뒤에 있는 건가요? 아니면 인터넷에 있는 단순한 VPS인가요?

./launcher rebuild app을 실행한 후 다음과 같은 메시지가 표시됩니다: ** FAILED TO BOOTSTRAP ** 위로 스크롤하여 이전 오류 메시지를 확인하십시오. 오류가 여러 개 있을 수 있습니다.
./discourse-doctor를 사용하면 문제를 진단하는 데 도움이 될 수 있습니다.

하지만 ./discourse-doctor는 아무것도 해결해 주지 않습니다.

위쪽으로 스크롤해서 이전 오류 메시지를 찾아볼 수 있을까요?

이게 도움이 될지 모르겠네요!

첫 세 개의 스크린샷은 ./launcher logs app에서 가져온 것이며, 유용하지 않습니다.

마지막 스크린샷은 ./launcher rebuild app에서 가져온 것으로, 답변이 포함된 것입니다. 오류가 있는지 확인해 주시고, 가능하다면 전체 출력을 텍스트로 여기에 붙여넣어 주세요.

감사합니다!

/pups/lib/pups/config.rb:106:in `block (2 levels) in run_commands': Invalid run command cd (SyntaxError)
	from /pups/lib/pups/config.rb:100:in `each'
	from /pups/lib/pups/config.rb:100:in `block in run_commands'
	from /pups/lib/pups/config.rb:99:in `each'
	from /pups/lib/pups/config.rb:99:in `run_commands'
	from /pups/lib/pups/config.rb:78:in `run'
	from /pups/lib/pups/cli.rb:31:in `run'
	from /pups/bin/pups:8:in `<main>'
44bf915bdff740d4441ad5239f79d5b14a6ed375300c52b85c10eefb7af677a2
** 부트스트랩 실패 ** 이전의 오류 메시지를 확인하려면 위로 스크롤하세요. 오류가 하나 이상 있을 수 있습니다.
./discourse-doctor 도구를 사용하면 문제를 진단하는 데 도움이 될 수 있습니다.

app.yml 파일에 잘못된 명령어가 포함된 것 같습니다.

플러그인을 추가하면서 잘못된 문자를 입력한 것은 아닌지 확인해 보세요.

비밀번호를 제거한 후 해당 파일을 여기에 붙여넣어 주시겠어요?

네, 여기 있습니다:
app.txt|첨부파일 (3.4 KB)

아, Docker를 통한 서브폴더 지원을 활성화하려고 하셨는데, 첫 번째 블록의 들여쓰기가 깨진 것 같습니다.

82, 83, 84, 85번 줄의 시작 부분에 공백 2개를 추가하기만 하면 됩니다.

그 후 파일을 저장하고 다시 빌드하세요.