I, [2023-06-16T11:39:43.530890 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'
error An unexpected error occurred: "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.3.tgz: ESOCKETTIMEDOUT".
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'yarn install --frozen-lockfile && yarn cache clean' failed with return #<Process::Status: pid 281 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "cmd"=>["su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'"]}
bootstrap failed with exit code 1
** 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.
f485460571ab9e30e0d6917b05c9a8fe1772df13d8cae9fe67108961fae71039
==================== END REBUILD LOG ====================
./launcher rebuild app를 실행했을 때도 동일한 문제가 발생합니다.
Linux 호스트에서 date-fns-2.29.3.tgz 파일을 다운로드해 보았는데, 정상적으로 작동합니다.
wget https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.3.tgz
Connecting to registry.yarnpkg.com (104.16.26.35:443)
saving to 'date-fns-2.29.3.tgz'
date-fns-2.29.3.tgz 100% |*************************************************************************************************************| 712k 0:00:00 ETA
'date-fns-2.29.3.tgz' saved
그러나 ./discourse-setup 실행 후 모든 것이 빌드되는 동안 9단계 완료 대기 중 실패하며, yarn과 관련된 ESOCKETTIMEDOUT 오류가 발생합니다. 실행을 시도하는 마지막 메시지는 [ ! -d 'node_modules' ] || su discourse -c 'yarn install --production && yarn cache clean'입니다.
해결 방법
편집기를 설치해야 합니다. 저는 nano를 선호하므로 apt-get install nano로 해결됩니다. 그런 다음 /var/discourse/templates로 이동하여 nano web.template.yml을 실행하세요. 비교를 위해 github에서 클론한 파일과 관심 영역은 약 159번째 줄 근처입니다. 익숙해 보입니까? 바로 위에서 실패하기 전에 언급된 동일한 명령어입니다. 우리는 이 줄 위에 새로운 섹션을 추가하여 타임아웃을 늘려야 합니다.