Comments (5)
you need to configure your MongoDB as Replica Set.. you can follow this official tutorial: https://docs.mongodb.com/manual/tutorial/deploy-replica-set/
If you want to give Rocket.Chat on a deployment not designed for production, you can use MongoDB without configuring it as replica set. to do that just removes the MONGO_OPLOG_URL
env var from you startup.
I'll be closing the issue since this is not an issue with Rocket.Chat nor its Official imagem.
from docker.official.image.
Hi @sampaiodiego, could you please be more specific in your reply? How could I run Rocket.Chat with a single instance of MongoDB? I have a docker-compose.yml file but it does not specify any MONGO_OPLOG_URL
and still I get the same issue as above.
Thanks
from docker.official.image.
hi @achaiah .. starting from version 1.0 we have removed the possibility to run Rocket.Chat without using a replica set.
that means you'll need to set the MONGO_OPLOG_URL
env var.. you can have a single MongoDB as replica set, please the tutorial I've shared before https://docs.mongodb.com/manual/tutorial/deploy-replica-set/
from docker.official.image.
I got the same error and its occurring because rocket.chat starts first then the replicaset containers.
So I add the command on docker-compose file:
...
image: "rocket.chat"
command: >
bash -c
"for i in `seq 1 30`; do
node main.js &&
s=$$? && break || s=$$?;
echo \"Tried $$i times. Waiting 5 secs...\";
sleep 5;
done; (exit $$s)"
...
https://github.com/RocketChat/Rocket.Chat/blob/develop/docker-compose.yml
from docker.official.image.
Hi, I am having the same problem.
Situation:
I run Rocketchat with a 3-fold Mongo-replicaset: Pods named mongodb-0, mongodb-1 and mongodb-2. . It works fine.
But after a power interupt on the cluster Mongo-DB has changed wich member of the replicaset is the Primary. Before the power interupt Mongo-0 is the primary, after the power interrupt Mongo-2 has become Primary.
Because the Rocketchat configuration expect mongodb-0 to be the primary:
- name: MONGO_OPLOG_URL
value: mongodb://**mongodb-0.**mongodb:27017/local?replSet=rs0
this results the following error in the Rocketchat logs:
/app/bundle/programs/server/node_modules/fibers/future.js:313
throw(ex);
^
MongoError: not master and slaveOk=false
at MessageStream.messageHandler (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connection.js:272:20)
at MessageStream.emit (events.js:314:20)
at processIncomingData (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/message_stream.js:144:12)
at MessageStream._write (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/message_stream.js:42:5)
at doWrite (_stream_writable.js:403:12)
at writeOrBuffer (_stream_writable.js:387:5)
at MessageStream.Writable.write (_stream_writable.js:318:11)
at Socket.ondata (_stream_readable.js:718:22)
at Socket.emit (events.js:314:20)
at addChunk (_stream_readable.js:297:12)
at readableAddChunk (stream_readable.js:272:9)
at Socket.Readable.push (stream_readable.js:213:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23) {
operationTime: Timestamp { bsontype: 'Timestamp', low: 2, high: 1663192744 },
ok: 0,
code: 13435,
codeName: 'NotMasterNoSlaveOk',
'$clusterTime': {
clusterTime: Timestamp { bsontype: 'Timestamp', low: 2, high: 1663192744 },
signature: {
hash: Binary {
_bsontype: 'Binary',
sub_type: 0,
position: 20,
buffer: Buffer(20) [Uint8Array] [
0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0
]
},
keyId: 0
}
},
[Symbol(errorLabels)]: Set { 'RetryableWriteError' }
Does anybody know how to solve this?
from docker.official.image.
Related Issues (20)
- 5.3.3 release HOT 1
- Invalid interpolation format for "rocketchat" option in service "services": "registry.rocket.chat/rocketchat/rocket.chat:${RELEASE:-latest}" HOT 4
- Image for Version 5.4.3 HOT 1
- Global slow down when using jitsi app HOT 1
- transfer data from a dumpfile to a new instance of rocket chat
- Proposition Dockerfile arm64
- No docker images beyond 6.0.0? HOT 7
- Application Error after upgrade to 6.2.0 HOT 1
- update to latest version HOT 1
- Failure to update latest package - Error: Can't find migration version 256 HOT 2
- Issue installing rocket chat on truenas
- Image is using an EOL version of NodeJS HOT 2
- Error on bringing up latest docker compose HOT 4
- Loading animation and attempt to POST to localhost:3000 HOT 7
- keeps loading 3 dots when accessing the domain HOT 4
- No updates since 6.4.2 release? HOT 3
- Update Readme with new Docker Compose command
- [compose.yml] bitnami/mongodb crashes with Illegal instruction on Apple Silicon
- 6.6 docker image creates broken containers (glibcxx_3.4.29) HOT 3
- we need arm v8 thanks
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 docker.official.image.