Giter VIP home page Giter VIP logo

Comments (5)

codeing999 avatar codeing999 commented on September 10, 2024
{"t":{"$date":"2022-11-14T15:19:25.693+09:00"},"s":"F",  "c":"CONTROL",  "id":20573,   "ctx":"initandlisten","msg":"Wrong mongod version","attr":{"error":"UPGRADE PROBLEM: Found an invalid featureCompatibilityVersion document (ERROR: BadValue: Invalid value for version, found 6.0, expected '4.4' or '4.2'. Contents of featureCompatibilityVersion document in admin.system.version: { _id: \"featureCompatibilityVersion\", version: \"6.0\" }. See https://docs.mongodb.com/master/release-notes/4.4-compatibility/#feature-compatibility.). If the current featureCompatibilityVersion is below 4.2, see the documentation on upgrading at https://docs.mongodb.com/master/release-notes/4.4/#upgrade-procedures."}}

4.4로 내린 후에 뜨는 에러.
여러 로그들 중에
"s":"F"
이렇게 표시된 줄이 실패한 원인줄인 듯 하다. 이 때의 저 F가 Fail.

from web_socket_practice.

codeing999 avatar codeing999 commented on September 10, 2024

해당 에러는, 몽고db는 재설치했지만
data/db 폴더의 내용에 전에 있던 6.x버전이 만들어놓은 파일들을 지우지 않아서 생긴 것이었다.
해당 파일들을 지우니 해결되었고
image
몽고db 캠퍼스로도 연결 잘 되는 것을 확인.
여기까지는 6.x버전으로도 됐던 것으로, 이제 코드에서도 잘 연결 되는지 확인해보아야 함

from web_socket_practice.

codeing999 avatar codeing999 commented on September 10, 2024
몽고디비 연결 에러 MongoParseError: option usecreateindex is not supported

이 에러는

      useCreateIndex: true,

위 코드 때문에 나타나는데 책에는 없고 제공되는 코드에만 있는 것으로 확인
해당 코드를 지우니 해당 에러 해결

from web_socket_practice.

codeing999 avatar codeing999 commented on September 10, 2024

image
앱을 실행하면
몇초 후에 연결이 끊겼다는 에러 발생

from web_socket_practice.

codeing999 avatar codeing999 commented on September 10, 2024

image

드디어 연결 성공.

일단 설치 후의 과정을 정리하자면

  1. 몽고db설치경로/bin 을 환경변수로 등록.
  2. 콘솔에서 mongod 를 입력하여 db 실행
  3. 다른 콘솔창을 열고 mongo를 입력.
    프롬프트가 >로 바뀐 뒤,
use admin
db.createUser({user:'이름', pwd:'비밀번호', roles:['root']})

를 입력하여 계정 생성 (이는 최초에만 하면 됨)

여기까지는 책에 나온 내용이고.
이후에 에러가 나던 부분은 검색 결과,

const MONGO_URL = `mongodb://${MONGO_ID}:${MONGO_PASSWORD}@localhost:27017/admin`;

이부분에서 localhost를 127.0.0.1로 바꾸면 해결되었다.

from web_socket_practice.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.