Coder Social home page Coder Social logo

Comments (17)

psonnera avatar psonnera commented on July 20, 2024 1

Good idea. Will add this to the scripts.

from nightscout.github.io.

psonnera avatar psonnera commented on July 20, 2024

Great feedback. Thanks!
Mongodb has been changing Atlas account creation web pages a few times since I first created it.
Maintenance mode is not necessary since the mLab database will turn to read only when migration starts, i.e. no conflicting activities during this phase and neither after. Uploaders will just not be able to add data in the original dB until the string is changed to Atlas.
I want to embed directly the helper javascripts in the web page but can't do that in markdown, so I need to freeze it and edit the html.
Time is getting short now. Will try to do that ASAP, even if that makes me surrender the Azure migration guide.

from nightscout.github.io.

bjornoleh avatar bjornoleh commented on July 20, 2024

Thanks.

I found that the Restart all dynos step is not required, since the site is restarted when a config variable is changed.

I was wondering about, and found out that "Project0" in Atlas can be deleted. Not sure if it is worth mentioning.
https://docs.mlab.com/how-to-migrate-nightscout-sandbox-heroku-addons-to-atlas/#create-atlas-org

I am still wondering if there can be a link from the Heroku pages, like with the mLab MongoDB sandbox add-on and Papertrail? Does not look like that is an option. Doesn't really matter.

from nightscout.github.io.

psonnera avatar psonnera commented on July 20, 2024

@bjornoleh you are right. Restart all dynos is not necessary. Removed.
Yes, you can delete Project0 but why bother? It might be an useless trouble for those not understanding what they do.
Atlas not being an Herolu add-on there's no link...

And good news for me: you can embed javascript in markdown, so I'll simplify the strings handling and PR.
Preview here: https://psonnera.github.io/nightscout.github.io/update/migrate_heroku/
Tested in Safari 13.1, Chrome 85.0 and Edge 86.0.

from nightscout.github.io.

bjornoleh avatar bjornoleh commented on July 20, 2024

@psonnera Great news with the embedded script! Looks ok with Android/ Chrome too, but haven't tested the scripts as such.

The other thing I mentioned are none-issues.

Ideally, the manual instruction for creating the string should be removed to a separate page, so it won't confuse those who succeeded with the script. But it should be feasible for most as it is now.

Just a comment about this: perhaps write 'paste" instead of "copy"?

20201011_230541

from nightscout.github.io.

psonnera avatar psonnera commented on July 20, 2024

Done in last PR.

from nightscout.github.io.

christerjensen avatar christerjensen commented on July 20, 2024

Followed the guide yesterday - very good instructions - BUT - even if everyting seems to go as planned, the migration failed.

I found the problemm to be the password from the mLab user. I have a feeling users that created a manual mLab database user will fail. Probably due to a short password. Out password was only 6 letters (set up 6 years ago). When I logged in to Atlas it seems like the user didnt have a password - is there a password limit?

I solved the problem by autogenerating a new 24-digit password in Atlas and changed the Mongo_conncectin string with the new password.

from nightscout.github.io.

old-square-eyes avatar old-square-eyes commented on July 20, 2024

Similar scenario for me. Older, shorter password (though no issue with that). Successful (all green) progression through the migration doc (which is wonderful thanks!). NS failed to load after the changeover.

For me I traced it back to the the instruction to click on the mlab integration/addon link from within Heroku and to leave the window open. Turns out the mlab link form Heroku was linking to some empty DB (with NS collections). I'm guessing it was auto setup some time in the past.

122167187_1397343430609475_2961086923194916322_o

I came from Azure before Heroku. Not sure if that's it. But once I linked my correct mlab account in Atlas for the migration it worked.

The tools to check my strings actually passed validation, as did the test connection and import. I got all the way through the instructions having the wrong connection string until the final step where I was told "that's it - you're done", only to find a broken NS site. It was looking for the old config var MONGODB_URI.

121676612_1397327993944352_1033582604371186418_o

I was able to back trace and troubleshoot. So not stressed. Just raising that a few users may get tripped up here.

from nightscout.github.io.

christerjensen avatar christerjensen commented on July 20, 2024

All strings passed validation for me as well, same error. It worked after I changed the password to a 24-digit autogenerated one from Atlas.

I followed the Troubleshooting guide - https://nightscout.github.io/troubleshoot/troublehoot/#boot-error-unable-to-connect-to-mongo

When I looked at the Database Access - it seemed like there was no password. Since it passed all validations, and I saw the username and passord when I validated - it might be that Atlas will not accept short passwords?

from nightscout.github.io.

bjornoleh avatar bjornoleh commented on July 20, 2024

@psonnera I reopened this as a new issue emerged with users of some older NS setups, please see above.

from nightscout.github.io.

psonnera avatar psonnera commented on July 20, 2024

@bjornoleh at this point should we force users with a customized password to regenerate it like this? https://nightscout.github.io/troubleshoot/troublehoot/#boot-error-unable-to-connect-to-mongo

from nightscout.github.io.

bjornoleh avatar bjornoleh commented on July 20, 2024

@psonnera I dont know, question is if the users will remember or understand that the password they selected years back is in this category. I dont know if the script could have detected if the password matches the requirements of Atlas, whatever those are?

Perhaps @christerjensen or @old-square-eyes have an opinion?

from nightscout.github.io.

bjornoleh avatar bjornoleh commented on July 20, 2024

@psonnera I have a question about searching in collections in Atlas.

I can't sort the documents as suggested in your troubleshooting preview here:
https://psonnera.github.io/nightscout.github.io/troubleshoot/troublehoot/#data-in-the-future

I used the sort order feature in mLab quite a bit (ascending or descending), but have not found a way to do this in Atlas yet.

from nightscout.github.io.

psonnera avatar psonnera commented on July 20, 2024

@old-square-eyes you're right. Unlike the Heroku migration I forgot to add to delete MONGODB_URI. Thanks!
@christerjensen I tried to set my son's Atlas password to a single character (lower case a) and it liked it, there must be something else...
@bjornoleh mongodB doesn't specify any restrictions on database passwords...
But I'll give a refresh to the Atlas migration guide now.
Thank you all for taking time to feedback, this is really appreciated.

from nightscout.github.io.

old-square-eyes avatar old-square-eyes commented on July 20, 2024

I actually did delete the old var. NS seemed to look for it when Atlas failed.

My only comment is that the the doc shouldn't catagorically say to click into mlab from Heroku.

Maybe a huge warning that says "be sure you are logged into the account that matches your existing db connection string" where it says "Click mLab MongoDB"

from nightscout.github.io.

christerjensen avatar christerjensen commented on July 20, 2024

@psonnera There were no password in Atlas (pressed SHOW - empty). If the password should have been copied from mLab something must have gone wrong - possibly because I made the database user and password myself 6 years ago? I've seen a few of these errors the last few days.

from nightscout.github.io.

psonnera avatar psonnera commented on July 20, 2024

@christerjensen you cannot view your current password, it will always show empty. You can only see it if you change it

from nightscout.github.io.

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.