Problem with Toec Client export
Hi, my issue is most probably a result of database move. I had the server configured and working on a test workstation and once I decided to move it to a proper server, in order to save the configuration, and after having the server installed there and configured, I have moved the database from the old machine (backup/restore). Everything seems to be working and the Provision/VerifyDb Toec-API Test responds with 60. However when I export a Toec Client, I get a very small .msi file (2KB) and it can't install (err 'this installation package could not be opened...').
I have went through the config steps again (https://docs.theopenem.com/latest/#/installation/server-installation?id=configure-theopenem) and now on the 'Set Provision Key And Imaging Token', after I generate the key and token and click 'Update', I get 'Could Not Update Settings' message. The other difference with my working test machine that I have noticed, is that on the 'Toec' screen, 'Client MSI Arguments', SERVER_KEY= is empty, while on the test machine it has a value.
Application log says:
2023-03-23 18:10:48,796  ERROR Toems_Service.EncryptionServices Could Not Decrypt Password. Ensure Your Encryption Key is Correct.
2023-03-23 18:10:48,827  ERROR Toems_Service.ServiceMsiUpdater Could Not Create Msi.
2023-03-23 18:10:48,842  ERROR Toems_Service.ServiceMsiUpdater Function failed during execution.
Is there a way to make it work or should I drop the database and go for full reinstall?
when you moved the database, did you update the dbencryption key on the new server to match the old one in web.config?
No I wasn't aware I had to. Thank you.
I will have it updated and I will repeat the entire process. Is there anything else I should be paying attention to? Previously I have noticed the old machine IP carried over in the com server and cluster, so I have deleted those and re-created them. Anything else you can think of?
Thanks for your help. This step-by-step process has done the database move successfully for me (moving to different machine/IP with same OS, same installation path, same DB provider):
ON THE SOURCE MACHINE:
- Stop IIS
- Dump theopenem database.
- Save the Toems-API\Web.config DbEncryptionKey
- Copy the database dump to the destination machine
- Restart IIS or leave down if not going to use anymore
ON THE DESTINATION MACHINE:
- Install and configure Theopenem server to make sure its working
- Open the source machine database dump in text editor and replace the source machine IP address with the destination machine IP. Save.
- Stop IIS
- Restore theopenem database dump.
- Replace the DbEncryptionKey in Toems-API\Web.config and Toec-API\Web.config with the one from the source machine (step 3)
- Restart IIS
- Update Toec-API\Web.config ComServerUniqueId with the one from Admin\Client Com Servers
- Delete the old Toems CA and Toems Intermediate certificates if existing
- Export and Install Certificates from the current database.
On the previously connected computers, deinstalling the old server' exported Toec client and reinstalling the one from the new server caused successful inventory refresh on next checkin.