Giter VIP home page Giter VIP logo

Comments (6)

Pensu avatar Pensu commented on July 25, 2024 1

Ah, ok, got it, looks like I am running 2.6, let me change that to 3 and will update.

usr/bin/mongod --help for help and startup options
2017-05-25T10:16:23.550+0000 [initandlisten] MongoDB starting : pid=7 port=27017 dbpath=/data/db 64-bit host=09b982be4355
2017-05-25T10:16:23.550+0000 [initandlisten] db version v2.6.3
2017-05-25T10:16:23.550+0000 [initandlisten] git version: nogitversion
2017-05-25T10:16:23.550+0000 [initandlisten] OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014
2017-05-25T10:16:23.550+0000 [initandlisten] build info: Linux fisher02 3.13.0-16-generic #36-Ubuntu SMP Tue Mar 4 23:03:28 UTC 2014 ppc64le BOOST_LIB_VERSION=1_55
2017-05-25T10:16:23.551+0000 [initandlisten] allocator: tcmalloc
2017-05-25T10:16:23.551+0000 [initandlisten] options: {}
2017-05-25T10:16:23.573+0000 [initandlisten] journal dir=/data/db/journal
2017-05-25T10:16:23.574+0000 [initandlisten] recover : no journal files present, no recovery needed
2017-05-25T10:16:24.450+0000 [initandlisten] preallocateIsFaster=true 8.92
2017-05-25T10:16:25.387+0000 [initandlisten] preallocateIsFaster=true 9.24
2017-05-25T10:16:27.273+0000 [initandlisten] preallocateIsFaster=true 9.3
2017-05-25T10:16:27.274+0000 [initandlisten] preallocateIsFaster check took 3.7 secs

from mongo-k8s-sidecar.

cvallance avatar cvallance commented on July 25, 2024

What version of Mongo are you running? The code is basically calling this mongo function: https://docs.mongodb.com/manual/reference/command/replSetGetConfig/

So if you don't have at least version 3 of mongo, it won't work.

from mongo-k8s-sidecar.

Pensu avatar Pensu commented on July 25, 2024

So, I am using this package.json: https://github.com/cvallance/mongo-k8s-sidecar/blob/master/package.json, and it's installing 2.2.27, which I understand is the latest version that can be installed using npm: https://www.npmjs.com/package/mongodb

Should I install mongo directly i.e. without npm or is there any other way so that I can get version 3 of mongo with npm?

from mongo-k8s-sidecar.

cvallance avatar cvallance commented on July 25, 2024

No no, what version of mongo itself are you using.

The version you are seeing in the package.json is the version of the mongo sdk for nodejs.

from mongo-k8s-sidecar.

Pensu avatar Pensu commented on July 25, 2024

Hey, I tried with mongo version 3.2, here is the error I am getting:

replSetReconfig { _id: 'rs0',
  version: 148080,
  members: 
   [ { _id: 1,
       host: '10.1.23.157:27017',
       arbiterOnly: false,
       buildIndexes: true,
       hidden: false,
       priority: 1,
       tags: {},
       slaveDelay: 0,
       votes: 1 },
     { _id: 2,
       host: '10.1.220.17:27017',
       arbiterOnly: false,
       buildIndexes: true,
       hidden: false,
       priority: 1,
       tags: {},
       slaveDelay: 0,
       votes: 1 },
     { _id: 4,
       host: '10.1.23.158:27017',
       arbiterOnly: false,
       buildIndexes: true,
       hidden: false,
       priority: 1,
       tags: {},
       slaveDelay: 0,
       votes: 1 },
     { _id: 5, host: '10.1.220.20:27017' },
     { _id: 6, host: '10.1.23.158:27017' },
     { _id: 7, host: '10.1.220.21:27017' } ],
  settings: 
   { chainingAllowed: true,
     heartbeatIntervalMillis: 2000,
     heartbeatTimeoutSecs: 10,
     electionTimeoutMillis: 10000,
     getLastErrorModes: {},
     getLastErrorDefaults: { w: 1, wtimeout: 0 } } }
Error in workloop { MongoError: Found two member configurations with same host field, members.2.host == members.4.host == 10.1.23.158:27017
    at Function.MongoError.create (/opt/cvallance/mongo-k8s-sidecar/node_modules/mongodb-core/lib/error.js:31:11)
    at /opt/cvallance/mongo-k8s-sidecar/node_modules/mongodb-core/lib/connection/pool.js:497:72
    at authenticateStragglers (/opt/cvallance/mongo-k8s-sidecar/node_modules/mongodb-core/lib/connection/pool.js:443:16)
    at Connection.messageHandler (/opt/cvallance/mongo-k8s-sidecar/node_modules/mongodb-core/lib/connection/pool.js:477:5)
    at Socket.<anonymous> (/opt/cvallance/mongo-k8s-sidecar/node_modules/mongodb-core/lib/connection/connection.js:321:22)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at readableAddChunk (_stream_readable.js:178:18)
    at Socket.Readable.push (_stream_readable.js:136:10)
    at TCP.onread (net.js:561:20)
  name: 'MongoError',
  message: 'Found two member configurations with same host field, members.2.host == members.4.host == 10.1.23.158:27017',
  ok: 0,
  errmsg: 'Found two member configurations with same host field, members.2.host == members.4.host == 10.1.23.158:27017',
  code: 103 }

Looks like something related to host mapping, any suggestions?

from mongo-k8s-sidecar.

Pensu avatar Pensu commented on July 25, 2024

So, restarting the whole cluster solved the issue. Probably something old that was preserving. Closing the issue.

from mongo-k8s-sidecar.

Related Issues (20)

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.