Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Techies,
I have tried to install Qlik Sense several times but it is failing with message "Logging database setup failed". Then I installed Qlik Sense without enable centralized logging and it installed successfully.
I tried to configure centralized logging by CMD but it is giving me error "Failed to execute database setup".
Qlik Sense version: September 2018.
User has full rights of admin and same is service user.
It was working earlier, then I uninstalled and try to install this error comes.
Hi, had the same issue on my one server, only option that worked was to create a backup of the qlog db, delete it and rerun the setup command: Qlik.Logging.Service.exe setup -h localhost -p 4432 -u postgres -x ******* -r ********* -w ******** -f, also ended up manually recreating the QLog user group, reader and writer accounts.
Thanks for your response wynand.
I am doing fresh installation so where to delete create a backup of the qlog db ??
Can you please explain me below statement in details how to do it ?
manually recreating the QLog user group, reader and writer accounts
Thanks,
Rohit
OK, if its a clean install, no need to delete the qlogs db, just download and install pgadmin, connect to your localhost server, port should be 4432, user postgres and the password you made during install.
Once you in, select any db and select Tools, then Query tool.
Run this:
CREATE DATABASE "QLogs" ENCODING = 'UTF8'; --creates an empty QLogs database
Then just manually create the qlogs_users group ("can log in" - no under defenitions), qlogs_reader role and qlogs_writer role (give the two accounts login rights), (there is a script in the help files for sense) i prefer to do it manually. Then select properties for the accounts and set the passwords for each account, then select properties for the Qlogs db and make the qlogs_writer the db owner. (you would need to right click on the server and select refresh to see the new db and the users) then in cmd run: Qlik.Logging.Service.exe update -h 127.0.0.1 or localhost, then restart the the logging service
Thanks Wynand for your detail solution. I performed all the steps as you suggested. I have two concern at end:
1. Do I need to add both qlogs_reader and qlogs_writer to qlogs_users in membership
Second, How to check centralized logging is setup fine and logs from all servers are storing in centralize server ? Is there any check points or validation steps ??
Regards,
Rohit
Yes, both users should be in the group, to check connection, select the qlogs db and under dashboard you should see qlogs_writer using Qlik.Logging.Service to connect. Expand the qlogs db - Schemas - Tables, then right click on leg_entries and View/edit data, select first 100 rows, you should see entries if all is ok, Check the following in the logging config file: C:\ProgramData\Qlik\Sense\Log\QlikCentralizedLogging.config
<add key="CentralizedLoggingEnabled" value="True" />
<add key="LoggingToFileEnabled" value="True" />
you can also enable the log file for the logging service:
<add key="CentralizedLoggingLogEnabled" value="True" />
(just restart the logging service if you make any changes to the config
Thanks for your response Wynand
1. This is false in logging config file:
<add key="CentralizedLoggingEnabled" value="False" />
<add key="LoggingToFileEnabled" value="True" />
Do I need to change False to True to make it effective in above statement under config file?
2. I am manually editing it to True:
<add key="CentralizedLoggingLogEnabled" value="True" /
3. I have checked the Dashboard Database Sessions are idle. Please check the snapshot.
Note: I am working on stand alone server. No rim node is attached yet.
Yes, change to True to enable central logging, save the config, then restart your logging service
Mine also shows as Idle under state, if you still not getting connections, try running the update command and then restarting the service, just replace the stars * with your password for the accounts:
Qlik.Logging.Service.exe update -h 127.0.0.1 -p 4432 -u postgres -x ******* -r ******** -w ********
I made it True but when I am starting the logging service it is saying:
2018-10-23 12:12:23,052 ICONDEL84-PC [Qlik.Logging.Service.exe] root [ERROR] - DevartLogDatabase::Connect failed!
Exception:
password authentication failed for user "qlogs_writer"
I have used same password which I used in super user password on the time of installation. My service user who is running the logging service has different password than super user password.
I have used super user password in definition part of qlogs_writer, qlogs_reader and qlogs_users .
Can you please help me to know where I am wrong ?