K2 logging into database (ArchiveExtension) does not work

  • 5 April 2016
  • 0 replies
  • 10 views

Badge +11


 

Symptoms


Assume you enabled logging into database by means of editing relevant entry in "HostServerLogging.config" configuration file (). You changed Active="False" to "True" and restarted K2 service but it seems that nothing is being logged into the respective table (HostServer.LogArchive).
 

Diagnoses


ArchiveExtension is base component of K2 logging with straight forward configuration process. You just have to set Active oprion to True in respective configuration file and restart K2 service.
Once these configuration changes are made you can access HostServer.LogArchive table to see new events being recorded here.
At this point you have two possibilities:
A) You don't see recent events, but there is some entries there.
B) Table is completely empty.

In case of (A) just keep in mind that newer events are being appended at the end of the table in chronological order, and volume of logging is quite high. Consequently by doing conventional SELECT TOP 1000 ROWS operation you won't be able to see latest events. Either do a full select or apply filter or sorting by date to confirm that new events are being logged into DB.
In case of (B) you have to make sure that you did not make any mistakes when editing configuration file and that K2 service has been restarted indeed. Apart from that the only other thing you can check this is to verify correctness of LogDB connection string. For example you can decipher K2HostServer.exe.config and verify the values you have configured for "LogServerDB" connection string.
Alternatively you can redirect ArchiveExtension to use separate configuration file and create a file with plain text connection string for LogServerDB. Configuration file should be located in "HostserverBin" directory and have content similar to this:





providerName="K2BLACKPEARL" />



In case you opt out to decipher K2HostServer.exe.config file connection string the procedure is the following:
1. Backup the "K2HostServer.exe.config" file
2. Create a directory on the C: drive such that "C:K2Config"
3. Copy a copy of the "K2HostServer.exe.config" to "C:K2Config"
4. Rename it to "web.config"
5. Run CMD Prompt in Administrator Mode:
6. Run 'cd C:WindowsMicrosoft.NETFramework64v4.0.30319' to change directory to this framework version
7. Run 'aspnet_regiis.exe -pdf "connectionStrings" "C:K2Config"'
8. This command will decrypt the encrypted 'connnectionStrings' section

 

Resolution

See Diagnosis section.




 

0 replies

Be the first to reply!

Reply