error in smartobject method exacution


Badge +1

I'm getting the following error when I try to exacute a smart object method from the smartobject tester

 

---------------------------
Error
---------------------------
Failed to initialize the Context:
Url: http://mot-kmobarek:8081/sites/K2Home/
Username:

Error Details: The remote server returned an error: (401) Unauthorized.

Service: k2_Home_mot-kmobarek_Content
Service Guid: 45c95cd1-0ea5-4876-a7c2-66cd6bd14c81
Severity: Error

---------------------------
OK
---------------------------

 

the smartobject is created from a sharepoint list using "Sharepoint Content ServiceObject" with Authentecation mode: Impersonate.

and the user I'm using has the administrator Role on the sharepoint site.

 

How can I trace the error. Is thare any logs for the K2 that I can use to invistgate the problem?

does any one now why this error may happen?

 

thanks in advance

 


5 replies

Badge +6

Hi Khalid,


 


K2 logs can be found in C:Program Files (x86)K2 blackpearlHost Server


Once you have found the error in the log, could you tell what it states so I can investigate further?


 


Regards,


 


Yannick

Badge +1

thanks Yannick for your help,

I looked at the log files put it I couldn't understand it , here's what I found on it:

--------------------------------------------------------------------------------

"614892","2014-05-12 11:06:23","Error","SmartObjects","10702","Error","SourceCode.SmartObjects.ServiceBroker [ExecuteSmartObject]","10702 An error occurred in the k2_Home_mot-kmobarek_Content service instance. Failed to initialize the Context:
Url: http://mot-kmobarek:8081/sites/K2Home/
Username:

Error Details: The remote server returned an error: (401) Unauthorized.","anonymous","0.0.0.0","dc_server:C:Program Files (x86)K2 blackpearlHost ServerBin","614892","7c485314971244d297741cb5cbb6b53e",""

 

"614894","2014-05-12 11:06:23","Error","SmartObjects","10702","Error","SourceCode.SmartObjects.ServiceBroker [ExecuteSmartObject]","10702 Retrying the k2_Home_mot-kmobarek_Content service instance as the K2 service account did not resolve the issue. Error occurred trying to Execute (SmoSPListItem) - Microsoft.SharePoint.Client.ServerException: Exception from HRESULT: 0x80131904
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()
at SourceCode.SharePoint.Client.ListItemBaseFunctions.getListItems(RuntimeField[] fields, String folder, Boolean includeFile, UInt32 rowLimit, FileSystemObjectType fsoType, Boolean recursiveAll)
at SourceCode.SmartObjects.Services.SharePoint.Content.SmoSPListItem.callListMethod(Property[] inputs, Method method, Property[] returns)
at SourceCode.SmartObjects.Services.SharePoint.Content.SmoSPListItem.Execute(Property[] inputs, RequiredProperties required, Property[] returns, Method method)","anonymous","0.0.0.0","dc_server:C:Program Files (x86)K2 blackpearlHost ServerBin","614894","cddcdeceecdc4a549737ccba348b885f",""

 

"614895","2014-05-12 11:06:23","Error","SmartObjects","10702","Error","SourceCode.SmartObjects.ServiceBroker [ExecuteSmartObject]","10702 Retrying the k2_Home_mot-kmobarek_Content service instance as the K2 service account did not resolve the issue. Error occurred trying to Execute (SmoSPListItem) - Microsoft.SharePoint.Client.ServerException: Exception from HRESULT: 0x80131904
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()
at SourceCode.SharePoint.Client.ListItemBaseFunctions.getListItems(RuntimeField[] fields, String folder, Boolean includeFile, UInt32 rowLimit, FileSystemObjectType fsoType, Boolean recursiveAll)
at SourceCode.SmartObjects.Services.SharePoint.Content.SmoSPListItem.callListMethod(Property[] inputs, Method method, Property[] returns)
at SourceCode.SmartObjects.Services.SharePoint.Content.SmoSPListItem.Execute(Property[] inputs, RequiredProperties required, Property[] returns, Method method)","anonymous","0.0.0.0","dc_server:C:Program Files (x86)K2 blackpearlHost ServerBin","614895","c30bd40611e24d04b6dc169a6e276ccf",""

--------------------------------------------------------------------------------

 

I can see that the service is trying to access the sharepoint list but it gets an Unauthorized error then it tries the k2 service account which generates an exception on excuting "SmoSPListItem"!!! 

by the way, I found that I get this error when excuting a smartobject method "get list Items" with some input properties however excuting it without the properties returns the list items.

 

 

note:

my Environment servers:

server1: k2 on windows server 2012

server2: sharepoint 2013 with k2 for sharpoint

server3: sql server 2012

 

 

 

thanks agian for your time

 

Badge +1

I attached a screenshot form the k2 server debuger I think it's related to the issue.

the error attached happens when accessing "k2 site setting" from my sharepoint portal and tring to create a new smartobject


11915i6184472DEAC78ED3.png
Badge +6

Hi Khalidspace,


 


I have done some research and found a possible fix.Can you please confirm for me that the table in SQL which is linked to the Smartobject created has a Primary Key?


 


Regards,


 


Yannick

Badge +6

Hi Khalidspace,


 


I have not heard back from you in awhile regarding the issue. After some further investigation into the matter the issue could be related to  loopback. Disabling Loopback can potential resolve the issue. Please see the steps below and try them it out to see if this resolves the issue.


 


 To set the DisableLoopbackCheck registry key, follow these steps:



  1. Set the
    DisableStrictNameChecking

    registry entry to 1. For more information about how to do this, click the following article number to view the article in the Microsoft Knowledge Base:
    281308 Connecting to SMB share on a Windows 2000-based computer or a Windows Server 2003-based computer may not work with an alias name


  2. Click Start, click Run, type regedit, and then click OK.
  3. In Registry Editor, locate and then click the following registry key:

    HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlLsa



  4. Right-click Lsa, point to New, and then click DWORD Value.
  5. Type DisableLoopbackCheck, and then press ENTER.
  6. Right-click DisableLoopbackCheck, and then click Modify.
  7. In the Value data box, type 1, and then click OK.
  8. Quit Registry Editor, and then restart your computer.

Kind regards,


 


Yannick


 


 


 

Reply