Error (401) Unauthorized when integrating SharePoint with two K2 Servers

  • 24 February 2022
  • 0 replies
  • 440 views

Userlevel 5
Badge +20
 

Error (401) Unauthorized when integrating SharePoint with two K2 Servers

KBS100049

PRODUCT
K2 blackpearl
BASED ON
K2 blackpearl (all)
This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Issue

This article describes integrating one Sharepoint web-application with two K2 Servers. I am doing it according to the following article:
http://help.k2.com/kb001753

The following steps were completed:

1. Deploy the app, specifying K2 Server1 - everything is ok.
2. Run the registration wizard, specifying K2 Server1 - everything is ok.
3. Run the registration wizard, specifying K2 Server2 - and the following error appears on the final step: "Thread 1: The remote server returned an error: (401) Unauthorized."
4. After deploying the app again, specifying K2 Server2 - everything is ok.
5. After running the registration wizard, specifying K2 Server2 - this time everything appears ok.
6. After navigating to Manage App Activations page as per the article - http://help.k2.com/kb001753, the following error appears: "Thread 1: The remote server returned an error: (401) Unauthorized"

 

After checking the event viewer, the error is now logged against K2 Server1.

Symptoms

Firstly, check if the registration wizard passed on both servers with no issues. It passed for the dev server URL but failed for the test server URL.

 

The certificates on these servers do not match and as a result only one server is able to communicate with the SharePoint server, this is based on the Kb article: http://help.k2.com/KB001632.

Troubleshooting Steps

The following steps were taken to resolve this issue:

 

- Ensure that the certificates between the 2 servers match as per http://help.k2.com/KB001632. We copied certificate from K2 TEST to K2 DEV.
- Restart K2 Hostserver Service on K2 DEV.
- Run AppDeployment.exe on the SP Environment and specify K2 DEV server for the Server URL.
- Run the Registration wizard from the SharePoint App Catalog, and specify the K2 TEST - this completed successfully.
- Re-run the Registration wizard and specify K2 DEV – make sure it completes successfully.
- Open App Activations and verify that you can select both servers in order to activate the app for each site collection. 

Previously at this stage the error appeared and it was resolved as follows:
> Remove the certificates on the server where you can not activate the site collection - i.e. K2 TEST server. This was done by following a Outh Repair steps outlined in the Outh Repair.docx.
> Run a repair on the K2 TEST server. In this scenario the server was pointing to the incorrect database server, this was corrected.
> Run a reconfigure on the K2 DEV server - this is done to ensure that this server points to the correct database server.
> Run AppDeployment.exe on SP Environment and specify the K2 TEST server for the Server URL.
> Run the Registration wizard from the SharePoint App Catalog, first specify the K2 TEST.
> Then re-run the Registration wizard and specify K2 DEV.
> Activate and Deploy the app on TEST SP site collection and DEV SP Site collection for each environment.


0 replies

Be the first to reply!

Reply