Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
kwdaniels
Partner - Creator
Partner - Creator

"Engine is not alive" error connecting to .NET SDK Sense Engine API with prefix on virtual proxy

We were able to access the Qlik Sense Engine API successfully until we reconfigured our authentication to use both Azure AD and Windows authentication. (This post is spawned from a related post at https://community.qlik.com/t5/New-to-Qlik-Sense/How-to-retain-user-security-rules-when-transitioning...)

Now we receive the following message when attempting to connect using Windows authentication:

Engine at https://qlik.contoso.com/windows/ is not alive

Details:

Formerly we had just one virtual proxy called "Central Proxy (Default)", with no prefix. The primary url was https://qlik.contoso.com/. We had no problems connecting to the Qlik Sense Engine API.

We recently changed the prefix on the Central Proxy to be "windows" (https://qlik.contoso.com/windows), and we added a second virtual proxy called "Azure" with no prefix (https://qlik.contoso.com/), associating it with the original Central Proxy. We did this in order to enable Azure AD authentication without requiring a change in url for our users.

The transition has been smooth except for this issue with the Engine API. We would be grateful to anyone who can help us resolve this.

We have a C# app based on the App Traverser that's a part of the .NET SDK for Qlik Sense Engine API examples at https://github.com/AptkQlik/PublicExamples . Here's the snippet showing how we're authenticating:

 

        private static ILocation GetQlikDesktopLocation()
        {

            //Uri prior to changing prefix of central proxy to "windows"
            //ILocation location = Qlik.Engine.Location.FromUri(new Uri("<a href="https://qlik.contoso.com:443" target="_blank">https://qlik.contoso.com:443</a>"));
            //Uri after changing prefix of central proxy to "windows"
            ILocation location = Qlik.Engine.Location.FromUri(new Uri("<a href="https://qlik.contoso.com:443/windows/" target="_blank">https://qlik.contoso.com:443/windows/</a>"));

            // Defines the location as NTLM via proxy. The default value for proxyUsesSsl is true. Must be set to false if the connection uses http.
            location.AsNtlmUserViaProxy(proxyUsesSsl: true);
            return location;
        }

 

 

After the above code is run, the following snippet is executed to check for a live connection, and it fails:

 

        private static void ExitIfServerUnavailable(ILocation location)
        {
            if (location.IsAlive()) return;

            TextHelper.WriteLine("Engine at " + location.ServerUri + " is not alive");
            WaitAndExit();
        }

 

 

Note that we're able to access the Engine API successfully using the Engine API Explorer. For example, here are the details for the "Connect to engine" request:

URL: wss://qlik.contoso.com/windows/app/%3Ftransient%3D?reloadUri=https://qlik.contoso.com/windows/dev-hub/engine-api-explorer
Request:

 

{
	"handle": -1,
	"method": "GetDocList",
	"params": [],
	"outKey": -1,
	"id": 1
}

 

Labels (8)
1 Solution

Accepted Solutions
Øystein_Kolsrud
Employee
Employee

You'll need to set the VitualProxyPath property in your location.

https://help.qlik.com/en-US/sense-developer/April2019/APIs/net+sdk/html/P_Qlik_Sense_JsonRpc_ILocati...

Try this:

ILocation location = Qlik.Engine.Location.FromUri("https://qlik.contoso.com");
location.VirtualProxyPath = "windows";
location.AsNtlmUserViaProxy();

View solution in original post

2 Replies
Øystein_Kolsrud
Employee
Employee

You'll need to set the VitualProxyPath property in your location.

https://help.qlik.com/en-US/sense-developer/April2019/APIs/net+sdk/html/P_Qlik_Sense_JsonRpc_ILocati...

Try this:

ILocation location = Qlik.Engine.Location.FromUri("https://qlik.contoso.com");
location.VirtualProxyPath = "windows";
location.AsNtlmUserViaProxy();
kwdaniels
Partner - Creator
Partner - Creator
Author

Bingo--that did the trick. Thanks so much!