Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Robert Bullock 15 posts 75 karma points
    Jul 27, 2021 @ 01:25
    Robert Bullock
    0

    Umbraco 8 Upgrade: Can't Login... HELP!

    This is driving me nuts. I did a fresh install of Umbraco 8.15 and now I'm trying to connect to my 7.15.7 database to do the upgrade, except I can't login to authorize the upgrade! I can literally see that the passwords are exactly the same hash in both databases. I've tried logging in with the username and email address but neither work. And yes, membership providers are using legacyEncoding = true and all other settings match.

    Does anyone have a clue? This has stopped my migration to v8 dead in the water and there's nothing I see that should be preventing a login.

    Really need help, I'm sure someone else ran into this problem?

  • Yakov Lebski 473 posts 1878 karma points
    Jul 27, 2021 @ 02:26
    Yakov Lebski
    0

    check table umbracoUser column userNoConsole value should be false

  • Robert Bullock 15 posts 75 karma points
    Jul 27, 2021 @ 12:25
    Robert Bullock
    0

    Yeah, it’s set to false (0). What’s interesting is it does not seem to increment the failed login counter.

  • Marc Goodson 1767 posts 11711 karma points MVP 7x c-trib
    Jul 27, 2021 @ 11:48
    Marc Goodson
    0

    Hi Robert

    Did you see this issue:

    https://our.umbraco.com/Documentation/Fundamentals/Setup/Upgrading/migrating-to-v8?_ga=2.152323001.1664531814.1564385463-1412256652.1558683561#known-issues

    where the recommendation is to install the ProWorks.Umbraco8.Migrations package or migrate to 8.5 as the first step?

    As well as useLegacyEncoding (if this was false on your V7 site, it should stay as false for V8 for the upgrade) - do you also have the type set to be: type="Umbraco.Web.Security.Providers.UsersMembershipProvider, Umbraco.Web" in the UsersMembershipProvider?

    Do you have the Umbraco.Core.ConfigurationStatus set back to be 7.15.7 - so it's knows it needs to migrate?

    Another trick would be to login to your V7 site on the same url you are using for the migration, then switch it to the V8 migration site... and see if the cookie 'keeps you logged in!' and triggers the upgrade :-P

    regards

    Marc

  • Robert Bullock 15 posts 75 karma points
    Jul 27, 2021 @ 12:31
    Robert Bullock
    0

    Yes, followed all those steps. Installed the ProWorks migrations package so I didn’t need to install 8.5 then 8.15.

    What’s weird is I can see the hashed passwords are exactly the same. I can login to the 8.15 version as well. I do believe I logged in to the 8.15 version, then changed the web.config (without logging out) and I get prompted to login to authorize the plugin, so the cookie must not be there.

    I’ll dig around more today. Thanks for the suggestions everyone!

  • Nik 1522 posts 6732 karma points MVP 5x c-trib
    Jul 27, 2021 @ 12:20
    Nik
    0

    I'm not sure if this will work for an Upgrade process but, if you have SMTP details set up and the email element set in the UmbracoSettings.config file set, you might be able to use the forgotten password option to reset you password.

  • Robert Bullock 15 posts 75 karma points
    Jul 27, 2021 @ 12:32
    Robert Bullock
    0

    I’ll give that a try. Desperate for anything. But I’m skeptical the reset process will work on an upgrade. I’d assume the users table schema has changed somewhat.

  • Robert Bullock 15 posts 75 karma points
    Jul 27, 2021 @ 14:11
    Robert Bullock
    0

    Well, happy to say that after setting up SMTP, I was able to reset my password and get in! But then the DB upgrade failed because I still am using some obsolete pickers. ;-/

  • Nik 1522 posts 6732 karma points MVP 5x c-trib
    Jul 27, 2021 @ 14:13
    Nik
    1

    Pleased to hear the SMTP option worked :-)

    Which pickers are obsolete?

  • nickornotto 392 posts 884 karma points
    Dec 28, 2021 @ 22:04
    nickornotto
    0

    How did you reset password and what are SMTP settings? I can see the notification email in umbracosettings.config but I can't find any instructions how to reset password using this.

    I have exactly the same issue as yours, just the password hash in umbraco 8 seems to be different (longer) than in my umbraco 7.15.3 database which I am trying to upgrade. But the passwords are exactly the same.

    Thanks

  • nickornotto 392 posts 884 karma points
    Dec 28, 2021 @ 22:14
    nickornotto
    0

    Ignore the question. I managed to login.

    My case was that I had to add attributes to UsersMembershipProvider the same that I had in my web.config's of version 7.

    And the login worked.

    But then I got the timeout error on database upgarde:

    Error during installation The database failed to upgrade. ERROR: The database configuration failed with the following message: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Please check log file for additional information (can be found in '/App_Data/Logs/')

    So need to wrok this out now :(

  • Jamie Attwood 181 posts 466 karma points c-trib
    Dec 28, 2021 @ 22:16
    Jamie Attwood
    0

    @nickornotto you need to first migrate to 8.5.5. That will let you login, then you will need to upgrade your db from there to the latest. I have never been able to directly migrate from 7.15.x to the latest 8x despite having all the migration packages installed. Hope that helps.

    SMTP settings are in the web.config but unless you have outgoing SMTP set up on your local dev machine or set the smtp for an external SMTP service such as GMAIL, Exchange etc. the reset password route may be more work than just doing an intermediate set-up.

  • nickornotto 392 posts 884 karma points
    Dec 28, 2021 @ 22:16
    nickornotto
    0

    Did you actually copy your old custom web.config content before the db upgrade or after the db upgrade?

  • nickornotto 392 posts 884 karma points
    Dec 29, 2021 @ 19:04
    nickornotto
    0

    @Jamieattwood Yes, but if I understand correctly - the ProWorks migration works for versions 8.7+

    Also on their instructions article step 9 says upgrade to the latest: https://www.proworks.com/blog/archive/how-to-upgrade-umbraco-version-7-to-version-8

    Step 9: Nuget install Umbraco 8.x.x (latest) into your project

    On Umbraco instruction page https://our.umbraco.com/Documentation/Fundamentals/Setup/Upgrading/migrating-to-v8 is this:

    A migration was introduced in v8.6 which 'currently' breaks the migration process. See Issue #7914 for more details.

    As a workaround, you can either

    • Migrate to version 8.5 as a first step, and then post-migration, carry out a normal Umbraco upgrade to the latest version of Umbraco
      8, or
    • Install the following community Nuget Package: ProWorks Umbraco 8 Migrations into your V8 project before running the migration (no configuration required). This package was created by Umbraco Gold Partner ProWorks and patches the migration process so you can migrate directly from the latest Umbraco 7 to V8.6+ without
      encountering the above issue (and other issues too #h5yr).

    So you are saying the second option above will not work?

  • Jamie Attwood 181 posts 466 karma points c-trib
    Dec 29, 2021 @ 21:38
    Jamie Attwood
    0

    In various attempts to upgrade multiple 7.15x sites to current versions of 8, I have never able to make it in one step despite using the ProWorks migrations. For some reason I was never able to authorize the upgrade despite having all the correct user and membership config settings set correctly.

    So now I simply have an Umbraco 8.5.5 project at the ready in VS and on my local IIS. I hook the V7 DB up to that, let it upgrade the DB then reconnect the DB up to the latest version. All good after that. I should note that all my Umbraco sites have had multiple 7x upgrades over the years and the migration issues are only around authenticating the admin user on upgrade.

    Re-web config settings, I leave everything per the V8 install that you are using. The only config elements that I change pre-migration is the membership configuration settings. Since you are trying to only upgrade the DB as step one, you should not really need anything other than the default V8 config settings. After that succeeds you can introduce custom components as needed.

    You can also try to set the timeout in MSSQLMS here if it continues:

    https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/configure-the-remote-query-timeout-server-configuration-option?view=sql-server-ver15

    Cheers!

  • nickornotto 392 posts 884 karma points
    Dec 29, 2021 @ 21:59
    nickornotto
    0

    Well, I guess you also need to update Umbraco.Core.ConfigurationStatus on newly installed umbraco 8 since the key has empty value and it is needed to determine the kind of upgrade?

    I had to fill it in with 7.15.3 - the version I am upgarding from, otherwise I was getting the version error.

    I actually tried to upgrade the database now to version 8.5.5 as you suggested and it run for 2h until I got again timeout error again:

    Error during installation The database failed to upgrade. ERROR: The database configuration failed with the following message: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Please check log file for additional information (can be found in '/App_Data/Logs/')

    See the log for full details (logs can typically be found in the App_Data\Logs folder).

    When I was upgrading from 7.15.3 to the latest 8.17.1 yesterday I got the same error but just faster and at the beginning of the database error.

  • Jamie Attwood 181 posts 466 karma points c-trib
    Dec 29, 2021 @ 22:12
    Jamie Attwood
    1

    Yes you are correct about version settings.

    The error you are seeing is from the CommandTimeout which can't be set in the web.config so my only guess is that the database must be very large... if it's timing out. Empty the recycle bin, empty the media recycle bin. Have you cleaned out the old versions from your 7.15.3 project? Install the Unversion package to clean out all the old content versions in your 7 project and clean up the database as good as you can to reduce the number of rows and the amount of time required to execute the migration.

    Also check out: https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/configure-the-remote-query-timeout-server-configuration-option?view=sql-server-ver15

    To set the timeout on your local SQL Server via management studio if your migration takes longer than the default 10 mins.

  • nickornotto 392 posts 884 karma points
    Dec 29, 2021 @ 22:23
    nickornotto
    0

    Yes, I de-versioned and cleared my bins

    I found this thread and trying luck with version 8.2.1 atm: https://our.umbraco.com/forum/using-umbraco-and-getting-started/100594-migration-from-714-to-8

    I don't think my website is extremely large although it is not just a simple corporate website.

    I believe Umbraco should handle such database with ease if they pretend to deliver the solution for serious companies ;)

  • Jamie Attwood 181 posts 466 karma points c-trib
    Dec 29, 2021 @ 23:11
    Jamie Attwood
    0

    A few questions:

    • Did you verify that your versions are in fact gone? I am not 100% if unversion clears versions on startup or only on a save and publish on a particular content item. Make sure your unversion config is set to all doc types and clears all your versions (except for the active and last version which Umbraco needs to keep). You can verify that by looking at the audit trail for a content item and see if it is reduced to 2 entries. If it's not, you have still multiple versions in there and might need to do something like re-publish the entire website to in fact clear each version history for each content item. There can be 100's of rows for each content item's versioning for each property on each document type depending on how active your editors are - regardless of the number of nodes in your site.

    • The query timeout parameter in the connection string is not the same error as you were citing as a command timeout. Command timeout you fix either in code (which you can't control) or override it in MSSQLMS - set it to 0 for unlimited. You can try adding the connection timeout in the QS per the link in your post, but the error you were referring to is a command timeout and you should be able to get past this by extending the timeout. I have had to do this as well in the past a few of my migrations took far longer than the default 10 mins.

    The migration process is in no way "easy" and usually painful. The end result however is that you don't need to rebuild all your content! :)

    Hope this helps!

    Jamie

  • nickornotto 392 posts 884 karma points
    Dec 30, 2021 @ 17:43
    nickornotto
    0

    Replying to your questions:

    1. Yes I did. (It would be dumb not to check whether it worked)

    I followed strictly the steps from the instructions of ProWorks, including upgrading pickers to use Udi etc.: https://www.proworks.com/blog/archive/how-to-upgrade-umbraco-version-7-to-version-8 so I had to do a thorough check of the solution before starting the upgrade ;)

    1. I know they're not the same. I think you are confusing me with someone else from the post I quoted.

    I did set remote query timeout on the db server to 0, yet I still receive the timeout (after 3hours of running it - from v 7.15.3 to v 8.2.1).

    After reading some issues we're trying version 8.4 now

  • Marc Goodson 1767 posts 11711 karma points MVP 7x c-trib
    Jan 01, 2022 @ 19:06
    Marc Goodson
    0

    Hi nickornotto

    How fragmented are your SQL Server indexes... Betting on 99% if you have had the v7 site for a while!

    This gist should tell you..

    https://gist.github.com/marcemarc/9d6553e881a7cf536c8bd98f8c35fd92

    I've taken to rebuilding these indexes before attempting a v7 to v8 upgrade... Any bump to performance you can give to the SQL queries lessens the chance of a timeout... But if you are using SQL Azure I've found it's also worth temporarily scaling up the DTUs to make it work faster...

    Regards

    Marc

  • nickornotto 392 posts 884 karma points
    Jan 01, 2022 @ 20:23
    nickornotto
    0

    It was difficult not to have it for a while since the v7 released in 2013 and v8 in 2019 so that was 6 years of v7 career at least :)

    I'll try the query and report here. Thanks

  • Robert Bullock 15 posts 75 karma points
    Jul 27, 2021 @ 15:08
    Robert Bullock
    0

    Not a ton, but we were still using the old Content and Media pickers... never got around to upgrading to the new ones. I found the Skrift migrations project which is great, but not sure how it works with media types. Examples all seem to be for document types so not really clear on that yet.

  • Jamie Attwood 181 posts 466 karma points c-trib
    Aug 26, 2021 @ 16:17
    Jamie Attwood
    0

    @Robert Bullock, SMTP reset allowed you in? I have the exact same problem. Migrating from 7.15.7 to 8.15.2 and simply can not login. All providers are set correctly per the docs, Pre and post migration packages in place. The PostLogin reports:

    Message":"An error has occurred.","ExceptionMessage":"No user found by id 0"
    

    The failed logins are not incremented in the DB connection string is fine however.

    Then when trying to reset the password I get:

    Message":"An error has occurred.","ExceptionMessage":"UserId not found."

    Very Strange. Any other suggestions?

  • Jamie Attwood 181 posts 466 karma points c-trib
    Aug 27, 2021 @ 17:06
    Jamie Attwood
    0

    Anyone else that is doing a direct upgrade from 7.15.x to 8.5.5+ and can't login, I suggest that you do a content migration from 7.15.x to 8.5.5 and then do subsequent upgrades once migrations run. I was simply not able to login to authorize the migration going directly to 8.15.2 despite having set up the user and member providers correctly, installing both the pre and post migration packages, etc.

    By going to 8.5 first, no issues logging in and no issues upgrading after that.

  • Chris Clancy 56 posts 123 karma points
    16 days ago
    Chris Clancy
    0

    I had the same login issues after trying to use a new Umb 8.16 project. I started again with a 8.1, then moved up to 8.5 and ensure my UmbracoMembershipProvider and UsersMembershipProvider were set the same as the 7.15.5 site. I could log in OK after that. Had a similar timeout issue as mentioned above after a few mins so I set the timeout in the connection string to 'Connection Timeout=1000000' and it's been running for about 30 mins so far.

    I expect it to fail at some point or for something else to go wrong but this is an early days experiment to see what happens. The original DB was over 3GB with 30,000 articles, athough most will only have a small number of versions. The DB copy I am using is an Azure SQL DB and has already grown to 4.5GB during the update process and is stuck on 95-100% usage! I expect it will take a while.

    I have seen a number of different approaches to this but all I have done so far is....

    Ensure my V7 site is 7.15+ - it already was but I would recommend anyone with 7.6 or earlier go through gradual updates to get it to 7.15 and sometimes you may need to go one version at a time to avoid issues. NB> Read the Umbraco notes on each upgrade as you go along.

    Use the https://our.umbraco.com/packages/developer-tools/pre-migration-health-checks/ tool to run the imital checks on the 7.15.5 site. BTW there is no explanation how to use that I could find this so just download the zip and drop the DLL file into your bin folder, then run the app and it will b a part of Health Check.

    Create a new, empty, install of Umb 8.1 or go straight to 8.55.

    Ensure your membership config is the same as the 7.15.5 site.

    Add a DB timeout and ensure you have plenty of DB space and time to run the updates.

    I haven't used any of the ProWorks packages mentioned.

    I'll see how it goes from here.

  • Jamie Attwood 181 posts 466 karma points c-trib
    16 days ago
    Jamie Attwood
    0

    You have not even got to the fun part yet LOL! Good luck and appreciate your notes. On the good side of things upgrading the DB from 8 to 10 is a breeze - just plug in your 8 database to 10 site and you are good to go. 95% of the effort will go into changing your MVC!

    Cheers,

    Jamie

  • Chris Clancy 56 posts 123 karma points
    16 days ago
    Chris Clancy
    0

    Ha thanks! Like I say this is a test to see what happens. We will be making the site in question a v10 site in the near future so I want to see if migration is a better option than custom importing. We tried CMS import before but there were too many issues with things like macro content. Personally, I would rather create a new V10 site and hook up the v7 site content via an API.

    Oh and my DB has gone up to 7GB now! Hope I don't run out of space.

  • Jamie Attwood 181 posts 466 karma points c-trib
    16 days ago
    Jamie Attwood
    0

    Lots of logging no doubt. Not up on Azure but SSMS has that shrink tool that I used a lot before the upgrades to bring everything down to a manageable size.

    I am a big fan of CMS import for non Umbraco import stuff. But I recently did a lot with uSync (8=>10) and I can't say enough good things about that tool. Massive time saved. Not sure how it would go using 7->10 but it's worth a try. Also, if the bulk of your content is of the same type it's not too hard to build your own import scripts. As a quick hack I just create a new template and do the import logic (using content service, media service, etc.) right in the view and run it by hitting the page.

  • Chris Clancy 56 posts 123 karma points
    16 days ago
    Chris Clancy
    0

    Ah yes, Ive seen some examples of the custom import templates. Definitely a time saver and way to go. Will probably do a simple POC of that to try and pull in a couple of hundred items.

Please Sign in or register to post replies

Write your reply to:

Draft