본문 바로가기

전체 글150

MongoServerError: Authentication failed. MongoServerError: Authentication failed. 또는 MongoServerError: not authorized on admin to execute command MongoServerError: Authentication failed. 에러 내용 mongosh로 유저 생성 등의 초기화 과정을 수행하기 위해 db.auth()를 진행했지만 위와 같은 오류를 만났습니다. MongoServerError: Authentication failed. 에러 원인 놀랍게도 MONGO_INITDB_ROOT_USERNAME=root MONGO_INITDB_ROOT_PASSWORD=passwd 등으로 root의 username과 password를 설정해도 해당 username과 password로 바로.. 2023. 5. 15.
nginx load balancer 중 MongooseServerSelectionError: Invalid message size: 1347703880, max allowed: 67108864 또는 MongoParseError: option maxbsonsize is not supported MongooseServerSelectionError: Invalid message size: 1347703880, max allowed: 67108864 또는 MongoParseError: option maxbsonsize is not supported nginx load balancer 에러 내용 mongod replica set와 nginx load balancer을 구현하는 도중 mongoose.connect 시 다음과 같은 에러가 출력된다. 이에 대한 몇 가지 해결책인 bufferCommands : false 또는 maxBsonSize : 1677216를 mongoose.connect에 추가하여도 다음과 같은 에러가 출력되며 해결되지 않는다. 그 외에도 setParameter 등으로 maxBSON.. 2023. 5. 12.
mongod --keyFile 시 permissions on /etc/mongodb.key are too open 또는 /etc/mongodb.key: bad file mongod --keyFile 시 permissions on /etc/mongodb.key are too open 또는 /etc/mongodb.key: bad file key: bad file or key are too open 에러 내용 docker-compose를 활용해 mongodb replica set을 구축하는 도중 위와 같은 에러들을 만났습니다. key: bad file or key are too open 에러 원인 permissions on /etc/mongodb.key are too open : keyFile의 mode가 소유자 읽기 전용(400)이 아닌 다른 유저들이 읽을 수 있는 등 보안이 필요한 keyFile에 올바르지 않은 mode를 가지고 있기 때문입니다. /etc/mongodb... 2023. 5. 12.
티스토리 글쓰기 : 에디터가 정상적으로 실행되지 않았습니다. 잠시 후 다시 시도해주세요. 에디터가 정상적으로 실행되지 않았습니다. 잠시 후 다시 시도해주세요. 에러 내용 크롬에서 티스토리 글쓰기를 하는 도중 만난 에러입니다. 에러 원인 모르겠습니다. 해결 방법 1. 모든 창을 껏다가 킨다. 2. 브라우저를 업데이트 한다. 3. Microsoft Edge로 티스토리 글쓰기를 한다. 모두 해보았지만 3번으로 해결하였습니다. 감사합니다. 2023. 5. 10.
Visual Studio(비주얼 스튜디오) 주석 Visual Studio(비주얼 스튜디오) 주석 주석하기 : Ctrl + K + C 주석 해제 : Ctrl + K + U Ctrl + A로 전체 선택 후 전체 주석도 가능 드래그 후 드래그 영역 주석도 가능 커서 위치의 한 줄 주석도 가능 관련 자료 VS code 자주 쓰는 단축키 정리 (기본 설정 기준, 각 short cut 들은 사용자 임의로 변경 가능) 디스플레이 제어 및 에디터 제어 전체 화면 토글: f11 글자 확대/축소 : ctrl+ 또는 ctrl- 빠른 종료 (quit): crtl + q 파일 열기 : ctrl + o (이후 amkorousagi-money.tistory.com 2023. 5. 10.
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client [ERR_HTTP_HEADERS_SENT] 에러 내용 express에서 응답을 하는 도중 위와 같은 오류가 출력됩니다. [ERR_HTTP_HEADERS_SENT] 에러 원인 이미 응답을 보냈는데 한번 더 응답을 보내면 위와 같은 오류가 출력됩니다. 이미 전송한 응답에 있는 메시지를 수정할 수 없기 때문입니다. 저의 경우에는 middleware에서 설정한 error handling 후 실패 응답을 보냈는데 이후 종료하지 않고 next()를 호출하여 다시 응답을 보내려고 시도하였기 때문에 발생하였습니다. [ERR_HTTP_HEADERS_SENT] 해결 방법 응.. 2023. 5. 10.