Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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)
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.
# 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.
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:
Qlik Sense September 2019:
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.
Dear Sonja,
I don't need support case. You can cancel it.
Hello Support,
If PostgreSQL is hosted externally (not embedded within the Qlik Sense environment), the
-postgresHome 'D:\Qlik\Sense\Repository\PostgreSQL\12.5'
parameter can be omitted when running the Configure-Service.ps1 script?
Thanks
Federico