Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
Lightbarrier #1
Member since Jul 2014 · 52 posts
Group memberships: Members
Show profile · Link to this post
Subject: Unable to read data from the transport connection: The connection was closed.
Hey Alex,

For some reason my client is receiving the error given below within the OnError event after receiving all roster events and sending its presence to the chat server. Following the error it seems that MatriX closes the chat connection.

Error:
Exception.Message: BoshException
Exception.GetBaseException.Message: Unable to read data from the transport connection: The connection was closed.

The strange part is that this error is only occurring on some machines, meaning that a user who was experiencing this problem on one machine can connect using their credentials on another machine and have no problem. Also, I can easily duplicate this bug on the machines that have been experiencing it. I want to say that this is an issue with the user's environment, but I don't understand why it's only happening on some user's machines and why it’s occurring after the user receives their roster.

Any ideas what's going on?

Details:
MatriX Version: 1.6.03
.NET: 4.0
Trace log in the attachment

Thanks for the help!
The author has attached one file to this post:
ChatTrace_04-05-2016.txt 97.9 kBytes
You have no permission to open this file.
Avatar
Alex #2
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
the connection (HttpWebrequest) gets closed. Either by the server or on the workstation.
MatriX is not closing the connection, its only reacting on a hard shutdown and forwards the error to you and closes the stream.

In many cases we have seen this restrictive firewalls, proxy server or group policies cause such issues.
Also the limit of max allowed concurrent HTTP request per application or workstation could cause this (see ServicePointManager.DefaultConnectionLimit).

Alex
Avatar
Lightbarrier #3
Member since Jul 2014 · 52 posts
Group memberships: Members
Show profile · Link to this post
Thanks for your suggestions.

What you said makes since however, I have limited access to these machines. Do you have any suggestions for how we could narrow down the problem?

Presently we're researching each path you suggested however, since there are several possibilities with multiple configurable options we have no sure way to pinpoint where the problem is coming from. I realize that there's probably no easy solution for this however, it's at times like this that I wish there was some way I could monitor where the traffic is going and stopping on the network, so I didn't have to search for my problems based on what-ifs.

Thanks for the help!
Avatar
Alex #4
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
You could try to monitor the HTTP traffic with a software like Ethereal. But I don't think this will show you why the connection get killed and from which process.
Is there a reason why you are using BOSH and not TCP/IP sockets?

You are also using a pretty old MatriX version, but I don't think the latest 2.x version will act different.

Alex
Avatar
Lightbarrier #5
Member since Jul 2014 · 52 posts
Group memberships: Members
Show profile · Link to this post
Quote by Alex on 2016-04-07, 22:27:
You could try to monitor the HTTP traffic with a software like Ethereal. But I don't think this will show you why the connection get killed and from which process.

I've been looking at the following below as I doubt we can install wireshark on our users machines. However, I agree with you that I doubt it will show what's killing that connection.

https://blogs.msdn.microsoft.com/canberrapfe/2012/03/30/ca…

Quote by Alex on 2016-04-07, 22:27:
Is there a reason why you are using BOSH and not TCP/IP sockets?

We have users that have to use http due to the server that they're connecting to. We do have cases where socket connections are ok, and we are using them. However, for some of our users it has to be http or nothing.

This might be a long shot, but I've found the following when googling the error message.

http://stackoverflow.com/questions/11323584/unable-to-read…

At first I thought thought it wasn't applicable to my case, but then I remembered that in the past you've told me that BOSH is based on HttpWebRequests, and that you use the default implementation of the .NET Framework for them. Is there any chance that Matrix needs to be doing something similar as shown in the above link?

Thanks for the help!
Avatar
Alex #6
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
When MatriX creates a new HttpWebRequest it fires the event OnCreateWebRequest.
In this event you have access to the HttpWebRequest object and could try to set the properties from the thread you linked to.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS