Received 401 When Trying to Deploy


Badge +2

Hi All,


K2 newbie here.  We recently install K2 Blackpearl 4.5 in our environment to work with MOOS 2007.  Went thru the fun of setting up Kerberos. 


I wrote a small process to test against a Sharepoint List but got the following when trying to deploy:


=====


1 Error(s)
(ServerBuildReq) Task Error: System.Exception: Error occurred adding the feature to the farm. ---> System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> The request failed with HTTP status 401: Unauthorized.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at SourceCode.SharePoint.WebServices.K2SPFeatures.AddWorkflowFeature(String featureTitle, String description, Boolean isDefaultForms, K2SPStartForms startForms, K2SPTaskForm[] taskForms, K2SPModificationForm[] modForms, String SmartObjectServerConnectionString)
   at SourceCode.Workflow.SharePoint.Common.Features.AddWorkflowFeature(String featureTitle, Boolean isDefaultForms, String FeatureDescription, K2SPStartForms startForms, List`1 taskForms, List`1 modForms, CredentialCache CredCache)
   at SourceCode.DeploymentTasks.SharePoint.WorkflowIntegration.ConfigureEvent.AddFeature(IntegrationObject integration)
   at SourceCode.DeploymentTasks.SharePoint.WorkflowIntegration.WorkflowIntegrationService.Execute(IntegrationObject integration, Boolean testMode, Boolean createDependancies)
   --- End of inner exception stack trace ---
   at SourceCode.DeploymentTasks.SharePoint.WorkflowIntegration.WorkflowIntegrationService.Execute(IntegrationObject integration, Boolean testMode, Boolean createDependancies)
   at SourceCode.DeploymentTasks.SharePoint.WorkflowIntegration.WorkflowIntegrationTask.Execute()


======================


I have the necessary permission on the K2 Hoster server etc.  Just can't figure this out.  Any suggestion is greatly appreciated.


Thanks


 


17 replies

Badge +8

Please check whether the k2 For Sharepoint Wsp is activated on the site collection you are trying to connect to.

Badge +2

The WSP is activated on the Site Collection.

Badge +8

This can be a tricky one, but start by checking your SharePoint server(s) for errors. Make sure you check the Event Viewer and SharePoint log files.


If you suspect it might be a delegation issue, also enable Kerberos delegation on the relevant servers for detailed messages.

Badge +2

 checked.  No error.  Double checked the SPNs and delegation... all looks fine.  This is happening on both my PROD and QA box.  I have opened supports with K2 but no progress.

Badge +3

Try to check if the logged in user is a site collection administrator.


If not, try to assign the user as a site collection administrator of the site and publish the workflow again.


 

Badge +2

Yes.  I am farm and Site Collection Admin.  I also added the K2 service account as well.  I even tried deploying from the K2 server itself

Badge +3

When deploying using the K2 Service account, can it deploy?

Badge +3

Try to check the following:


1. Does the logged in user have all the rights in the server? Check this at the Server Administration at the Central Administration--> K2 for SharePoint tab.


2. Try create a new form or document library and deploy the workflow there. If this works, the former library where you deploy the workflow might be corrupted.


3. Try to create a new site, activate K2 features in that site, as well as the K2 WebParts... Then create a new form/document library in that new site and deploy the workflow in that new library.


Advise me of any updates.

Badge +2

Hi Paolo,


Thanks for the advise.  To answer your questions:



  1. Using the K2 service account have the same issue.
  2. I can go to K2 for sahrepoint table and see all.
  3. Have tried multiple document libraries from different sites and even farms
  4. No problem activating features for K2.

I deployed from client and from K2 server.  Same issue.

Badge +3

By this, it may be a MOSS error rather than a K2 error. What are the event logs of your server? Does these errors reflect with K2 or with MOSS?

Badge +3

In the server rights, does the user have Admin, Impersonate and Export rights?

Badge +10

To help diagnose try deploying the workflow using MSBUILD.  I find it is more descriptive on the actual steps K2 is trying to do when deploying.  It may give you a clue to exactly where its failing.  To get the switches look in the K2 help documentation.


K2 Designers > K2 for Visual Studio > K2 Designer for Visual Studio > Deployment Package > MSBuild > Examples MSBuild Usage


Testing the Environment


 


To test the environment; the package will not deploy when this option is used:


Command Syntax: Msbuild [FileName] /p: TestOnly=True /p:Environment =production


If no errors are reported by this command your environment is most likely suitable to deploy the package. You may now proceed to Deploy the package.


 


Deploy Package


 


To deploy the package in the environment:


Command Syntax: Msbuild [FileName] /p:Environment=production


Msbuild "C:VisioExpenseobjDebugDeploymentExpense Claims Process.msbuild” /p:Environment=production


 


Regards,


Tim

Badge +2

All, Thanks for the advise. I really appreciated it all.  I have check the sever rights... admin, export, and inpersonate permissions have already been checked.


As with the MSBUILD option, I did not try maily becuase I am not a devloper and not familiar with VS.


Thanks

Userlevel 4
Badge +14

Where are you deploying form? K2 Studio or K2 sharepoint designer? Can you do a little test; try to deploy a process with only a mail event sending a mail form K2 Studio. Does this deploy successfully?


If so I guess that there is something wrong with the Kerberos configuration for Moss. This can be verified by the delegconfig tool found here: http://www.iis.net/community/default.aspx?tabid=34&g=6&i=1887


Extract it, create a new virtual dir in the same site used for the list that points to the Kerberos dir of the extracted app then make sure the new virtual dir uses the same app pool as the site then access the site http://[server]/kerberos/default.aspx


assuming you called the virtual dir "kerberos"


HTH


Vernon

Badge +5

Did you set up Kerberos for Central Administration as well?


I've seen a couple of times that configuring Kerberos for Central Administration resolves this issue.


Please look into the IIS logs of CA/MOSS/K2 RuntimeServices site for co-realting 401 errors.


I know you check all MOSS rights, but did you check them for the deploying user, and did you verify that the user has Modify rights on the 12Hive/Layouts folder?


You can verify if the feature files are being dropped by looking into the Layouts folder.


Let me know.


Frikkie

Badge +2

Hi Frikkie,


Thanks for the suggestions.  I will take a look. A few points about your comments:



  • Giving user modify right to 12 hive - My understand is that the latest K2 Blackpearl does not requireth modify permission on the 12 hive.  From Sharepoint's security perspective, giving user modify permission to this is a dangerous move. 
  • I don't have Kerberos setup/enable for CA in my Sharepoint Farm.  I don't remember seeing this as a requirement from K2. 
  • The K2 analyze came  back all green on all servers.

I have submitted a ticket with K2 Support.  So far, they have been pretty slow in responding... whenever they feel like it.


 

Badge +5

Hi,


The rights are not required on the 12HIve ietself but on the Features folder in the 12Hive, the exact path is: 'C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATEFEATURES'. It has always been a requirement, see 'http://help.k2.com/en/k2blackpointhelp.aspx: Getting Started > K2 blackpoint Installation Guide > Before you begin > Set up Permissions > Permissions Necessary for the SharePoint Server'.  Also look in the Features folder if the feature files have been dropped, there will be a folder with the name of the project and the process.


Setting up Kerberos for the CA is not documented, but I've seen it resolve some similar issues in the not so distance past.  Please investigate the IIS logs as mentioned to determine where the 401 occurs. 


Having all green on analysis is good, but does not necessarily mean the environment is set up correctly w.r.t. Kerberos.  Every environment is different in some way most of the time and this makes troubleshooting difficult sometimes.


Let me know what the ticket number is, maybe I can see what has been done or not done.


 


Regards,


Frikkie


 

Reply