안녕하세요, 여러분!
관리자 패널에 게시된 링크를 통해 discourse 포럼을 업데이트하려고 했더니 이 오류가 발생했습니다. 포럼 전체가 사라져 버렸습니다. 업데이트를 초기화하려면 어떻게 해야 하나요? 도움을 주실 수 있다면 정말 감사하겠습니다.
사실 이는 포럼이 업데이트되고 있음을 의미합니다. - 업데이트가 완료되기 전에 중단하지 않는 한.
포럼의 https://yoursite.com/latest.json 주소를 방문해보십시오. 어떤 내용이 반환되면, 10분 정도 기다린 후 문제가 스스로 해결되는지 확인해 보십시오.
답변 감사합니다. 말씀해 주신 방법을 시도해 봤는데, 502 Bad Gateway nginx 오류가 반환됩니다.
./launcher rebuild app를 실행해야 할 것 같습니다
I tried the ./launcher rebuild app and i got following error messages:
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle install --deployment --retry 3 --jobs 4 --verbose --without test development' failed with return #<Process::Status: pid 340 exit 5>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --retry 3 --jobs 4 --verbose --without test development'"]}
6e9e60bd6b6113cdcb001127fd2a24fe86f2a1658bf24500e5e2b720fd793510
** 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.
and i scrolled up and found some possible errors logs:
1)200:M 25 Jun 2023 16:00:16.252 # Failed listening on port 6379 (TCP), aborting.
2)[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
3)Bundler::PathError: The path `/var/www/discourse/vendor/bundle/ruby/2.7.0/bundler/gems/sprockets-f4d3dae71ef2` does not exist.
4)Bundler::InstallError: sass-embedded-1.63.6-x86_64-linux requires rubygems version >= 3.3.22, which is incompatible with the current version, 3.2.18
도움이 된다면, 다른 사용자도 최근에 비슷한 문제를 겪은 적이 있는지요?
답변해 주셔서 감사합니다. 하지만 제 생각에는 같은 문제가 아닌 것 같습니다. 제 서버는 독일에 있습니다. 제 서버에는 discourse docker 이미지를 사용하고 있습니다. ./launcher rebuild app 명령어가 작동하지 않으면 어떻게 해야 할까요?
다음과 유사해 보입니다.
Rebuild failed due to ruby gem incompatibility
도와주셔서 감사합니다! 네, 비슷해 보였고 이렇게 시도해 보았습니다:
my server:/var/discourse**$ git pull
fatal: Not a git repository: ../.git/modules/discourse_docker
git pull을 실행하기 전에 먼저 해야 할 일이 있을까요? 저는 서버의 /var/discourse 디렉터리에서 이 작업을 수행하고 있습니다.
비표준 환경으로 보입니다. 표준 설치인가요?
마지막 개발자 문서를 읽었는데, 웹에서 실행되는 많은 것들이 nginx 뒤에서 실행되며 Discourse도 nginx 뒤에서 호스팅되어야 한다고 적혀 있었습니다. 표준 설치 방식은 제 상황에 맞지 않습니다.
그리고 아래는 문서에서 그가 말한 내용과 그가 수행한 방법입니다:
Discourse는 Docker 컨테이너에서 실행됩니다. 그러나 docker-compose.yml이나 .conf 파일을 통해 설정하는 것이 아니라 특별한 유형의 설정이 필요합니다.
Docker 이미지 설정 및 빌드에 필요한 discourse-project/ GitHub 저장소는 여기에서 찾을 수 있습니다. 그들이 제공하는 멋지고 유익한 “discourse-setup” 프로그램은 무시하십시오. 여기서는 작동하지 않습니다. 우리는 앱을 직접 설정해야 합니다.
git clone https://github.com/discourse/discourse_docker.git /var/discoursecd /var/discourse && cp samples/standalone.yml containers/app.ymlsudo nano 사용)/var/discourse 디렉터리에서 sudo ./launcher bootstrap app를 사용하여 앱을 빌드합니다. 이 과정은 꽤 시간이 걸립니다.sudo ./launcher start app를 사용하여 discourse 컨테이너를 시작할 수 있습니다.좋은 참고 자료네요.
git pull;./launcher rebuild app가 작동해야 합니다.
어떤 버전에서 업데이트하고 계신가요?
OS가 오래되었나요? (cat /etc/issue)
디스크가 가득 찼나요? (df - h)
답변 감사합니다! 업데이트하려는 버전은 2.8.0.beta6이며, 마지막 업데이트는 2021년 9월 28일에 진행되었습니다.
cat /etc/issue 명령을 실행한 결과 다음과 같은 출력이 나타났습니다:
Debian GNU/Linux 9 \n \l
그리고 ./discourse-doctor에 따르면 다음과 같은 정보를 얻을 수 있습니다.
==================== MEMORY INFORMATION ====================
RAM (MB): 4050
total used free shared buff/cache available
Mem: 3955 427 1152 63 2375 3182
Swap: 0 0 0
==================== DISK SPACE CHECK ====================
---------- OS Disk Space ----------
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 63G 27G 34G 45% /
==================== DISK INFORMATION ====================
Disk /dev/sda: 64 GiB, 68719476736 bytes, 134217728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc0b6220c
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 134217727 134215680 64G 83 Linux
스왑(swap)을 추가할 수 있습니다.
또한 PostgreSQL 13 업데이트를 참고하세요.
한 번 이상 재빌드(rebuild)를 수행했나요?
Debian | endoflife.date 도 참고해 보세요.
모든 것을 지원되는 운영 체제를 사용하는 새 VM으로 이전해야 합니다. 따라서 실행 중인 다른 서비스들도 업그레이드해야 합니다.
제이미, 안녕하세요. 여러 번 설치에 실패한 후, 서버의 메모리 한계와 네트워크 문제 때문임을 알게 되었습니다. 4GB 메모리를 갖춘 서버를 사용하고, GitHub와 Ruby에 정상적으로 접근할 수 있도록 하는 것을 권장합니다.
이 오류가 신경 쓰입니다. 여전히 이 오류가 나타나나요? 이제 Docker 컨테이너는 3.2.0을 실행 중이어야 합니다.
하지만 /var/discourse가 git 디렉터리가 아니라면, 설명서와 다르게 어떤 작업이 수행된 것입니다. 이는 업데이트를 방해하고 Ruby 버전 불일치를 유발합니다. 제 환경에서는 다음과 같습니다:
/var/discourse# git status
On branch main
Your branch is up to date with 'origin/main'.
또한 .git 디렉터리를 볼 수 있습니다:
# ls -a /var/discourse/
. .github README.md cids discourse-setup launcher scripts tests
.. .gitignore bin containers image rebuild.log shared
.git LICENSE c discourse-doctor index.html samples templates
수정: 그렇습니다, 너무 오래된 운영 체제를 사용하고 있다면 새 운영 체제에 Discourse를 설치하고 백업을 복구하며, 특정 상황에 따라 필요할 수 있는 추가 작업들을 수행하기 위해 상당한 노력이 필요합니다.
서버가 Discourse 실행 외에 다른 작업도 수행하고 있다면 이는 추가적인 복잡성을 더합니다. 현지 전문 지식이 필요할 수 있습니다.
ruby gems 등에서 비슷한 실패가 발생했습니다.
새 서버에 새로 설치했을 때였습니다.
도와주셔서 감사합니다. 여러분이 제안해 주신 방법들을 하나씩 시도해서 문제를 해결해 보겠습니다. 결과가 좋든 나쁘든 피드백을 포럼에 다시 올리겠습니다. 다시 한번 감사합니다!
새 버전의 discourse를 성공적으로 설치했습니다. 위의 문서에 있는 지침을 그대로 따랐고, 제 환경에서는 잘 작동했습니다. 하지만 이제 백업에서 복원하는 데 문제가 생겼습니다.
명령줄에서 백업 복원을 시도해 보았지만, 다음과 같은 오류가 발생했습니다:
root@my_server:/var/www/discourse# discourse restore my_server-2023-06-20-033008-v20210922064213.tar.gz
Starting restore: my_server-2023-06-20-033008-v20210922064213.tar.gz
[STARTED]
'system' has started the restore!
Marking restore as running...
Making sure /var/www/discourse/tmp/restores/default/2023-06-29-113408 exists...
Copying archive to tmp directory...
Unzipping archive, this may take a while...
EXCEPTION: /var/www/discourse/lib/discourse.rb:137:in `exec': Failed to decompress archive.
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
/var/www/discourse/lib/discourse.rb:171:in `execute_command'
/var/www/discourse/lib/discourse.rb:137:in `exec'
/var/www/discourse/lib/discourse.rb:33:in `execute_command'
/var/www/discourse/lib/backup_restore/backup_file_handler.rb:78:in `decompress_archive'
/var/www/discourse/lib/backup_restore/backup_file_handler.rb:23:in `decompress'
/var/www/discourse/lib/backup_restore/restorer.rb:42:in `run'
script/discourse:149:in `restore'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/thor-1.2.2/lib/thor/base.rb:485:in `start'
script/discourse:290:in `<top (required)>'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/cli/exec.rb:58:in `load'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/cli/exec.rb:23:in `run'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/cli.rb:492:in `exec'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/cli.rb:34:in `dispatch'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/cli.rb:28:in `start'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/exe/bundle:45:in `block in <top (required)>'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.4.13/exe/bundle:33:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Trying to rollback...
There was no need to rollback
Cleaning stuff up...
Removing tmp '/var/www/discourse/tmp/restores/default/2023-06-29-113408' directory...
Marking restore as finished...
Notifying 'system' of the end of the restore...
Finished!
[FAILED]
Restore done.
이제 어떻게 해야 할까요?
백업 파일에 문제가 있습니다. 단순히 잘린 것일 수 있습니다.