상세 컨텐츠

본문 제목

XU4 + docker Nextcloud 오류 - 업데이트 후 500Error (getCutoffTimestamp() must be of the type int, bool returned)

IT/PC & 서버 고장

by 그래도널 2021. 4. 6. 17:39

본문

728x90

XU4 에 Addon + docker 로 돌리고 있던 nextcloud 에 업데이트가 있다길래 설치했더니 nextcloud가 먹통이다

-일단 망함-

1. 첫번째 오류

  - 원래 cshdd1/data 로 volume을 묶어주고 있었는데 위치는 같은데 파일이 초기화 되어 있엇음

  - 데이터가 날아간줄알고 난리를 쳤으나 데이터 용량이 그대로인 걸 알고 찾기 시작

find / -name [파일명]

 

다행히 addon으로 하드디스크를 붙인거라 다음 위치에 있는걸 알게 되었다

/srv/dev-disk-by-label-cshdd1/

기존 정보랑 충돌하는 걸 방지하기 위해 심링크 생성

ln -s /srv/dev-disk-by-label-cshdd1 /hdd1

이런식으로 추가

portainer.io에 컨테이너에서 cshdd1/nextcloud/config   cshdd1/nextcloud/data 로 되어 있던걸 hdd1 아래 주소로 변경 후 Edployment the container 를 눌러 적용

 

2. 두번째 삽질

 상식적으로 data 폴더와 config 폴더를 전부 기존폴더로 바뀌었으니 되어야 하는데 Internal server 오류 발생

 해당 문제는 기존 DB IP가 컨테이너 재실행하면서 바뀌어서 발생한 것으로 보여짐

vi /hdd1/nextcloud/config/www/nextcloud/config/config.php

<?php
$CONFIG = array (생략)
'dbhost' => '172.17.0.4:3306', <- IP 수정

 

3. 세번째 삽질

DB연결을 바꾸었더니 아래와 같이 500에러 발생

단서도 없고 일단 로그파일 훑어봄

{"reqId":"rFLa6LfU0kPogD54HgnB","level":4,"time":"2071-04-19T10:54:00+00:00","remoteAddr":"접속IP","user":"--","app":"webdav","method":"PROPFIND","url":"/remote.php/webdav/","message":{"Exception":"TypeError","Message":"Return value of OC\\Security\\Bruteforce\\Throttler::getCutoffTimestamp() must be of the type int, bool returned","Code":0,"Trace":[{"file":"/config/www/nextcloud/lib/private/Security/Bruteforce/Throttler.php","line":238,"function":"getCutoffTimestamp","class":"OC\\Security\\Bruteforce\\Throttler","typ

Exception 오류인데 DB연결이 안되는것도 아니고 컨테이너를 수차례 삽질해서 재부팅 해봄

해외 사이트에서도 도커에 500에러는 자료가 없어서 계속 헤메던 상황

 

그 와중에 한줄기 빛이 될만한 글을 찾음

help.nextcloud.com/t/nextcloud-20-0-5-2-getcutofftimestamp-must-be-of-the-type-int-bool-returned/104597/9

 

Nextcloud 20.0.5.2 getCutoffTimestamp() must be of the type int, bool returned

Hello, Same problem here, anyone found a solution for the linuxserver.io docker version? the tip from leoliver to switch to the official nextcloud version is good but i am a very afraid of switching, because my server is running since 4 years and theres ma

help.nextcloud.com

대충 보면 업그레이드 이후 500에러가 나오고 오류가 반환된다는 것

그런데 나와 같은 오류야!!! 만세!!!

I am having the same issue on a docker based on armhf. Seems like the issue is because of the update to alpine 3.13. There is a workaround at 
FAQ - LinuxServer.io

arm 기반 도커에서 발생하는 문제로 해결방법이 있고 된다고 한다

총 4가지 옵션이 있지만 난 그중에 3번째 옵션으로 진행했다.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC 648ACFD622F3D138
    echo "deb http://deb.debian.org/debian buster-backports main" | sudo tee -a /etc/apt/sources.list.d/buster-backports.list
    sudo apt update
    sudo apt install -t buster-backports libseccomp2

apt로 백포트를 추가해서 관련 패치를 받는 것이다.

아무래도 libseccomp2 의 도커 종속성 관련 버그 때문이라는 것 같다.

전부 완료 하고 컨테이너 재시작

 

멋지게 살아났습니다.

 

자료도 다 살아있네요

안에 들어있는 아이들 사진이 없어지지 않아서 장관님께 혼나지 않아도 될 것 같습니다.

 

만세! 

getCutoffTimestamp() must be of the type int, bool returned 라니.... 이게 뭔소린가 했다구!!

관련글 더보기

댓글 영역