K2 Service Broker on Heterogeneous Install Paths
KB000269
PRODUCTTech Article - Developing a Custom Service
Source Code for Tech Article - Developing a Custom Service
TAGS
Introduction
Symptoms
- You have installed multiple nodes in a K2 server farm
- At least one node was installed to a non-default location
- 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 blackpearlServiceBrokerSourceCode.SmartObjects.Services.WorkflowReporting.dll' or one of its dependencies. The system cannot find the file specified. - From within Management Console, under the K2 server, expand SmartObjects | Services, then attempt to edit a registered service instance (such as the AD Service)
- 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 servicebrokerSourceCode.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 servicebrokerSourceCode.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 servicebrokerSourceCode.SmartObjects.Services.ActiveDirectory.dll' or one of its dependencies. The system cannot find the file specified. - 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:
- 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:
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.
- Create a directory on the “odd” K2 node to match the installation directory that is the standard in your K2 server farm.
- Copy all contents of the %programs%K2 blackpearlServiceBroker directory to this newly created “matching” directory.
- From the newly created copy of the ServiceBroker directory, launch BrokerManagement.exe.
- Select Configure Services.
- Right-click each service, and select Update Service Type.
- 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. - Repeat steps 5 and 6 for each registered Service.
- Close the Manage Services utility.
- Close BrokerManagement.exe.
- 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.