
버전 낮은 리눅스에서 아파치 웹서버의 일부 설정만 변경 후 설정 갱신만 하고자 할때reload 명령어를 수행하면 아래와 같은 실패 메세지를 출력할 것이다. [root@localhost /]# systemctl reload httpdFailed to reload httpd.service: Job type reload is not applicable for unit httpd.service.See system logs and 'systemctl status httpd.service' for details. 그렇다고 운영중인 서비스를 내렸다 올릴 수 없지 않은가.... * 단, 모듈 추가나 포트변경은 내렸다 올려야함. 이럴때는 apachectl 명령어로 우아하게 갱신해주면 된다 [root@loca..

jenkins 에서 git 자동배포를 잘해주다가 배포 브런치를 푸시했는데 jenkins 가 아무 반응이 없었다. GitHub Hook Log 를 확인 했더니 아래와 같았다. FATAL: hudson.plugins.git.GitException: Failed to setup credentials... 뭔가 인증쪽에서 문제가 발생한 것 같다.해결하고보니 나는 2가지가 문제였다. 1. github > Personal Access Token 이 만료되지 않았지만 git api 와 커넥션 실패 : Failed to connect to repository : Failed to setup credentials 2. git repository 에 설정한 계정문제 : Invalid username ..

아침에 출근 후 빠르게 배포할일이 있어 커밋하고 push 를 했는디한참 걸리더만 아래와 같은 오류들을 내뿜었다. 08:58:46.323: [...] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin refs/heads/dev:devremote: Internal Server Errorfatal: unable to access 'https://github.com/....git/': The requested URL returned error: 500...fatal: unable to access 'https://github.com/....git/': The ..

앞단에 웹서버를 Nginx 를 사용하고 있는 상태에서어플리케이션서버의 용량을 아무리 늘려봤자 Nginx 에 설정 된 요청크기를 초과하면 request 를 받을 수 없다. 그래서 어플리케이션서버의 용량과 동일하거나 더 크게 설정해야 한다. 어플리케이션 서버에서는 프로퍼티에 최대 파일 사이즈를 100MB 로 설정하였다. spring: servlet: multipart: max-file-size: 100MB location: /data/uploadFiles Nginx 의 default body size 는 1MB 이다.그래서 Nginx 의 설정없이 사이트를 운영하면 1MB 이상의 요청이 있을때 에러메세지를 낼 것이다. Nginx의 구성에 따라 사이즈를 조정해줘야..

접속자의 로그를 남기려고 HttpServletRequest 의 getRemoteAddr() 을 호출해보았다. public static String getClientIP(HttpServletRequest request) { ... return request.getRemoteAddr();} 내가 아는 장비에서 테스트 해보면 ... 뭔가 정확한 ip 주소가 나오지 않았다. 그 이유는 getRemoteAddr() 은 직접적인 IP만 반환하며, 프록시나 로드밸런서 또는 그 외 다른 네트워크 장비를 탄다면 실제 ip 주소를 얻기는 힘들다. 그래서 요청헤더의 정보를 받아 아래와 같이 실제 클라이언트의 ip 를 얻을 수 있다. import javax.servlet.http.HttpServletReque..

유저 권한에 따라 모든 쿼리에 조회조건이 추가되야 하는 경우가 생겼다.예를 들면 '본인 소속 데이터만 조회해야 하는 권한자 일 경우' 매 쿼리마다 유저권한을 체크해서유저 부서와 쿼리 데이터를 비교하는 조건절을 추가해야 하는 상황이 생겼다. 제네릭하게 구현해보려다가PathBuilder 를 사용해서 모든 엔티티를 비교하는 메소드를 작성하였다. PathBuilder 란? QueryDSL 에서 제공하는 유연한 클래스이며,엔티티의 QClass를 직접 사용하는 대신, 동적으로 엔티티의 속성에 접근할 수 있는 클래스이다.동적으로 생성된 엔티티나 필드를 다룰때 유용하다. PathBuilder 의 특징이라면QClass 없이 엔티티에 접근가능하고제네릭 메소드와 함께 사용하여 런타임 오류를 방지하고특정 엔티티..