Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
dselgo_eidex
Partner - Creator III
Partner - Creator III

"Ticket retrieval failed" when trying to access Qlik Sense through .NET SDK

Hello, I am trying to connect my web API to our Qlik Sense server using the .NET SDK. I am connecting with AsNtlmUserViaProxy() and passing in the username and password for the service account that installed Qlik Sense on the machine. I am using the code below to connect to Qlik Sense: 

 

ILocation location = Location.FromUri("https://myqliksensesite.com");

await location.AsNtlmUserViaProxyAsync(proxyUsesSsl: true, loginCredentials: new NetworkCredential(
    "username",
    "password",
    "domain"
));

using(var hub = await location.HubAsync())
{
    var engineVersion = await hub.EngineVersionAsync();
    Console.WriteLine($"Engine Version: {engineVersion.ComponentVersion}");
};

 

This works when I try running my web API on my laptop through Visual Studio. It connects to my Qlik Sense server, gets the engine version, and prints it out. However, whenever I try running it on our QA server, it fails with the following error:

 

   AggregateException
   One or more errors occurred. (Ticket retrieval failed.) (Ticket retrieval failed.) (Ticket retrieval failed.) (Ticket retrieval failed.)
   at Qlik.Sense.JsonRpc.RpcConnection.RepeatAttempt(Int32 maxAttempts, Func`2 f, CancellationToken token)
   at Qlik.Sense.JsonRpc.RpcConnection.OpenAsync(CancellationToken token)
   at Qlik.Sense.JsonRpc.RpcConnection.EnsureConnectionIsOpen()
   at Qlik.Sense.JsonRpc.RpcConnection.SendAsync(Request request, TaskCompletionSource`1 tcs)
   at Qlik.Engine.Communication.QlikConnection.PingAsync()
   at Qlik.Engine.LocationExtensions.DisposeOnErrorAsync(IDisposable o, Func`1 f)
   at Qlik.Engine.LocationExtensions.HubAsync(ILocation location, ISession session)

 

Just a little extra information: our QA server is currently running in a Docker container on a Linux server that is running on the same network as our Qlik Sense server. I have whitelisted the IP address of the Linux server in the QMC.

What I'm trying to figure out is what this "Ticket retrieval failed" error means. Does it mean that I am not establishing any connection at all with Qlik Sense, or does it mean that Qlik Sense is rejecting my credentials. If the latter is the case, then why is it working when I run it from my laptop and not on our QA deployment?

10 Replies
Øystein_Kolsrud
Employee
Employee

Hurray! Glad it worked out! It would be nice if the SDK could propagate such error messages out though.