Click here to Skip to main content
15,902,198 members
Please Sign up or sign in to vote.
1.44/5 (2 votes)
See more:
What does this error mean in python? Like what is actually happening?

What am I messing with because it seems greater than my current knowledge scope.

C#
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
Posted
Updated 2-Sep-20 23:05pm

Read to error message, it is first help.
Quote:
An existing connection ...
Tells you that there was already an active connection at the place of error where you probably try to open a second one.
 
Share this answer
 
Comments
PythonHeadBanger 27-Nov-15 18:13pm    
Thank you. Any ideas on common solutions to this error?

I'm learning the the Python Requests module to figure out how to solve the situation.
Patrice T 27-Nov-15 18:21pm    
Common solution is obvious: Never try to open more than 1 connection.
Problem and solution are in your code.
PythonHeadBanger 27-Nov-15 18:28pm    
If one is using a loop to open multiple websites... how might one slow it down such that only one connection is open at a time?
Patrice T 27-Nov-15 18:40pm    
1 connection per server.
PythonHeadBanger 28-Nov-15 13:35pm    
Any keywords I should google? Thank you!
What's actually happening is the server on the otherside of the request is closing the connection.

It's possible that the problem lies on the server side.

I've tried inserting
time.sleep(3)
which kind of seems to help. I'd really rather not be inserting seconds into the run time though.

Final update and solution achieved. Given the possibility of a serverside malfunction or misbehavior I changed my IP address. My code compiles and runs as it did last week.


http://www.networkautomation.com/urc/knowledgebase/common-ftp-socket-errors/02899795-9874-19FA-89D9FA88304286FA/[^]

FTP Socket Error Code 10054

Additionally, if you are encountering any FTP related issues, we strongly suggest that you test the transmission with other FTP clients. This is a good method in determining the root of the problem. Keep in mind that when you are having similar problematic behavior in multiple clients against the same server, it's more than likely a server problem


https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).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.</pre>
 
Share this answer
 
v3
I had the same issue. Turns out I was connected to the VPN, due to which the ot was giving error.
Closed the VPN and downloaded the packages.

Happy Coding!
 
Share this answer
 
proxy configuration issue if you are trying this from inside a firewalled Corporate network.
 
Share this answer
 
It's a bug.

https://support.microsoft.com/en-us/help/2730109/odbc-call-failed-error-when-you-open-a-table-that-is-linked-to-a-sql-d[^]

The article says it's with SQL on Azure but if you look around the internet it's more than obvious that it's not just on Azure.

Workaround
To work around this issue, use one of the following methods:
* Click Last record as soon as the table is opened in order to display all records in the linked table in the Datasheet View of Access.
* Do not select all records in the linked table to be displayed. Instead, select only a limited number of records.
 
Share this answer
 
Comments
Richard Deeming 18-Sep-18 13:03pm    
Why would you think that a KB article about MS Access would be applicable to an already-solved question about Python?!
Hi,

I had a similar problem when I tried to connect to MongoDb Atlas via pymongo. There are 3 things you can do to solve this issue:

1. Install dnspython
2. Install checkdmarc 4.2.3
3. Go to you data base host, in my case it is MongoDB Atlas, and allow access to your database from anywhere. In the end, the IP on your host should look like this 0.0.0.0/0

I did all these steps and it is working for me. I hope this helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900