포럼이 1일 이상 다운되어 있어요, 정말 절박합니다

일부 플러그인을 설치하고 ./launcher rebuild app을 실행했습니다.
재빌드는 정상적으로 성공했지만, 포럼에 접속하면 다음과 같은 화면이 표시됩니다.

Oops

이 토론 포럼을 구동하는 소프트웨어에서 예상치 못한 문제가 발생했습니다. 불편을 드려 죄송합니다.

오에 대한 자세한 정보는 로그에 기록되었으며, 자동 알림이 생성되었습니다. 확인하겠습니다.

추가 조치는 필요하지 않습니다. 다만, 오류 상태가 지속된다면 오류를 재현하는 단계 등을 포함한 추가 세부 정보를 사이트의 피드백 카테고리에 토론 주제를 게시하여 제공할 수 있습니다.

로그 오류 표시


Digest: sha256:f7467469ab9e39c3548d4478e3f416c05b34a0ee58eb6e40b963e562005669cc

Status: Downloaded newer image for discourse/base:2.0.20230313-1023

docker.io/discourse/base:2.0.20230313-1023

docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: unable to apply apparmor profile: apparmor failed to apply profile: write /proc/self/attr/apparmor/exec: no such file or directory: unknown.


docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: unable to apply apparmor profile: apparmor failed to apply profile: write /proc/self/attr/apparmor/exec: no such file or directory: unknown.


Checking your domain name . . .

Connection to luxx.com succeeded.

You should probably remove any non-standard plugins and rebuild.
Attempting to restart existing container. . .

x86_64 arch detected.

docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: unable to apply apparmor profile: apparmor failed to apply profile: write /proc/self/attr/apparmor/exec: no such file or directory: unknown.

docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: unable to apply apparmor profile: apparmor failed to apply profile: write /proc/self/attr/apparmor/exec: no such file or directory: unknown.

Your Docker installation is not working correctly

See: https://meta.discourse.org/t/docker-error-on-bootstrap/13657/18?u=sam
Failed to restart the container.


WARNING:
You have what appear to be non-official plugins.
If you are having trouble, you should disable them and try rebuilding again.

See https://github.com/discourse/discourse/blob/main/lib/plugin/metadata.rb for the official list.

========================================
Discourse version at luxx.com: NOT FOUND
Discourse version at localhost: NOT FOUND

그 조언을 따랐나요? 어떤 플러그인을 추가하려고 했나요?

도커 오류를 잠시 무시하더라도, 이것이 항상 첫 번째 단계여야 합니다.

재빌드할 때 이 메시지가 표시됩니다

root@debian-4gb-ash-1:/var/discourse# ./launcher rebuild app
x86_64 arch detected.
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: unable to apply apparmor profile: apparmor failed to apply profile: write /proc/self/attr/apparmor/exec: no such file or directory: unknown.
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: unable to apply apparmor profile: apparmor failed to apply profile: write /proc/self/attr/apparmor/exec: no such file or directory: unknown.
Your Docker installation is not working correctly

See: https://meta.discourse.org/t/docker-error-on-bootstrap/13657/18?u=sam
root@debian-4gb-ash-1:/var/discourse#

기존 Docker를 삭제하고 새 버전을 설치할 수 있는 방법이 있을까요?

Hi mecay,

해당 링크를 방문해서 안에 적혀 있는 조언을 따랐나요?

네, 하지만 그가 말한 대로 따라 해봐도 오류를 해결하지 못했고, 구글로 검색해 보았지만 해결책이 없었습니다.

도커를 삭제하고 다른 것을 설치하면 작동할까요? 어떻게 해야 하나요?

과정을 보여주세요.

docker: Error response from daemon: AppArmor enabled on system but the docker-default profile could not be loaded: strconv.Atoi: parsing "found": invalid syntax.
docker: Error response from daemon: AppArmor enabled on system but the docker-default profile could not be loaded: strconv.Atoi: parsing "found": invalid syntax.
Your Docker installation is not working correctly```

어떤 업데이트가 설치되어 재부팅이 필요한 것 같습니다.

해당 사항을 시도해 보셨나요?

재시작은 ./launcher rebuild app인가요?
아니면 다른 명령어인가요?

재부팅은 이제 shutdown -r now를 의미하는 것 같습니다.

여기서 시도해 보았지만 다음과 같이 표시됩니다.

docker.io/discourse/base:2.0.20230313-1023
docker: Error response from daemon: AppArmor enabled on system but the docker-default profile could not be loaded: strconv.Atoi: parsing "found": invalid syntax.
docker: Error response from daemon: AppArmor enabled on system but the docker-default profile could not be loaded: strconv.Atoi: parsing "found": invalid syntax.
Your Docker installation is not working correctly```

문제는 Docker나 Discourse가 아니라 AppArmor 보안 도구에서 비롯됩니다. Docker 실행을 허용해야 할 AppArmor 프로필이 손상되어 있고, AppArmor가 활성화된 상태이므로 Docker 시작이 차단되고 있습니다.

AppArmor 프로필이 손상된 원인을 파악하여 수정하거나, AppArmor를 비활성화해야 합니다.

저는 discourse를 처음 사용하는데, 이렇게 하는 방법을 아시나요?

AppArmor은 운영 체제 설치의 일부입니다.

서버에서 apparmor_status를 실행하면 어떤 출력이 나오나요?

출력이 매우 많이 생성되므로, 전부 복사해서 붙여넣어 주세요.

다음은 출력 결과입니다

cd /var/discourse 없이 실행할 때

root@debian-4gb-ash-1:~# apparmor_status
apparmor module is loaded.
6 profiles are loaded.
6 profiles are in enforce mode.
   /usr/bin/man
   lsb_release
   man_filter
   man_groff
   nvidia_modprobe
   nvidia_modprobe//kmod
0 profiles are in complain mode.
0 processes have profiles defined.
0 processes are in enforce mode.
0 processes are in complain mode.
0 processes are unconfined but have a profile defined.

cd /var/discourse로 이동한 후 실행할 때

root@debian-4gb-ash-1:/var/discourse# apparmor_status
apparmor module is loaded.
6 profiles are loaded.
6 profiles are in enforce mode.
   /usr/bin/man
   lsb_release
   man_filter
   man_groff
   nvidia_modprobe
   nvidia_modprobe//kmod
0 profiles are in complain mode.
0 processes have profiles defined.
0 processes are in enforce mode.
0 processes are in complain mode.
0 processes are unconfined but have a profile defined.

이 문제가 여전히 지속된다면, 기존 인스턴스를 디버깅하는 것보다 새로운 드롭렛을 생성하고 새 인스턴스를 설치하는 것이 더 쉬울 수 있습니다.

또한, 예산이 있다면 #marketplace를 통해 전문적인 도움을 받을 수도 있습니다.

돈이 없어요 :frowning: :cry:

더 이상 뭘 해야 할지 모르겠어요. 요즘은 계속 문제가 생기고 있거든요. 플러그인 때문인 걸 알았으면 절대 설치하지 않았을 텐데…

이렇게 새 드롭렛을 만드는 게 어떻게 작동하는 건가요?

서버에서 드롭렛을 다운로드해서 다른 서버에 올리는 건가요?
그런데 이 드롭렛이 제 포럼과 어떻게 통신하는 건가요?

먼저 호스팅된 Discourse에서 백업 파일 하나 또는 두 개를 내 컴퓨터로 다운로드해야 합니다. 그런 다음 새 서버에全新的 Discourse를 설치하고 백업에서 복원합니다.

반드시 로컬에 백업 사본을 확보하는 것부터 시작해야 합니다!

이 복사본을 어떻게 다운로드할 수 있나요? 포럼에 접근할 수 없어요. 포럼이 오프라인 상태라서 SSH로만 접속할 수 있어요.

SSH 접근 권한이 있다면, scp 또는 rsync를 사용하여 백업 폴더를 복사할 수 있습니다. 해당 폴더는 대부분 다음 경로에 위치해 있습니다:

/var/discourse/shared/standalone/backups/default

예를 들어, 다음 명령어로 해당 디렉토리의 목록을 확인할 수 있습니다.
rsync -ratz username@hostname:/var/discourse/shared/standalone/backups/default

그리고 다음 명령어로 내용을 현재 디렉토리로 복사할 수 있습니다.
rsync --progress -ratz username@hostname:/var/discourse/shared/standalone/backups/default/. .

수정: (이 명령어들은 원격 컴퓨터에서 백업을 가져오기 위해 사용자 자신의 컴퓨터에서 실행합니다. 리눅스, macOS 또는 리눅스와 유사한 Windows 환경을 사용한다고 가정합니다. 그렇지 않은 경우, Windows의 PuTTY는 파일 복사를 지원하고/또는 scp 프로그램을 포함하고 있을 수 있습니다. 또는 WinSCP가 필요한 도구일 수 있습니다.)