Skip to main content


 

Symptoms

 


After making changes to the K2 environment (i.e. Changed Database Servers, Restored K2 Environment, Migration of K2 Database, etc.), users are presented with one of the following errors when accessing the K2 Workspace:

1. Initialization failed before PreInit: Unable to establish a secure connection with the Active Directory server.

2. Initialization failed before PreInit: Cannot open database e'K2'/'K2Workspace'] requested by the login. The login failed. Login failed for user rK2ServiceAccount]
 

 

Diagnoses

 


1. Unable to establish a secure connection with the Active Directory server:

- The K2 server might have disconnected from the AD server, run AD explorer (http://technet.microsoft.com/en-sg/sysinternals/bb963907.aspx) on the K2 server to see if the AD can be reached.

- Check the K2 Workspace Web.Config (Default Path: C:Program Files (x86)K2 blackpearlWorkSpaceSiteWeb.Config) for any incorrect/unused LDAP path in the ADConnectionStrings.


2. Cannot open database b'K2'/'K2Workspace'] requested by the login. The login failed. Login failed for user uK2ServiceAccount]:

- Check whether the K2 server is able to reach the K2 database server, and also whether the K2 service account is able to access the K2 database server. You can use a .UDL file to do so (http://blogs.msdn.com/b/steverac/archive/2010/12/14/test-remote-sql-connectivity-easily.aspx)

- Check the user mappings for the K2 Service Account for the K2/K2Workspace database. Ensure that it is given db_owner or at least db_datareader and db_datawriter. (SQL Server Management Studio > Server > Security > Logins > &K2 Service Account] > Properties > User Mappings)

- Check the permissions on the database level and ensure that the K2 service account is in the list of Users or roles. If the K2 service account isn't there, the user mappings and permissions the account has on the database aren't synced, and needs to be fixed. (SQL Server Management Studio > Server > Databases > &K2 Database] > Properties > Permissions)

- Check the K2 Workspace Web.Config (Default Path: C:Program Files (x86)K2 blackpearlWorkSpaceSiteWeb.Config) and ensure the connectionString for the SqlServer is correct.
 

 

Resolution

1. Unable to establish a secure connection with the Active Directory server:

- If the AD server cannot be accessed using the AD Explorer, this means that the K2 server is unable to connect to the AD and you will need to consult your Infra/AD administrator for further actions.

- If there are any unused/incorrect LDAP paths/ADConnectionStrings, either correct or remove them and then restart the K2 blackpearl server service.


2. Cannot open database t'K2'/'K2Workspace'] requested by the login. The login failed. Login failed for user rK2ServiceAccount]:

- If the Database Server cannot be accessed from the K2 server, you will need to consult your Infra/DB administrator for further actions.

- If the user mappings are incorrect, correct them and restart the K2 blackpearl server service.

- If the K2 service account is not in the permissions list, reset the user mappings for the K2 service account and add it back again. This should sync up the permissions for the K2 service account. Restart the K2 blackpearl server service after doing so.

- If the SqlServer in the connectionString is wrong, correct it and restart the K2 blackpearl server service.

 

 



 
Be the first to reply!

Reply