How do I solve a WSAECONNRESET error? - tcp

I am using Perforce as part of a small development team. Everyone was able to connect to the P4V client except for one person who gets the following error:
TCP receive failed.
read: socket: WSAECONNRESET
We have deactivated his McAfee firewall and virus scan, but the error persists. I really don't know what to do with this error and it seems to be rather undocumented on the perforce website. From what I gather, it's because it's not a perforce-specific issue, but rather a TCP communication problem that might be caused by something else.
Any tips?

a TCP communication problem that might be caused by something else.
This is possible, or it's possible that whenever this user connects it causes some sort of server fault.
https://msdn.microsoft.com/en-us/library/ms740668.aspx
WSAECONNRESET 10054 Connection reset by peer.
An existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, the host or remote network interface is disabled, or the remote host uses a hard close (see setsockopt for more information on the SO_LINGER option on the remote socket). This error may also result if a connection was broken due to keep-alive activity detecting a failure while one or more operations are in progress. Operations that were in progress fail with WSAENETRESET. Subsequent operations fail with WSAECONNRESET.
Beyond the usual connection troubleshooting questions (is this user on the same subnet? same version of the client software? same exact P4PORT setting? is the user able to connect via the command line client and if not does it give a more helpful error? why is this user unlike all other users?) I'd look at the server logs to see if it's logging any sort of more helpful error when this user tries to connect.

Related

BizTalk MSMQ Receive Locations Not receiving. Error details: The Messaging Engine is shutting down

So I have been running into this issue since we set up our BizTalk Server on a new network. We have the same MSMQ settings between the two servers.
The data stays in our AX MSMQ folders and has the correct permissions.
The system does not ever throw an error until I stop/restart the Receive Host Instances.
(we get one of these errors per message in any of our MSMQ ports)
Full error:
A message received by adapter "MSMQ" on receive location
"recv_loc_file_ax_2012_customer_message" with URI
"FORMATNAME:DIRECT=OS:AXSERVER\AXOUTPPDCUSTOMER" is suspended. Error
details: The Messaging Engine is shutting down. MessageId:
{65E24FE1-317E-4636-AFC7-B43FACBDBEDF} InstanceID:
{6618EEB3-9B72-4123-BD8C-422661A59BDD}
Then the messages finally appear under suspended instances after this error occurs. I am able to resume them and they all process as expected.
I have looked almost every, Anyone have suggestions for what is causing these messages to not be read into my MSMQ receive ports properly?
EDIT: This BizTalk server is connecting to a remote AX server's MSMQ, but I am doubting this changes anything I have not already looked into.
Thank you very much.
The error was on the guys who installed MSMQ on the remote server; the active directory was not set up thus not properly autenticating my BizTalk Server account.
Answer for BizTalk: The way to find these hidden errors was by changing the MSMQ BizTalk receive port to a WFC-NetMSMQ.
Other: we are a little baffled that BizTalk was able to take the messages out of MSMQ despite the AD not being set up and "force messages through" but this is a minor detail to note.
BizTalk reference

How to debug pending state of an HTTP request

My website works fine on my local machine. And it also works fine, when I publish it, and access it over the Internet.
However, when I access it through my company's network (LAN), many requests state in the pending state and they won't return back either successfully, or with error. No IIS logs, no nothing.
After like 5 minutes, the request simply dies. No HTTP response is shown in Chrome's console. I guess it's a network problem. But I don't know how to debug it.
How should I debug this pending state?
This is more a problem for sys-ops than for development but you might need to verify/prove the problem is with the routers and not with your server or computer configuration.
The first tool you need is network analyzer, for this look no further than Wireshark. You'll need administrator permissions on your machine.
Wireshark is intuitive, but has a lot of features, you might want to read a tutorial or two on how to use it.
With Wireshark on your machine you can verify a TCP connection to the server is made or attempted. If you don't know how TCP works, now is the time to learn.
Based on the result you should have your answer of where the problem is:
No TCP SYN sent or sent to wrong IP: problem in your machine. Make sure the server is not redirected to localhost/wrong ip in the hosts file and verify no static routes have been added to your routing table.
Most likely no TCP SYN-ACK: The problem is in the network routing, you might want to install Wireshark on the server and verify the SYN packets are indeed not getting through. Get your sys-ops guys to fix the problem. Probably a misconfigured firewall rule.
Very unlikely: TCP connection established and HTTP request sent to server, but server does not respond. No idea, if the server responds to internet traffic it should respond to your traffic.
By the way if there are no sys-ops guys in your company to fix the problem, get the model of any configurable router between your computer and the server and try asking in Server Fault (or get a consultant).

troubleshooting tcp/ip connection failure in my application

I am having a desktop application which can talk to a server application using TCP/IP. It was working all these days but now we ran into an issue. The log message in the server shows that the socket is disconnected after a while, but we are able to exchange heart beat messages. When i ran the WhireShark tool i am getting this log which i dont know how to interpret.
The other thing is when i run this application in the LAN where the server is running it just works fine.
Please help me to understand what is happening in the network.
It is difficult for me to see the trace details but it looks like .218 is the client trying to connect to .135? If so, 218's connection attempts (SYN) are being immediately rejected by 135 (RST). Normal 3-way TCP handshake should be SYN, SYN-ACK, ACK.
If the server is accepting requests from other hosts has some sort of firewall or the sort been setup to allow local LAN connections but disallow remote hosts?

Sporadic SQL Server error when trying to connect to the database

I will get the error below randomly when I'm running an asp.net application I am working on. Usually it will happen ever 3 days or so and I am forced to restart my machine to fix it but it's been getting worse and now a reboot dosn't seem to fix anything. I'm running the application on my machine and doing a lot of debugging. All interactions with the db are done through linq to sql. The db is on another server that I am connecting to. Has anyone run into this before? Any suggestions?
A network-related or instance-specific
error occurred while establishing a
connection to SQL Server. The server
was not found or was not accessible.
Verify that the instance name is
correct and that SQL Server is
configured to allow remote
connections. (provider: TCP Provider,
error: 0 - No such host is known.)
It may be DNS, try to use some different DNS addresses. :)
I've seen similar before but it was related to a faulty network card that was dropping packets. Have you had any other strange network problems?
In your connection string to the db is the host entered as a hostname or an IP address. If by name try swapping to its IP address instead. This won't solve the underlying problem by may workaround it for you.
Edit
Also have a look at this SO answer here. Are you leaving connections open/orphaning them? That would ring true with the disconnect happening at regular time intervals..

Why is this error happening a lot "asp.net, sql server"?

I have this error which happen many times on my site:
"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.)"
My site files are on a server and the database on another server, but on the same network.
Anyone know what may cause this problem and how to solve?
Notes:
- When i restart the website server the problem solve and everything work fine.
- Sure my sql server allow remote connections from this website server
It's a pretty generic error when the application can't get to the database. Perhaps you are leaving connections open after using them? There could be a limit on the amount of concurrent connections by user or server.
It's a networking error of some kind, or you're specifying the instance name incorrectly. I've recently seen both cases. In one case, I had moved a connection string from one system, to another system that had a different instance name installed. In another case, I had a server running in a Virtual Machine - about ten minutes after the machine was resumed from suspension, the machine would lose its DHCP lease (and therefore its connectivity).
It could be just about anything, and you'll have to go find out, perhaps by using a network monitor program like Microsoft Network Monitor 3.2.
I found a good article talking about this error, i think it shows the real reason
Understanding the error “An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.”

Resources