logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
jdepoy24549696  
#1 Posted : Wednesday, July 29, 2020 8:26:16 AM(UTC)
jdepoy24549696

Rank: Advanced Member

Groups: Authorized User, Developers, Registered
Joined: 4/17/2019(UTC)
Posts: 80

After the GoldR12 site was upgraded to AC9.0.2 and moved to a new server I can't restore the Encryption Key.

It is stuck at
Your key is being updated...
Remaining Workload: 15 records

I tried Restart and Cancel but neither will respond. It's been stuck for 2 days.

Please advise.

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

Naveed Ashraf  
#2 Posted : Wednesday, July 29, 2020 9:23:19 AM(UTC)
Naveed Ashraf

Rank: Advanced Member

Groups: Admin, Administrators, Developers, Registered, HelpDesk, Authorized User
Joined: 7/31/2019(UTC)
Posts: 77

Was thanked: 8 time(s) in 8 post(s)
Please check the error log from admin.

Also check the error log in log file (App_Data/Logs/app.log)for any clue.

If nothing works, try restart the IIS and retry the encryption key restore.

Check this link for details about backing up and restoring encryption key:
http://help.ablecommerce...urity/Encryption_Key.htm


Thanks.
Thanks for your support!
Naveed Ashraf
Ablecommerce.com
Developer Assistance Available
Joe Payne2  
#3 Posted : Wednesday, July 29, 2020 9:33:00 AM(UTC)
Joe Payne2

Rank: Advanced Member

Groups: HelpDesk, Developers
Joined: 11/9/2018(UTC)
Posts: 564

Thanks: 122 times
Was thanked: 26 time(s) in 25 post(s)
That page needs updated

Quote:
Whenever you change your key, download the key backup files and store them in a physically secure location. You need both backup files to restore the key.


Only Able 7.x used multiple backup keys. Gold and v9 utilize a single key file.
jdepoy24549696  
#4 Posted : Wednesday, July 29, 2020 1:46:47 PM(UTC)
jdepoy24549696

Rank: Advanced Member

Groups: Authorized User, Developers, Registered
Joined: 4/17/2019(UTC)
Posts: 80

It is still stuck and showing the same screen.
Restarting IIS did not work and I see nothing in the app.log.
Admin log has " Error recrypting data, could not find valid keys; Recryption cancelled."

What else can I try?

Edited by user Wednesday, July 29, 2020 1:49:21 PM(UTC)  | Reason: Not specified

jdepoy24549696  
#5 Posted : Friday, July 31, 2020 7:57:01 AM(UTC)
jdepoy24549696

Rank: Advanced Member

Groups: Authorized User, Developers, Registered
Joined: 4/17/2019(UTC)
Posts: 80

I'm still needing help with this.

After restarting IIS the page is still stuck and the restart and cancel buttons can't be clicked.

I see in the SecurityController:
Quote:

encryptionModel.ChangePanel = "none";
encryptionModel.ChangeProgressPanel = "block";
encryptionModel.trRestartCancel = ((encryptionModel.RemainingWorkLoad == remaining.ToString())) ? "block" : "none";


So I took the "block" styles off of the ChangeProgressPanel and the trRestartCancel,

Then I added "block" to changePanel.

This allowed me to click "Cancel" but it still seems stuck.

Please advise.

Stuck screen
mazhar  
#6 Posted : Monday, August 3, 2020 8:58:03 AM(UTC)
mazhar

Rank: Administration

Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered
Joined: 10/5/2018(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 17 time(s) in 15 post(s)
When you are trying to restore the encryption key, does /app_data/encryption.config have any key for example I wonder if its copied from previous install? Make sure that it should be default file the one available in AC9. The restore should create the key entry in after success.
jdepoy24549696  
#7 Posted : Tuesday, August 4, 2020 9:31:24 AM(UTC)
jdepoy24549696

Rank: Advanced Member

Groups: Authorized User, Developers, Registered
Joined: 4/17/2019(UTC)
Posts: 80

No, there's not any encryption key in the encryption.config.
jdepoy24549696  
#8 Posted : Tuesday, August 4, 2020 12:03:49 PM(UTC)
jdepoy24549696

Rank: Advanced Member

Groups: Authorized User, Developers, Registered
Joined: 4/17/2019(UTC)
Posts: 80

I can't enter anything in the textbox to try to Change the Key.
jdepoy24549696  
#9 Posted : Thursday, August 6, 2020 9:03:50 AM(UTC)
jdepoy24549696

Rank: Advanced Member

Groups: Authorized User, Developers, Registered
Joined: 4/17/2019(UTC)
Posts: 80

I manipulated the Encryption.cshtml file so that I could attempt to create a new key. Doesn't Work. When creating a new key it acts like it's processing and gets stuck at 15 records to go.



judy at Web2Market  
#10 Posted : Thursday, August 6, 2020 12:01:56 PM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 303

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
I've been testing on my local site. I tried creating and encryption key and it said 7 records to go. It's an hour later and it's still not done.
jdepoy24549696  
#11 Posted : Thursday, August 6, 2020 12:41:29 PM(UTC)
jdepoy24549696

Rank: Advanced Member

Groups: Authorized User, Developers, Registered
Joined: 4/17/2019(UTC)
Posts: 80

We found the problem by running some queries:
select * from ac_payments where ReCrypt = 1 and EncryptedAccountData is NULL

This returned 15 records, the same number that the progress was stuck on. Can't encrypt null, right?


This was the fix:
update ac_payments set ReCrypt = 0 where ReCrypt = 1


Other tables to check:
ac_PaymentGateways
ac_ShipGateways
ac_TaxGateways

example query:
select * from ac_paymentgateways where recrypt = 1 and configdata is null


Naveed Ashraf  
#12 Posted : Monday, September 14, 2020 8:00:52 AM(UTC)
Naveed Ashraf

Rank: Advanced Member

Groups: Admin, Administrators, Developers, Registered, HelpDesk, Authorized User
Joined: 7/31/2019(UTC)
Posts: 77

Was thanked: 8 time(s) in 8 post(s)
Thanks for reporting the issue.


I investigated the related implementation, we actually only set the ReCrypt flag if the EncryptedAccountData is NOT NULL. The update is performed while setting up encryption key, but it seems that the EncryptedAccountData is cleared and updated to NULL by some maintenance routines, and resulted in this issue.

So, as discussed above, that running the following query before restoring or updating/changing the encryption key will save you from the trouble.

Quote:
update ac_payments set ReCrypt = 0 where EncryptedAccountData is NULL AND ReCrypt = 1

Edited by user Monday, September 14, 2020 8:01:30 AM(UTC)  | Reason: Not specified

Thanks for your support!
Naveed Ashraf
Ablecommerce.com
Developer Assistance Available
thanks 1 user thanked Naveed Ashraf for this useful post.
Joe Payne2 on 11/11/2020(UTC)
Users browsing this topic
Guest (12)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.