Qlik Community

Ask a Question

QlikView Integrations

Discussion Board for collaboration on QlikView Integration.

On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error using API GetUserDocuments()

I am writing a program to read and modify document attributes which works fine but now I am getting an error with the GetUserDocuments() method.

I can replicate the error using the "QMSAPIClient" which is part of the PowerTools for QlikView 1.2.  Here is the stack trace from it:

Stack Trace

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ServiceModel.CommunicationException: An error occurred while receiving the HTTP response to http://qlikviewsvr:4799/QMS/Service. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)

   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)

   --- End of inner exception stack trace ---

   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)

   at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)

   at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)

   --- End of inner exception stack trace ---

   at System.Net.HttpWebRequest.GetResponse()

   at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)

   --- End of inner exception stack trace ---

Server stack trace:

   at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)

   at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)

   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)

   at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)

   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:

   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

   at QMSAPIClientProvider110.QMSBackendService.IQMS.GetUserDocuments(Guid qvsID)

   at QMSAPIClientProvider110.QMSBackendService.QMSClient.GetUserDocuments(Guid qvsID)

   --- End of inner exception stack trace ---

   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

   at QMSAPISupport.Interface.API.InvokeClientMethod(MethodInfo method, Object[] parameterArray, String serviceAddress)

   at QMSClient.Forms.MainForm.InvokeMethod(MethodInfo method, Object[] parameterArray)

   at QMSClient.Forms.MainForm.ExecuteThread(Object inParam)

The line "System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host" suggests that the problem is with QlikView Server but there is no error logged in Event Viewer or in any of the QlikView logs.  I have set the logging for the Management Service to "Debug logging" and for QlikView Server to "High" but no errors show in them.

I have also increased the app.config values for everything in my own program by a factor of 10 adding a 0 to the end of each size value but still got the error.  It is not a timeout error as the error occurs within a maximum of 15 seconds which is much less than any of the default timeouts.

The only this that has changed is that the number of documents has increased significantly to about 7,000.  Deleting/moving some of the documents makes the error go away.  I can see all the documents via AccessPoint without any error. 

Is there a limit to the number of documents that the API can process?

How can I get a log of the error if it is server-side?

Any help appreciated.

0 Replies