New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mongo instance doesn't support transactions #1169
Comments
I have the same error. I added
But now I have this new error: 2023-12-06 01:02:05 Cannot connect to mongodb |
This worked for me like a charm~ |
Great advise, thanks a lot! Now I got it working too. |
I'm also receiving this issue and tried to follow the comment on 1120 but I still had a time out error. Is there another fix out there? For context I'm trying to set this up on unraid so I'm not 100% familiar with the docker compose file in the comment but I believe I did the same thing on the unraid docker management to the best that I could. |
is it the same error that you cited? from my perspective, he didn't add the one-time container to start up mongodb: mongoinit:
image: mongo:4.4
# this container will exit after executing the command
restart: "no"
depends_on:
mongo:
condition: service_healthy
entrypoint:
[
"mongo",
"--host",
"mongo:27017",
"--eval",
'rs.initiate({ _id: "overleaf", members: [ { _id: 0, host: "mongo:27017" } ] })',
]
please provide us at least a logfile next time~ |
Yes, same error. You are correct I didn't realize that was a separate container. I'm not sure how to run a separate container like this on Unraid since it operates using templates and single docker containers instead of docker-compose files. Is there a way I can do it manually one time via the console, if not that is no problem and not an issue to be discussed here. |
Hello everyone. I managed to get it running in my Ubuntu Server 22.04.3. I used a different image for my mongodb though. Here's my Part that fixed the issue: mongo:
image: bitnami/mongodb:5.0
container_name: mongo
restart: always
ports:
- "27017:27017"
volumes:
- ~/mongo_data:/data/db
healthcheck:
test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
environment:
MONGODB_REPLICA_SET_MODE: primary
ALLOW_EMPTY_PASSWORD: 'yes' I hope that helps! Regards! |
works like a charm. |
Using this compose file on a fresh docker installation results in an ongoing restarting Sharelatex container, saying:
Mongo instance doesn't support transactions
sharelatex | MongoServerError: Transaction numbers are only allowed on a replica set member or mongos
sharelatex | at Connection.onMessage (/overleaf/services/web/node_modules/mongodb/lib/cmap/connection.js:231:30)
sharelatex | at MessageStream. (/overleaf/services/web/node_modules/mongodb/lib/cmap/connection.js:61:60)
sharelatex | at MessageStream.emit (node:events:517:28)
sharelatex | at processIncomingData (/overleaf/services/web/node_modules/mongodb/lib/cmap/message_stream.js:125:16)
sharelatex | at MessageStream._write (/overleaf/services/web/node_modules/mongodb/lib/cmap/message_stream.js:33:9)
sharelatex | at writeOrBuffer (node:internal/streams/writable:392:12)
sharelatex | at _write (node:internal/streams/writable:333:10)
sharelatex | at Writable.write (node:internal/streams/writable:337:10)
sharelatex | at Socket.ondata (node:internal/streams/readable:777:22)
sharelatex | at Socket.emit (node:events:517:28) {
sharelatex | ok: 0,
sharelatex | code: 20,
sharelatex | codeName: 'IllegalOperation',
sharelatex | [Symbol(errorLabels)]: Set(0) {}
The text was updated successfully, but these errors were encountered: