Home Forum Blog Market Events Resources
Showing results for 
Search instead for 
Do you mean 
Highlighted
New Contributor
Posts: 2
Registered: ‎03-10-2014

K2 Database Master Key Issue But Database not Moved/Restored

Hi Everyone,

 

I've got this kind of error after a server failover in my production system environment, the thing is all of my workflow are working normal, but this error seems to refer to my disaster recovery server but it appears on the production system, is there a way to check the K2 configuration to fix this issue, previously I've changed all entry refering to the DR server in the production server to clean all the configurations, now all the production server configuration are pointing to the right server but this error still occurs, by the way, I didn't backup/restore or move the database if you guys wondering.

 

Thank You

 

"328609221","20*personal details removed*:23:47","Error","System","2025","InternalMarshalError","SourceCode.Hosting.Server.Services.TCPClientSocket.InternalMarshal","2025 Error Marshalling SourceCode.SmartObjects.Runtime.SmartObjectClientServer.GetSmartObject, Please create a master key in the database or open the master key in the session before performing this operation.
The key 'SCSSOKey' is not open. Please open the key before using it.","system","fe80::5909:b4cf:a6a2:73ad%18","PMO-PRODAPP:C:\Program Files (x86)\K2 blackpearl\Host Server\Bin","328609221","ecc45ccd181942b1a29dd4dba3f4d481",""
"328609222","20*personal details removed*:23:47","Error","Unknown","8060","ProcessPacketError","SourceCode.Hosting.Server.Services.TCPClientSocket.ProcessMessage","8060 ProcessPacket Error, Please create a master key in the database or open the master key in the session before performing this operation.
The key 'SCSSOKey' is not open. Please open the key before using it.","system","fe80::5909:b4cf:a6a2:73ad%18","PMO-PRODAPP:C:\Program Files (x86)\K2 blackpearl\Host Server\Bin","328609222","91b49f020b714c8ab456a1ae231e60a4",""

Community Manager
Posts: 113
Registered: ‎04-20-2009

Re: K2 Database Master Key Issue But Database not Moved/Restored

Hi,

I think the underlying issue here is the link between the K2 Database Master key and the link between the SQL Service Master key has been broken, and this normally happens when moving the K2 databases, or databases in general, from one SQL instance to another.

 

That being said, you will NEED to run the script below to re-link the service master key with the master key.

PS - If you're running on the legacy multiple K2 databases, you will have to run the script against the following databases: K2Hostserver, K2SmartBroker, K2Smartbox, K2SQLUM

 

NOTE: Please make sure to take a backup of the respective K2 databases, stop the K2 Server service, run the script, and then restart the K2 Server:

 

GO

DROP SYMMETRIC KEY SCSSOKey

DROP CERTIFICATE SCHostServerCert

DROP MASTER KEY

CREATE MASTER KEY ENCRYPTION BY PASSWORD = '5CE05F96-98A1-475C-9E8C-5053F057D312'

CREATE CERTIFICATE SCHostServerCert

WITH SUBJECT = 'Host Server Certificate', START_DATE = '01/01/2007', EXPIRY_DATE = '01/01/2017'

CREATE SYMMETRIC KEY SCSSOKey WITH ALGORITHM = TRIPLE_DES

ENCRYPTION BY CERTIFICATE SCHostServerCert

GO

K2 will not accept any liability for any issues arising from actions taken in respect of the information provided by any forum member