안녕하세요, 제 사이트는 https://1o24bbs.com/ 입니다.
업그레이드도 안 했고, 아무런 조작도 없었는데 갑자기 nginx에서 http://127.0.0.1:3000으로의 연결 실패가 발생하고 있습니다.
어떻게 문제를 해결해야 할까요? 도움을 주시면 감사하겠습니다.
안녕하세요, 제 사이트는 https://1o24bbs.com/ 입니다.
업그레이드도 안 했고, 아무런 조작도 없었는데 갑자기 nginx에서 http://127.0.0.1:3000으로의 연결 실패가 발생하고 있습니다.
어떻게 문제를 해결해야 할까요? 도움을 주시면 감사하겠습니다.
/shared/log/rails# tail -f unicorn.stdout.log
2021-07-08T09:01:03.403Z pid=682 tid=sim ERROR: Error fetching job: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)
2021-07-08T09:01:03.412Z pid=682 tid=t4m ERROR: Error fetching job: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)
2021-07-08T09:01:03.406Z pid=682 tid=tra ERROR: Error fetching job: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)
2021-07-08T09:01:03.407Z pid=682 tid=sn6 ERROR: Error fetching job: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)
2021-07-08T09:01:03.407Z pid=682 tid=sze ERROR: Error fetching job: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)
Loading Sidekiq in process id 648
Kill self supervisor is gone
Kill self supervisor is gone
Kill self supervisor is gone
Loading Sidekiq in process id 780
/var/log/redis# tail -f current
553:M 08 Jul 2021 09:11:59.078 * 60초 동안 10000건의 변경 사항. 저장 중…
553:M 08 Jul 2021 09:11:59.079 * pid 1270에 의해 백그라운드 저장 시작
1270:C 08 Jul 2021 09:12:01.584 * DB가 디스크에 저장됨
1270:C 08 Jul 2021 09:12:01.595 * RDB: copy-on-write에 의해 사용된 메모리 0 MB
553:M 08 Jul 2021 09:12:01.619 * 백그라운드 저장이 성공적으로 종료됨
553:M 08 Jul 2021 09:13:02.098 * 60초 동안 10000건의 변경 사항. 저장 중…
553:M 08 Jul 2021 09:13:02.099 * pid 1339에 의해 백그라운드 저장 시작
1339:C 08 Jul 2021 09:13:04.052 * DB가 디스크에 저장됨
1339:C 08 Jul 2021 09:13:04.055 * RDB: copy-on-write에 의해 사용된 메모리 0 MB
553:M 08 Jul 2021 09:13:04.137 * 백그라운드 저장이 성공적으로 종료됨
rebuild app 실행 중 Failed listening on port 6379 오류가 발생합니다
이것이 Discourse 공식 표준 설치인가요?
충분한 디스크 공간이 있나요? (재구축을 시도해 보셨다면 부족함을 알아차렸을 거라고 생각합니다.)
여기까지의 내용만으로는 원인을 정확히 파악하기 어렵지만, redis와 관련된 문제인 것으로 보입니다.
네, 웹사이트는 수년간 잘 작동해 왔습니다.
아마도 redis 문제일 수도 없다는 생각이 들기 시작합니다.
Sidekiq는 백그라운드 작업을 처리하는 것이지요, 맞나요?
그렇다면 http://127.0.0.1:3000에 접근할 수 없는 이유는 될 수 없는데 말이죠.
nginx에서 더 많은 로그
2021/07/08 10:54:31 [error] 570#570: *169 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 100.19.76.187, server: _, request: “POST /message-bus/4cf07f106ff14fd885fd735ea28abce4/poll?dlp=t HTTP/2.0”, upstream: “http://127.0.0.1:3000/message-bus/4cf07f106ff14fd885fd735ea28abce4/poll?dlp=t”, host: “1o24bbs.com”, referrer: “https://1o24bbs.com/t/icc/25834”
2021/07/08 10:54:32 [error] 570#570: *169 upstream timed out (110: Connection timed out) while connecting to upstream, client: 100.19.76.187, server: _, request: “POST /message-bus/fe81f75495324a109de3812a3c5a9abd/poll?dlp=t HTTP/2.0”, upstream: “http://127.0.0.1:3000/message-bus/fe81f75495324a109de3812a3c5a9abd/poll?dlp=t”, host: “1o24bbs.com”, referrer: “https://1o24bbs.com/t/icc/23914”
2021/07/08 10:54:33 [error] 570#570: *169 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 100.19.76.187, server: _, request: “POST /message-bus/1dd105462c5b4b4c978e1702fa885e14/poll?dlp=t HTTP/2.0”, upstream: “http://127.0.0.1:3000/message-bus/1dd105462c5b4b4c978e1702fa885e14/poll?dlp=t”, host: “1o24bbs.com”, referrer: “https://1o24bbs.com/t/topic/15436”
2021/07/08 10:54:36 [error] 570#570: *13261 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 220.196.56.24, server: _, request: “GET /?374e828961d36d46bd99dc8e13b7f640 HTTP/1.1”, upstream: “http://127.0.0.1:3000/?374e828961d36d46bd99dc8e13b7f640”, host: “1o24bbs.com”, referrer: “https://gateway.zscalertwo.net:443/auT?origurl=https%3A%2F%2F1o24bbs.com%2F%3F374e828961d36d46bd99dc8e13b7f640&wexps=1&_ordtok=SWk3WVhmhHBPJ4rLFk4nDRnkZ3&wexps=1”
production.log에서 다음을 확인했습니다
Processing by CategoriesController#index as HTML
Parameters: {“41528430213d6ae753e074e11328b67b”=>nil}
Job exception: FATAL: the database system is shutting down
@pfaffman redis를 어떻게 flush하나요? 감사합니다!
PostgreSQL 13 업데이트를 수행하셨나요?
감사합니다!
제 웹사이트는 최신 버전의 Discourse를 실행 중입니다. 최소 한 달 동안 최신 버전을 사용해 왔습니다.
PostgreSQL은 수동으로 업그레이드하지 않았지만, 버전 13이라고 생각합니다.
어떻게 확인할 수 있을까요?
$ psql -V
psql (PostgreSQL) 13.3 (Debian 13.3-1.pgdg100+1)
참고로, 저는 단일 컨테이너 app을 실행하고 있습니다.
비표준 플러그인이 있나요?
내가 가진 플러그인:
문제가 redis에 있는지 postgresql에 있는지 어떻게 생각하시나요?
# ./launcher enter app 실행 후 curl http://127.0.0.1:3000을 실행하면 타임아웃이 발생합니다
discourse-doctor 출력 결과:
==================== DOCKER INFO ====================
DOCKER VERSION: Docker version 19.03.13, build 4484c46d9d
DOCKER PROCESSES (docker ps -a)
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
70709beca56d local_discourse/app "/sbin/boot" 15 minutes ago Up 15 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp app
1828993cd957 discourse/base:2.0.20210528-1735 "/bin/bash -c 'cd /p…" 2 hours ago Exited (1) 2 hours ago agitated_curie
70709beca56d local_discourse/app "/sbin/boot" 15 minutes ago Up 15 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp app
Discourse 컨테이너 app이 실행 중입니다
==================== PLUGINS ====================
- git clone https://github.com/discourse/docker_manager.git
- git clone https://github.com/discourse/discourse-adplugin.git
비공식 플러그인 감지되지 않음.
공식 목록은 https://github.com/discourse/discourse/blob/master/lib/plugin/metadata.rb 를 참조하세요.
========================================
미안해. 아이디어가 전혀 없네. 최근에 재부팅 해 봤어?
새 VM을 만들어야 했고, DB 백업으로 새 컨테이너를 생성해야 했습니다.
하지만 그 이후에도 다시 발생하고 있는 것 같습니다 …
한 회사의 웹사이트(외환 송금 온라인)에서도 같은 문제가 발생하여, 서버를 재부팅하고 타임아웃을 1000초로 변경한 후 다시 시도해 보았습니다.