-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Unable to create party or guild on local docker install #14349
Comments
The real issue is "originalError: MongoError: Transaction numbers are only allowed on a replica set member or mongos." Locally it needs to be run as a replica set rather than a standalone server. Checkout: https://www.mongodb.com/docs/manual/tutorial/convert-standalone-to-replica-set/ Let me know if that helps. :) |
This does appear to be the culprit:
As this doesn't appear to be by design (replica sets appear to be referenced elsewhere in the docs), I'll investigate further, though my guess is that the flag is missing from the Dockerfile. |
Not only is the flag missing, though I noticed the docker-compose.dev is still pulling Mongo 3.6. As these API routes use transactions (for v3 and v4, it seems), it seems we want to be using Mongo 4.2.8, as The answer, in broad strokes, would be to do something like this for new installs:
Then there's the matter of running Caveat: Folks should note that this solution will not upgrade an existing database from 3.6 to 4.2.8. Those who need to keep their data are going to have to follow the Mongo upgrade path from 3.6 to 4.0 to 4.2.8 incrementally, as dictated by the Mongo documentation. Most devs should be fine simply dropping their containers and rebuilding, while most self-hosters are saavy enough for it to be acceptable to leave it an exercise to the reader. Feedback on the approach is welcome in the interim. |
…Mongo 4.2.8 replica set.
I've seen a number of folks try to use something like |
I encountered this as well, wish I'd known before, now to either migrate Mongo myself or just re-install and add back all my data I added. that said, has anyone fiddled with like.. externalizing guild and stuff? I think it would be nice to have my "party" stuff be specific to the local install, say for kids and significant other, but it might be nice for the actual guild functionalities to look at the actual habitica.com data so you can tap into communities and stuff. that said I'm sure my user @ would not work w/ their apis and what not. |
I tried to use your changes @alexiswatson (after updating db to 4.2.8) And the default rs.initiate doesn't work for the My current workaround is just manually go into the container and do If anyone is trying to solve the party/guild problem and planning to use this, do back up the database before doing anything. |
@SabreCat and @phillipthelen Can y'all take a look at this? |
I've since retired my local Habitica, and with all the respect I have for the team and what they've built, I'm not in a position to iterate on this further--especially absent feedback on the direction after a year. I'd invite folks to use my PR as the foundation for future changes. |
@Neko-Box-Coder So are you using v4.2.8 or the default config, using this workaround? I don't know what this workaround is doing and what you mean by "the host changes every time". Yet, if you're talking about the hostname of the mongo-db container, one way to avoid it to change is using "hostname: mongo-db-host" in the yml file. But again, I'm saying this just in case it could magically help, as I don't see a reason why it would. Anyways, using @alexiswatson workaround, I'm facing the issue highlighted in the Wiki: |
Actually, I don't know whether it's been changed since then, but the |
2024-04-16 Update:
This is very empirical, and works on MyComputer(TM). I chose to keep v5 everywhere because I read this line in I'll keep you posted on my attempts to increase mongo version and also node version. |
Thanks for picking this up, @diyoyo! We greatly appreciate the time you're spending on this. Keep us posted! And thanks for getting this as far as you did, @alexiswatson--we also appreciate your time investment. |
@CuriousMagpie So far I have a running dev version on Docker on RPi CM4 (arm) with the following:
Now, I'm trying to build v5.20.0. I found an issue with the "npm run install" that was trying to run postinstall too soon, apparently. So I renamed the postinstall to Now, it builds, but then I get:
Any idea why the network is not created ? PS: if I run
Any idea? Thanks. |
Ok, I still have this So far I have my own Progress log:
|
@SabreCat Can you take a look at this? Thanks! |
General Info
Description
When trying to create a party or guild the site just spills out Unexpected error has occurred on the top right of the page. What is odd is I could have sworn this worked earlier this week, but now on a fresh install it stopped working
Console Errors
when looking at the logs of the server,
So it looks like the issue has something to do with,
MongoError: This MongoDB deployment does not support retryable writes. Please add retryWrites=false to your connection string.
I have tried appending ?retryWrites=false into docker-compose but when I do the build just fails
The text was updated successfully, but these errors were encountered: