Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

redis-py - MISCONF Redis is configured to save RDB snapshots, ...

어느 순간, 테스트 서버에서 호스팅 중인 컨테이너에서 각종 오류들이 쏟아졌습니다. ^^; 가령, redis 호출에 대해서는 이런 오류 메시지가 나오고,

Traceback (most recent call last):
  File "/home/testusr/.local/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/testusr/.local/lib/python3.11/site-packages/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/testusr/.local/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  ...[생략]...
  File "/home/testusr/.local/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/d/workshop2/python-agent/testprj/latest_flask/pybo/views/main_views.py", line 190, in redis_test
    client.set('my_db', 5)
  File "/home/testusr/.local/lib/python3.11/site-packages/redis/commands/core.py", line 1453, in set
    return self.execute_command('SET', *pieces, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ...[생략]...
  File "/home/testusr/.local/lib/python3.11/site-packages/redis/client.py", line 1071, in execute_command
    return conn.retry.call_with_retry(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/testusr/.local/lib/python3.11/site-packages/redis/retry.py", line 32, in call_with_retry
    return do()
           ^^^^
  File "/home/testusr/.local/lib/python3.11/site-packages/redis/client.py", line 1072, in <lambda>
    lambda: self._send_command_parse_response(conn,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/testusr/.local/lib/python3.11/site-packages/redis/client.py", line 1051, in _send_command_parse_response
    return self.parse_response(conn, command_name, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/testusr/.local/lib/python3.11/site-packages/redis/client.py", line 1084, in parse_response
    response = connection.read_response()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/testusr/.local/lib/python3.11/site-packages/redis/connection.py", line 765, in read_response
    raise response
redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.

Mongo DB 호출은 이렇게 나오고,

Traceback (most recent call last):
  File "/home/testusr/.local/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/testusr/.local/lib/python3.11/site-packages/flask/app.py", line 1486, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/testusr/.local/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  ...[생략]...
  File "/home/testusr/.local/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/d/workshop2/python-agent/testprj/latest_flask/pybo/views/main_views.py", line 215, in pymongotest
    db2.users.delete_many({'y': 1})
  ...[생략]...
  File "/home/testusr/.local/lib/python3.11/site-packages/pymongo/collection.py", line 1451, in delete_many
    self._delete_retryable(
  File "/home/testusr/.local/lib/python3.11/site-packages/pymongo/collection.py", line 1360, in _delete_retryable
    return self.__database.client._retryable_write(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/testusr/.local/lib/python3.11/site-packages/pymongo/mongo_client.py", line 1643, in _retryable_write
    with self._tmp_session(session) as s:
  File "/usr/lib/python3.11/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/home/testusr/.local/lib/python3.11/site-packages/pymongo/mongo_client.py", line 2040, in _tmp_session
    s = self._ensure_session(session)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/testusr/.local/lib/python3.11/site-packages/pymongo/mongo_client.py", line 2027, in _ensure_session
    return self.__start_session(True, causal_consistency=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/testusr/.local/lib/python3.11/site-packages/pymongo/mongo_client.py", line 1976, in __start_session
    server_session = self._get_server_session()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/testusr/.local/lib/python3.11/site-packages/pymongo/mongo_client.py", line 2013, in _get_server_session
    return self._topology.get_server_session()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/testusr/.local/lib/python3.11/site-packages/pymongo/topology.py", line 525, in get_server_session
    session_timeout = self._check_session_support()
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/testusr/.local/lib/python3.11/site-packages/pymongo/topology.py", line 507, in _check_session_support
    self._select_servers_loop(
  File "/home/testusr/.local/lib/python3.11/site-packages/pymongo/topology.py", line 226, in _select_servers_loop
    raise ServerSelectionTimeoutError(
pymongo.errors.ServerSelectionTimeoutError: 192.168.100.50:15000: [Errno 111] Connection refused, Timeout: 30s, Topology Description: <TopologyDescription id: 6508f21066abc5620a3c1622, topology_type: Single, servers: [<ServerDescription ('192.168.100.50', 15000) server_type: Unknown, rtt: None, error=AutoReconnect('192.168.100.50:15000: [Errno 111] Connection refused')>]>

MySQL 서버 호출은 이런 오류가 발생합니다.

Traceback (most recent call last):
  File "/home/testusr/.local/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/testusr/.local/lib/python3.11/site-packages/flask/app.py", line 1487, in full_dispatch_request
    return self.finalize_request(rv)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/testusr/.local/lib/python3.11/site-packages/flask/app.py", line 1506, in finalize_request
    response = self.make_response(rv)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/testusr/.local/lib/python3.11/site-packages/flask/app.py", line 1801, in make_response
    raise TypeError(
TypeError: The view function for 'main.mysqlclient_wrapper2' did not return a valid response. The function either returned None or ended without a return statement.

당황하지 마시고, 컨테이너를 호스팅하는 서버의 디스크 용량을 확인해 보시고, 꽉 찼으면 여유 공간을 확보해 주시면 됩니다. (그나저나, redis의 오류 메시지가 그나마 실제 상황에 가깝군요. ^^)




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 9/19/2023]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




[1]  2  3  4  5  6  7  8  9  10  11  12  13  14  15  ...
NoWriterDateCnt.TitleFile(s)
13838정성태12/4/2024865오류 유형: 935. Windbg - Breakpoint 0's offset expression evaluation failed.
13837정성태12/3/2024998디버깅 기술: 204. Windbg - 윈도우 핸들 테이블 (3) - Windows 10 이상인 경우
13836정성태12/3/20241058디버깅 기술: 203. Windbg - x64 가상 주소를 물리 주소로 변환 (페이지 크기가 2MB인 경우)
13835정성태12/2/20241019오류 유형: 934. Azure - rm: cannot remove '...': Directory not empty
13834정성태11/29/20241146Windows: 275. C# - CUI 애플리케이션과 Console 윈도우 (Windows 10 미만의 Classic Console 모드인 경우)파일 다운로드1
13833정성태11/29/20241121개발 환경 구성: 737. Azure Web App에서 Scale-out으로 늘어난 리눅스 인스턴스에 SSH 접속하는 방법
13832정성태11/27/20241155Windows: 274. Windows 7부터 도입한 conhost.exe
13831정성태11/27/20241003Linux: 111. eBPF - BPF_MAP_TYPE_PERF_EVENT_ARRAY, BPF_MAP_TYPE_RINGBUF에 대한 다양한 용어들
13830정성태11/25/20241100개발 환경 구성: 736. 파이썬 웹 앱을 Azure App Service에 배포하기
13829정성태11/25/20241033스크립트: 67. 파이썬 - Windows 버전에서 함께 설치되는 py.exe
13828정성태11/25/20241052개발 환경 구성: 735. Azure - 압축 파일을 이용한 web app 배포 시 디렉터리 구분이 안 되는 문제파일 다운로드1
13827정성태11/25/20241139Windows: 273. Windows 환경의 파일 압축 방법 (tar, Compress-Archive)
13826정성태11/21/20241220닷넷: 2313. C# - (비밀번호 등의) Console로부터 입력받을 때 문자열 출력 숨기기(echo 끄기)파일 다운로드1
13825정성태11/21/20241182Linux: 110. eBPF / bpf2go - BPF_RINGBUF_OUTPUT / BPF_MAP_TYPE_RINGBUF 사용법
13824정성태11/20/20241147Linux: 109. eBPF / bpf2go - BPF_PERF_OUTPUT / BPF_MAP_TYPE_PERF_EVENT_ARRAY 사용법
13823정성태11/20/20241110개발 환경 구성: 734. Ubuntu에 docker, kubernetes (k3s) 설치
13822정성태11/20/20241079개발 환경 구성: 733. Windbg - VirtualBox VM의 커널 디버거 연결 시 COM 포트가 없는 경우
13821정성태11/18/20241238Linux: 108. Linux와 Windows의 프로세스/스레드 ID 관리 방식
13820정성태11/18/20241237VS.NET IDE: 195. Visual C++ - C# 프로젝트처럼 CopyToOutputDirectory 항목을 추가하는 방법
13819정성태11/15/20241270Linux: 107. eBPF - libbpf CO-RE의 CONFIG_DEBUG_INFO_BTF 빌드 여부에 대한 의존성
13818정성태11/15/20241382Windows: 272. Windows 11 24H2 - sudo 추가
13817정성태11/14/20241227Linux: 106. eBPF / bpf2go - (BPF_MAP_TYPE_HASH) Map을 이용한 전역 변수 구현
13816정성태11/14/20241269닷넷: 2312. C#, C++ - Windows / Linux 환경의 Thread Name 설정파일 다운로드1
13815정성태11/13/20241157Linux: 105. eBPF - bpf2go에서 전역 변수 설정 방법
13814정성태11/13/20241234닷넷: 2311. C# - Windows / Linux 환경에서 Native Thread ID 가져오기파일 다운로드1
[1]  2  3  4  5  6  7  8  9  10  11  12  13  14  15  ...