DotNet Core 2.1 - Ubuntu 16.04. Error FTS


#1

Hi All,
i have implemented a dotnet Core project in ubuntu with the nuget CouchbaseNetClient package 2.7.0.
I have a problem with the FTS Query.
More precisely:
I have
When i call:

ISearchQueryResult result =bucket.Query(sq);
(sq is a SearchQuery object) and return this error:

and after i get the hits:
IList<ISearchQueryRow> hitsOrFail = result.HitsOrFail;

return this exception:
System.ComponentModel.Win32Exception (0x80090020): GSSAPI operation failed with error - An invalid status code was supplied (Configuration file does not specify default realm). at Couchbase.Search.SearchQueryResult.get_HitsOrFail()

what i wrog?

PS

  1. i have tested in windows and i not have a problem
  2. if i call the simple method
    bucket.GetDocument<ObjectName>(id);
    I don’t have a problem

Thanks
Jempis


#2

@jempis02 -

It looks like its related to NTLM per this Core issue. The work around listed appears to be to fall back to using the Libcurl version of HttpClient like this:

AppContext.SetSwitch("System.Net.Http.UseSocketsHttpHandler", false);

Try that and let us know what the result is; we’ll open and issue and look for a more formal resolution.

-Jeff


#3

Hi @jmorris,
thanks for response.
I have add the ‘AppContext’, and i resolve the excpetion; but now i have another two error:
System.Net.Http.HttpRequestException: 503: Service Unavailable
or
System.Threading.Tasks.TaskCanceledException: A task was canceled.

Always after i call the :
IList<ISearchQueryRow> hitsOrFail = result.HitsOrFail;
(if i call ’ bucket.GetDocument<ObjectName>(id)’, i don’t have problem.

do I have to set something else? (I tried to search in the forum but I did not find anything)

thanks
jempis


#4

@jempis02 - do you have the Query service enabled? Can you ping the endpoint? Try tracing the HTTP call to the service and see if the client is generating the correct call based on your cluster topology.

-Jeff


#5

hi @jmorris ,
for all questions the response is ‘yes’.
the Service works well until the “result.HitsOrFail” method is invoked (where result is a ISearchQueryResult object)
Jempis


#6

@jempis02 -

When you call result.HitsOrFail it throws an exception that was already captured, meaning that the query failed from the get-go when it was executed. The result.Exception property will have the same exception; it is the one that was thrown.

An HTTP trace should show the POST to the server along with the URI that was used. I would start there and figure out why the server is failing the request. A 503 generally means the service cannot handle any more requests or something similar - you’ll have to debug it. A cancelled task is likely just the result of the service returning 503 and the task being cancelled in the client.

-Jeff


#7

hi @jmorris
thanks for your time, but we have decided to use the GO SDK .
With the dotnet Core we had too many problems…
Thanks
jempis


#8

@jempis02 -

Ok, thanks - I am opening up an issue none-the-less, it would be helpful if you provided the HTTP trace to help identify the issue (NCBC-1810) so that we can resolve it so that others do not get stuck with it.

-Jeff