Problem with Toec Client export


  • 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:

    1. Stop IIS
    2. Dump theopenem database.
    3. Save the Toems-API\Web.config DbEncryptionKey
    4. Copy the database dump to the destination machine
    5. Restart IIS or leave down if not going to use anymore

    ON THE DESTINATION MACHINE:

    1. Install and configure Theopenem server to make sure its working
    2. Open the source machine database dump in text editor and replace the source machine IP address with the destination machine IP. Save.
    3. Stop IIS
    4. Restore theopenem database dump.
    5. Replace the DbEncryptionKey in Toems-API\Web.config and Toec-API\Web.config with the one from the source machine (step 3)
    6. Restart IIS
    7. Update Toec-API\Web.config ComServerUniqueId with the one from Admin\Client Com Servers
    8. Delete the old Toems CA and Toems Intermediate certificates if existing
    9. 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.


  • @chavi and @theopenem_admin Hi
    I would like to try this procedure to change to a newer server.
    But without having to reinstall the client on the workstations.
    Many of my workstations are outside the network.
    Maybe an idea
    Thanks


  • @cycy Well, technically it should work, but to be fair I haven't tested it. As part of this procedure, the certificates are re-generated from the old installation, I assume you are going to keep the same server IP address (unlike what I do in step 2) and unless there's something else bound within the Toec client from the old machine other than that, the clients should be able to connect as the IP address is the same. If the IP address is different, there's no way for the old client installations to connect. @theopenem_admin may have more to say here.


  • You must not regenerate certificates or nothing will be able to checkin. They will automatically work with the old ones since they are embedded in the database, just need to reinstall the CA and INT on the server. Correct that you can't change IP. Ideally you should be using a FQDN so you don't need to worry about IPs changing.


  • @theopenem_admin Thank you for your reply.
    I have followed the steps but in ClientApi.log I have the following error:
    2024-07-01 15:49:21,490 [9] ERROR Toems_Service.Entity.ServiceCertificate Could Not Validate Certificate: CN=24cd4c16-8bab-4e21-9ff7-dda7531a4df7, O=Casa Corp
    2024-07-01 15:49:21,490 [9] ERROR Toems_Service.Entity.ServiceCertificate Could not find the required object.


  • Did install the certs on the new server?


  • @theopenem_admin Yes, I have exported the certificates from my old server.
    And I installed them on the new server which has the same name and ip address.


  • I would just export them from the web interface like a typical install.


  • This is what I'm doing at step 9.


  • @chavi and @theopenem_admin Hi,
    If I export from the Web UI of the new server.
    It generates a bad certificate.
    So I imported the certificates from the old server.
    Certificate.txt


  • Difficult to say, guessing database didn't export or import correctly or dbencryption key is wrong.


  • @theopenem_admin
    I recovered the dbencryption key from the old server.
    And for the database dump I used the following parameters:
    --events --routines --triggers
    And I also retrieved the ComServerUniqueId of the old server.


  • @chavi and @theopenem_admin I forgot to specify when importing on the new server, I got the error set --binary-mode to 1 and to solve the problem I saved the sql file in utf8.
    Maybe that's the problem - any ideas?


  • In my case, I haven't used any extra mysql dump or restore parameters, simply the shortest possible commands:

    mysqldump -u root -p theopenem > theopenem_dump.sql
    mysql -u root -p theopenem < theopenem_dump.sql
    

    The dump created this way is UTF8 by default. And it worked without issues.


  • @chavi Thank you Chavi for your reply.
    I successfully installed my config on my new server.
    The problem was the mysql export.