LEGACY CONTENT
This article refers to legacy products, components or features. Therefore, the content in this article is offered "as is" and will no longer be updated. 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.

Introduction

For a K2 server farm, all nodes should have K2 installed to the same location (e.g. C:\Program Files\K2 blackpearl). If any node in the K2 server farm is installed to a different location from the rest of the K2 server farm nodes, the Service Broker will behave erratically.

Symptoms

Symptoms may vary depending on the functionality being used. Conditions leading to the errors may include one or more of the following:
  • You have installed multiple nodes in a K2 server farm
  • At least one node was installed to a non-default location
When installing K2 blackpearl in a K2 server farm, it is possible to use different installation directories on each farm node. However, Service Broker expects the ServiceBroker directory in the same location on all farm nodes. If the ServiceBroker directory is not located in the same path on all K2 farm nodes, you may see issues including the following.
  1. Attempting to access an “out-of-the-box” report in workspace, you may see:

    An error has occurred during report processing.
    Query execution failed for data set 'Process_Statistics'.
    Server Exception: Could not load file or assembly 'file:///C:\Program Files (x86)\K2 blackpearl\ServiceBroker\SourceCode.SmartObjects.Services.WorkflowReporting.dll' or one of its dependencies. The system cannot find the file specified.

  2. From within Management Console, under the K2 server, expand SmartObjects | Services, then attempt to edit a registered service instance (such as the AD Service)
    1. When this request is served by the K2 server with the non-standard installation directory, you will not see any information populated in the Service Instance, and will see Console errors:

      Error 2025 Error Marshalling SourceCode.SmartObjects.Runtime.SmartObjectManagementServer. LoadServiceInstanceConfig, Could not load file or assembly 'file:///C:\Program Files (x86)\k2 blackpearl\ servicebroker\SourceCode.SmartObjects.Services.ActiveDirectory.dll' or one of its dependencies. The system cannot find the file specified.
      Error 2025 Error Marshalling SourceCode.SmartObjects.Runtime.SmartObjectManagementServer. LoadServiceInstanceConfig, Could not load file or assembly 'file:///C:\Program Files (x86)\k2 blackpearl\ servicebroker\SourceCode.SmartObjects.Services.ActiveDirectory.dll' or one of its dependencies. The system cannot find the file specified.
      Error 8060 ProcessPacket Error, Could not load file or assembly 'file:///C:\Program Files (x86)\k2 blackpearl\ servicebroker\SourceCode.SmartObjects.Services.ActiveDirectory.dll' or one of its dependencies. The system cannot find the file specified.
    2. When this request is served by a K2 server node with the standard installation directory, you will see information populated in the Service Instance, and will get no errors in the K2 console:

Cause of the Error

The behavior is due to the fact that the Service Broker expects the ServiceBroker directory in the same location on all farm nodes.

Error Resolution

To resolve the issue, copy the ServiceBroker directory on the “odd” node to the same path as on all other nodes. Then, run brokermanagement.exe and point the ServiceBroker at this new location for all the relevant DLLs.

  1. Create a directory on the “odd” K2 node to match the installation directory that is the standard in your K2 server farm.
  2. Copy all contents of the %programs%\K2 blackpearl\ServiceBroker directory to this newly created “matching” directory.
  3. From the newly created copy of the ServiceBroker directory, launch BrokerManagement.exe.
  4. Select Configure Services.
  5. Right-click each service, and select Update Service Type.
  6. Verify that the Assembly Path points to the new ServiceBroker location.
    a. If not, click on the Ellipsis (“…”) button next to the Assembly Path, and browse to the correct location, and select the appropriate DLL.
    b. Click OK to apply the change. Then you can Close the Service Type window.
  7. Repeat steps 5 and 6 for each registered Service.
  8. Close the Manage Services utility.
  9. Close BrokerManagement.exe.
  10. Restart your K2 servers (the K2 service).

Further Information

  • Browse to k2underground.com for a technical article and source code on creating a custom service object to retrieve and update data from a SQL database.