Skip to main content


 

Symptoms

 


In K2 environment which was up and running you suddenly getting the following error while accessing K2 Workspace: "An error has occurred. Please contact your administrator. Error: Initialization failed before PreInit: Unable to establish a secure connection with the Active Directory server. Possible causes - the ADConnectionString in the K2 Workspace web.config may have an incorrect LDAP path. - the physical connection to the Active Directory Server might be down. - please review log files for more information." Error is system wide, i.e. all users are affected. You confirmed that there was infrastructure issue with AD DS, which was resolved but K2 Workspace keep throwing this error.
 

 

Diagnoses

 


When Workspace is loaded it attempts to establish the connection with AD as the application pool account. If there is an issue with accessing AD under this account it leads to this error. Normally it is necessary to do the following checks while dealing with this error. Make sure that:

 

1. K2 Workspace site is running in IIS Admin (not Stopped)

 

2. Application Pool designated to run the site and applications therein is running as well. If they are not running, the service account running the K2 Workspace application pool may be locked in Active Directory. 3. Check and make sure that Workspace Application Pool account has at least read access in AD for the newly added domain (if you added any). When Workspace is loaded it attempts to establish the connection with AD as the application pool account.

 

4. Try including the domain controller name and LDAP port number in the LDAP connection string as follows:

 

 

 

<add name="ADConnectionString2" connectionString="LDAP://nDomainControllerName]:oport]/MyDomain.com" />
OR
<add name="ADConnectionString2" connectionString="LDAP://nDomainControllerName]/MyDomain.com"

 

/>

 

 

 

If you continue to get the same error try using the Distinguished name format for the domain instead, for example:

 

 

 

<add name="ADConnectionString2" connectionString="LDAP://iDomainControllerName]/DC=MyDomain,DC=com" />

 

 

 

Failing that you should enable TracingPath in the Workspace web.config, to get a more detailed debug output from the PreInit error, which may indicate to root cause of the issue, which for example may be an incorrectly defined LDAP path entry in the web.config.
 

 

Resolution

If in your case no changes were made into K2 environment configuration and AD DS infrastructure is operating normally without any issue you should try to recycle K2 blackpearl application pool in IIS (one which hosts K2 Workspace). In certain scenarios temporary AD DS failure may cause your K2 Wokrspace enter into error state described above which persists even after IIS reset/entire K2 site restart and K2 service restart, and only application pool restart resolves this. In case when there were some changes or solution above does not work please refer to Diagnosis section above and additionally to the following K2 community KB: "Error when accessing K2 Workspace: Initialization failed before PreInit ..."

 

 



 
Be the first to reply!

Reply