Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW

Postgres database moved to new host but some Qlik Sense is still accessing the old database

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Sebastian_Linser

Postgres database moved to new host but some Qlik Sense is still accessing the old database

Last Update:

May 10, 2023 10:34:15 AM

Updated By:

Benoit_C

Created date:

Aug 17, 2018 6:01:55 AM

After following the Qlik article Configure Qlik Sense to use a dedicated PostgreSQL server and update the connection string to point to the new host, Qlik Sense appears to work fine at first. However, access by the Qlik Sense Service account to the old host is registered or errors are found in the logs similar to what is found in the example below:

In the AppDistributionService trace logs:

307308 20210104T170444.859+01:00 INFO QLIKSERVER 70 DOMAIN\serviceaccountname Retry attempt: 10/10. Previous result: "No such host is known". 304796
307309 20210104T170451.812+01:00 ERROR QLIKSERVER 70 DOMAIN\serviceaccountname Error processing message queue notifications. System.Net.Sockets.SocketException (11001): No such host is known
at System.Net.Dns.HostResolutionEndHelper(IAsyncResult asyncResult)

 

Resolution

There are a few new services starting on the September 2019 release of Qlik Sense which did not exist in June 2018. Some of them were also removed/replaced on the new release.


Option 1 (recommended): Updating the files using PowerShell:

  1. Stop all the Qlik Sense services
  2. Open a PowerShell command prompt in administrator mode and then, either run the following:

    # Set the Installation Directory for Qlik Sense
    $installDir = 'C:\Program Files\Qlik\Sense\'
    #change that to the new database server
    $newdatabasehostname='new database server'
    # Specify the new password for the qliksenserepository account
    $password = 'MyNewPassword'
    # Find all Configure-Service.ps1 scripts in the installation directory and execute them
    $files = Get-ChildItem -Path $installDir -Include Configure-Service.ps1 -Recurse
    foreach ($file in $files) {
        $ScriptToRun=$($file.FullName)
        &$ScriptToRun $newdatabasehostname 4432 qliksenserepository $password -postgresHome 'D:\Qlik\Sense\Repository\PostgreSQL\12.5'
    }​


    In case of having a custom path Qlik Sense installation, change the last line to:

 

&$ScriptToRun $newdatabasehostname 4432 qliksenserepository $password -postgresHome 'D:\Qlik\Sense\Repository\PostgreSQL\12.5'
}

 


Where "D:\Qlik\Sense" is Qlik Sense installed folder and where "12.5" is the Postgres version installed.

Option 2: Manually update each file

Change to the following directories with the commands below before running the Configure-Service.ps1 command listed further below.

Repeat the step for every subfolder mentioned below.

Note: If you previously upgraded you may find folders in your system which are not listed here. Ignore them. No steps need to be taken.

Qlik Sense February 2021 and later.

Locate Configure-Service.ps1 in C:\program files\Qlik\Sense\.

It lists all services that need to be changed.


Qlik Sense June 2018:

cd 'C:\Program Files\Qlik\Sense\AppDistributionService'
cd 'C:\Program Files\Qlik\Sense\EntitlementProvisioningService'
cd 'C:\Program Files\Qlik\Sense\HybridDeploymentService'
cd 'C:\Program Files\Qlik\Sense\QseEventProcessor'


Qlik Sense September 2019:

cd 'C:\Program Files\Qlik\Sense\Licenses'
cd 'C:\Program Files\Qlik\Sense\NotifierService\install'
cd 'C:\Program Files\Qlik\Sense\AppDistributionService'
cd 'C:\Program Files\Qlik\Sense\HybridDeploymentService'
cd 'C:\Program Files\Qlik\Sense\MobilityRegistrarService\install'
cd 'C:\Program Files\Qlik\Sense\PrecedentsService\install'
 
Qlik Sense November 2020:
 
cd 'C:\Program Files\Qlik\Sense\Licenses'
cd 'C:\Program Files\Qlik\Sense\NotifierService\install'
cd 'C:\Program Files\Qlik\Sense\AppDistributionService'
cd 'C:\Program Files\Qlik\Sense\HybridDeploymentService'
cd 'C:\Program Files\Qlik\Sense\MobilityRegistrarService\install'
cd 'C:\Program Files\Qlik\Sense\PrecedentsService\install'
cd 'C:\Program Files\Qlik\Sense\NLAppSearch\install'

 

Example:

For AppDistributionService...

PS C:\> cd 'C:\Program Files\Qlik\Sense\AppDistributionService'
PS C:\Program Files\Qlik\Sense\AppDistributionService> .\Configure-Service.ps1 DatabaseHost Databaseport DatabaseUser DatabasePassword

e.g. .\Configure-Service.ps1 newdatabasehostname 4432 qliksenserepository Password123!

The answer will look similar to this:

AppDistributionService configuration started.
WARNING: Skiping the database initialization. No superuser or password specified.
Reading the settings file.
Saving the modified settings.
Exporting the copy of the invocation parameters.
AppDistributionService configuration successful.

 


Related Content:

Labels (1)
Comments
aashok
Contributor III
Contributor III

Hi ,

My folder is missing with 

cd 'C:\Program Files\Qlik\Sense\QseEventProcessor'.

what could be the reason.

I am upgrading from Nov 2020 to May 2022.

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @aashok 

May 2022 does not have this folder any more, so it missing is expected.

All the best,
Sonja 

aashok
Contributor III
Contributor III

@Sonja_Bauernfeind  Thank you. I managed to resolve the issue.

Lokeshb31
Contributor III
Contributor III

One question - why are we mentioning localhost if DB is installed on other host? -

.\Configure-Service.ps1 localhost 4432 qliksenserepository Password123!

It should be .\Configure-Service.ps1 <newDBhost> <newDBport> qliksenserepository <newpassword>

Right? I am getting confused here, please help.

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @Lokeshb31 

Please log a support ticket for this query. The work required to troubleshoot this with you is beyond what we can provide in an article.

All the best,
Sonja 

Sebastian_Linser

@Lokeshb31 changed, i also added it in the script above as variable so it can be set up front.

Version history
Last update:
‎2023-05-10 10:34 AM
Updated by: