Error: The LeanFT runtime engine could not be launched.

  • KM02540649R
  • 01-Sep-2016
  • 12-May-2017

This document is under revision.


This document describes the cause and solution for an error/warning message that may appear during Visual Studio or Eclipse startup.


The entire visible error/warning message states the following:
The LeanFT runtime engine could not be launched.
To troubleshoot this issue, see Troubleshooting section in the LeanFT Help Center.

See screenshots from both, Visual Studio and Eclipse IDEs:



This error may happen while trying to open Visual Studio or Eclipse IDEs.
There are two possible causes identified:

  1. When checking the LeanFT Client logs (HP.LeanFTClient VS or HP.LeanFTClient Eclipse), we find the following message:
    2016-08-31 14:25:21,445 HP.LFT.PackageManagers.License.LicenseService [   1] ERROR Connect: Failed to connect to LeanFT runtime engine on ws://localhost:5095/.
    HP.LFT.Communication.SocketClient.CommunicationException: Connect: Failed to connect to LeanFT runtime engine on ws://localhost:5095/.
       at HP.LFT.Communication.SocketClient.SocketConnection.Connect(Uri uri)
       at HP.LFT.Communication.SocketClient.ConnectionFactory.Connect(String address, ConnectionConfiguration config)
       at HP.LFT.SDK.Core.Communication.CommunicationClient.Init(ISdkConfiguration config)
       at HP.LFT.SDK.SDK.DefaultRunSeession.Init(SdkConfiguration sdkConfig)
       at HP.LFT.SDK.SDK.Init(SdkConfiguration sdkConfig)
       at HP.LFT.SdkUtilities.SdkInitializer.Init(Uri serverAddress)
       at HP.LFT.SdkUtilities.SdkInitializer.Init(Uri serverAddress, Boolean& hasValidLicense)
       at HP.LFT.PackageManagers.License.LicenseService.HasValidLicense(Uri serverAddress)
    By default, LeanFT Runtime Engine uses port 5095 as communications port. If this port is being used by another application, the mentioned error/warning message will show up.
  2. A second possible cause would be that the "Prevent access to registry editing tools" security policy is enabled for the user that is trying to launch LeanFT Runtime engine. Such policy doesn't allow the use of system registry editing tools like regedit.exe or reg.exe. There are two ways to confirm whether this is the cause:
    1. Check whether the mentioned policy is enabled: Go to Start>Run, type gpedit.msc and press Enter key. Then navigate to User Configuration>Administrative Templates>System and check whether "Prevent access to registry editing tools" policy is enabled or not.
    2. Another option would be to run a .bat file that will try to query the registry like LeanFT does and check whether it is able to retrieve the data from registry. See sample .bat file script:
      @echo OFF
      FOR /F "usebackq tokens=3*" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercury Interactive\LeanFT\CurrentVersion" /v LOCAL_MLROOT`) DO
          set appdir=%%A %%B
      ECHO %appdir%
      If it shows the following error message: "Registry editing has been disabled by your administrator", then LeanFT is having the same issue and hence the problem.
      image text


If this problem's cause is related to the default communication port, then in order to fix it, it is required to instruct LeanFT Runtime Engine to use a different available port.
To do so, refer to the document below:
Document ID KM02540006 - How to change LeanFT Runtime Engine default communications port?

In the other hand, if the problem is related to the registry access, you have two options:

  1. Disable "Prevent access to registry editing tools" policy.
  2. Move to LeanFT/UFT 14.00 where this issue has been resolved after several improvements done to LeanFT plugins.