Comments (6)
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.
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.
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.
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.
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.
So, restarting the whole cluster solved the issue. Probably something old that was preserving. Closing the issue.
from mongo-k8s-sidecar.
Related Issues (20)
- Unable to configure master slave in Azure K8s HOT 1
- Issue with headless service connection string
- Alternating add/remove addresses HOT 1
- Connect to database from outside kubernetes HOT 3
- k8s 添加验证报错
- Tag docker image with version HOT 1
- Is this project still a PoC? Is it production ready? HOT 10
- Connection timed out (worked well before) HOT 1
- sidecar correctly does config on first mongo cluster only HOT 2
- Can not work when server require client present a CA file.
- Error in workloop RangeError [ERR_SOCKET_BAD_PORT] HOT 1
- Kubernetes API version (apps/v1beta1) should be updated to apps/v1
- (Error in workloop { MongoError: failed to connect to server [127.0.0.1:27017]) - After scaling up HOT 4
- Trying to deploy the mongodb using kubernetes HOT 1
- Unable to scale up more than 7 replicas HOT 1
- Using this sidecar disables running docker-entrypoint scripts HOT 2
- errro due to RBAC. how to change default user in setup
- Permission error HOT 4
- unable to get sidecar initialize my mongo-pod
- Error in workloop { MongoError: Unsupported OP_QUERY command: replSetGetStatus. The client driver may require an upgrade.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongo-k8s-sidecar.