{"id":1108,"date":"2023-03-02T03:25:36","date_gmt":"2023-03-02T03:25:36","guid":{"rendered":"https:\/\/craftcookcode.com\/?p=1108"},"modified":"2024-07-10T02:33:25","modified_gmt":"2024-07-10T02:33:25","slug":"qlik-enterprise-manager-upgrading-from-2021-05-to-2022-11","status":"publish","type":"post","link":"https:\/\/craftcookcode.com\/?p=1108","title":{"rendered":"Qlik Enterprise Manager &#8211; Upgrading from 2021.05 to 2022.11"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">As a business requirement of developers wanting to take advantage of new features in Qlik Enterprise Manager (QEM); we had to upgrade our system from 2021.05 to 2022.11.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This was not a smooth process and encountered several issues on the way.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">First Attempt &#8211; Straight Upgrade<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Simple to upgrade?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Just download the latest installer from Qlik&#8217;s website and kick it off?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unfortunately when I gave developers keys to our dev QEM box to do the upgrade before Christmas as I was busy with other tasks.&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">They gave it a go without a backout plan.&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Couple of days later I tried logging into the QEM console and couldn&#8217;t get on.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The AttunityEnterpriseManager service kept restarting every minute and the following errors were in the\u00a0\u00a0C:\\Program Files\\Attunity\\Enterprise Manager\\data\\logs\\EnterpriseManager.log<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;START: 2023-03-01 09:40:18 Attunity EnterpriseManager Version: 2022.11.0.335]\n1 2023-01-02 09:40:18 &#x5B;Command ] &#x5B;INFO ] Executing ServiceRunCommand command.\n6 2023-01-02 09:40:19 &#x5B;Host ] &#x5B;INFO ] Setting up web host\n6 2023-01-02 09:40:20 &#x5B;Host ] &#x5B;INFO ] The server will listen on the following location: http:\/\/xxxxxxx.xxx.xxx\/attunityenterprisemanager\n6 2023-01-02 09:40:20 &#x5B;Host ] &#x5B;INFO ] The server will listen on the following location: https:\/\/xxxxxx.xxx.xxx\/attunityenterprisemanager\n6 2023-01-02 09:40:20 &#x5B;Host ] &#x5B;ERROR] Object reference not set to an instance of an object.\n6 2023-01-02 09:40:20 &#x5B;Host ] &#x5B;INFO ] Stopping service on error...\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">I tried the usual desperation tricks of restarting the service and then restarting the box.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the end I had to uninstall QEM and reinstall 2021.05 as there was no backout plan.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The developers were then subsequently banned from doing anymore work on the QEM upgrade<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Second attempt &#8211; Two jump upgrade<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Next attempt was upgrading to 2022.05 and then jumping to 2022.11.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This time I took a backup of C:Program FilesAttunityEnterprise Managerdata so I could easily backout the change if I had problems.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The upgrade from 2021.05 to 2022.05 went smoothly; but when jumping from 2022.05 to 2022.11 the same error occurred.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I then raised a case with Qlik and also posted on their forum asking if anyone else had <a href=\"https:\/\/community.qlik.com\/t5\/Qlik-Enterprise-Manager\/Upgraded-Enterprise-Manager-failing-to-start\/td-p\/2034250\">come across this problem<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Final Success<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">With help from Qlik support we developed a upgrade work around.&nbsp; Qlik said that there is a patch in the works as other users have had the same problem.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you follow along &#8211; note that this method might differ for your system.&nbsp; In the three upgrades I have done internally; they all differed slightly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure you TEST and HAVE A BACKOUT PLAN<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Upgrade Perquisites<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This upgrade was done on a Windows 2019 server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You will need:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Admin rights to QEM&#8217;s server<\/li>\n\n\n\n<li>Licenses for QEM and Analytics<\/li>\n\n\n\n<li>Username\/Password that AEM connects to the analytics database<\/li>\n\n\n\n<li>Privilege user account for to the analytics database<\/li>\n\n\n\n<li>Password for the user that you use to connect QR nodes to QEM<\/li>\n\n\n\n<li>A SQLite database client<\/li>\n\n\n\n<li>Handy to have &#8211; an editor that can validate json format<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Method<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log on to QEM console<\/li>\n\n\n\n<li>For each server under the server tab &#8211; Right click and go to &#8220;Stop Monitoring&#8221;<\/li>\n\n\n\n<li>Remote desktop to the QEM server<\/li>\n\n\n\n<li>Stop the <em>AttunityEnterpriseManager<\/em> service<\/li>\n\n\n\n<li>Back up C:\\Program Files\\Attunity\\Enterprise Manager\\data<\/li>\n\n\n\n<li>Run the upgrade to QEM 2022.05<\/li>\n\n\n\n<li>Once the upgrade is done; log onto QEM and ensure that version 2022.05 is working correctly<\/li>\n\n\n\n<li>Back up C:Program FilesAttunityEnterprise Managerdata again<\/li>\n\n\n\n<li>Stop the <em>AttunityEnterpriseManager<\/em> service again<\/li>\n\n\n\n<li>Run following command from the command line:<br><pre>cd \"C:\\Program Files\\Attunity\\Enterprise Manager\\bin\"<br>aemctl repository export -f C:\\temp\\qem_repo_202205.json -w<\/pre><br><\/li>\n\n\n\n<li>Script out the postgres database with the following commands:<br><pre>cd C:\\Program Files\\PostgreSQL10\\bin<br>pg_dump -U <em>&lt;username><\/em> -s -C -c <em>&lt;analyticdbname><\/em> > C:\\temp\\analyticdbname.sql<\/pre><br><\/li>\n\n\n\n<li>Edit C:\\temp\\cdcanalyticsp.sql.\u00a0 Find and replace &#8220;<em>&lt;analyticdbname><\/em>&#8221; with &#8220;cdcanalytics_2022_11_p&#8221;.\u00a0 Save the file<\/li>\n\n\n\n<li>Run the following command to create a new temporary database on the postgres server:<br><pre>psql -d postgres -U <em>&lt;username><\/em> -f C:\\temp\\cdcanalyticsp.sql<\/pre><br><\/li>\n\n\n\n<li>This is where the problem lies in our instance.\u00a0 Open up C:tempqem_repo_202205.json<br>Find any code blocks with &#8220;type&#8221;: &#8220;AttunityLicense&#8221; in it and remove the whole code block.\n<ol class=\"wp-block-list\">\n<li>On our dev system it was the section with &#8220;name&#8221;: &#8220;Replication Analytics&#8221;, but in prod it was section with &#8220;name&#8221;: &#8220;Replication Management&#8221;.\u00a0\u00a0<\/li>\n\n\n\n<li>You may need to experiment to find the correct section<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Go to Add\/Remove and uninstall Enterprise manager<\/li>\n\n\n\n<li>Once remove &#8211; delete the the folder C:\\Program Files\\Attunity\\Enterprise Manager\\data<\/li>\n\n\n\n<li>Install QEM 2022.11.\u00a0 When prompted do not install Postgres<\/li>\n\n\n\n<li>Log into QEM and check that it is up and running correctly.<\/li>\n\n\n\n<li>Stop the <em>AttunityEnterpriseManager<\/em> service again<\/li>\n\n\n\n<li>Run the following command:<br><pre>aemctl repository import -f C:\\temp\\qem_repo_202205_Fix.json -w<\/pre><br><\/li>\n\n\n\n<li>Start the AEM service and check that it is running correctly<\/li>\n\n\n\n<li>Re-add the QEM and Analytics license\u00a0<\/li>\n\n\n\n<li>Go to Settings -> Repository connections.<br>Enter in username password set the database as cdcanalytics_2022_11_p<\/li>\n\n\n\n<li>Intialize the repository and start the connector<\/li>\n\n\n\n<li>Stop the <em>AttunityEnterpriseManager<\/em> service again<\/li>\n\n\n\n<li>Open up C:\\Program Files\\Attunity\\Enterprise Manager\\data\\Java\\GlobalRepository.sqlite in an SQLite editor<\/li>\n\n\n\n<li>Browse the table objects<br>Look for name = &#8220;AnalyticsConfiguration&#8221; and modify the json value &#8220;cdcanalytics_2022_11_p&#8221; to the original analytics database name<\/li>\n\n\n\n<li>Save SQLite database<\/li>\n\n\n\n<li>Start the AEM service and check that it is running correctly<\/li>\n\n\n\n<li>Go to the server tab.\u00a0 Edit each server and re-add the password.\u00a0 Click on the button &#8220;Monitor this server&#8217;s tasks and messages&#8221;.\u00a0 Test the connection and click OK<\/li>\n\n\n\n<li>PVT QEM<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">If things go wrong<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Backout process<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Uninstall QEM<\/li>\n\n\n\n<li>Delete the folder C:\\Program Files\\Attunity\\Enterprise Manager\\data<\/li>\n\n\n\n<li>Reinstall either QEM 2021.05 or QEM 2022.05<\/li>\n\n\n\n<li>Stop the\u00a0<em>AttunityEnterpriseManager<\/em>\u00a0service<\/li>\n\n\n\n<li>Restore the appropriate backed up data folder to C:\\Program Files\\Attunity\\Enterprise Manager\\data<\/li>\n\n\n\n<li>Restart the AEM service<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>As a business requirement of developers wanting to take advantage of new features in Qlik Enterprise Manager (QEM); we had to upgrade our system from 2021.05&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":1076,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[16],"tags":[36],"class_list":["post-1108","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-qlik-replicate","tag-qlikreplicate"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/posts\/1108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1108"}],"version-history":[{"count":13,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/posts\/1108\/revisions"}],"predecessor-version":[{"id":1455,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/posts\/1108\/revisions\/1455"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/media\/1076"}],"wp:attachment":[{"href":"https:\/\/craftcookcode.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}