Friday, September 20, 2013

Confluence SharePoint Connector Error

Hello!

While wrestling with Confluence and SharePoint i got following error in my ULS logs. I Google it and found that the machine key is not same across all of my servers in the farm. I move ahead and checked it manually and found the machine key is identical across all the servers.

After contacting Atlassian support i found that i need to remove some configuration from my database.

They provided a workaround and it worked like a magic for me.


Error:
Unable to decrypt persisted value (SPCONTEXT: Current User: XXXXXXXX\XXXXXXXX, Current Web Application: SharePoint - XXXXXXXX.XXXXXXXX.com80, Current URL: http://XXXXXXXX.XXXXXXXX.com/_layouts/Atlassian/ConfluenceSettings.aspx, User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; InfoPath.3; .NET4.0E; MS-RTC EA 2)): System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Web.HttpException: Unable to validate data.     at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, IVType ivType, Boolean useValidationSymAlgo, Boolean signData)     at System.Web.... 1d1794ff-3a39-4aac-8221-1a2cb8ef2975
Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length)     --- End of inner exception stack trace ---     at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)     at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)     at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)     at Atlassian.Confluence.SharePoint.MachineKeyWrapper.EncryptOrDecryptData(Boolean encrypting, Byte[] data, Byte[] mod, Int32 index,... 1d1794ff-3a39-4aac-8221-1a2cb8ef2975
at Atlassian.Confluence.EncryptionHelper.Decrypt(String encryptedValue)     at Atlassian.Confluence.SharePoint.Version2010.Services.SitePropertyPersister.Decrypt(String encryptedValue) 1d1794ff-3a39-4aac-8221-1a2cb8ef2975

Resolution
We have created a command-line utility that you may use on your SharePoint server to remove the Confluence configuration stored against a specific site. To remove the configuration from the site, follow these steps.
1.      Log on to your SharePoint server with a user account that has Site Collection administration privileges for the site you wish to clear.
3.      Open the zip file and extract the enclosed DeleteConfluenceConfiguration.exe file to a folder on your local disk.
4.      Open a command prompt window and then change directory to the folder containing the executable.
5.      Run the DeleteConfluenceConfiguration.exe utility, specifying the URL of the site that you wish to remove the Confluence configuration from. For example, if the site is 'http://sharepoint-server/sites/mysitecollection/subsite', then the command would look like this:
?
C:\Users\Administrator\Desktop> DeleteConfluenceConfiguration http://sharepoint-server/sites/mysitecollection/subsite
6.      After running the utlity, you should see a success message. If you notice any messages containing an '[ERROR]' line, then it is likely that the settings were not deleted properly. In this case, you should contact Atlassian support directly for assistance.

Hope it will help others.

Best Regards :)

No comments:

Post a Comment