Error: [Errno 10053]

Flask - socket.error: [Errno 10053] An established connection was aborted by the software in your host machine

This is an issue with the Python 2 implementation of the SocketServer module, it is not present in Python 3 (where the server keeps on serving).

Your have 3 options:

  • Don't use the built-in server for production systems (it is a development server after all). Use a proper WSGI server like gunicorn or uWSGI,
  • Enable threaded mode with app.run(threaded=True); the thread dies but a new one is created for future requests,
  • Upgrade to Python 3.

error: [Errno 10053] while submitting ajax form in Django

Finally found the solution:

I just moved form tag one step down inside <div class="modal-content"> and it worked. :)

solution:

<div class="modal animated" id="signupModal" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog modal-sm">
<!-- from here to -->
<div class="modal-content">
<form id='registerForm'>{% csrf_token %} <!-- to here -->
<div class="modal-header">
<button class="close">×</button>
</div>
<div class="modal-body">
<input class="form-control" type="email" id="inputEmail">
<input class="form-control" type="text" id="inputUsername">
<input class="form-control" type="password" id="inputPassword">
<input class="form-control" type="password" id="inputCPassword">
</div>
<div class="modal-footer" id="signup-footer">
<button type="submit" class="btn btn-default"> Register </button>
</div>
</form>
</div>
</div>
</div>

Python urlopen connection aborted - urlopen error [Errno 10053]

The issue here was a host based IDS was preventing the connection out. Problem solved.

I added my python script to the HIDS exception list. The exception list was the list of files that I allowed to connect out to the internet. Once it was added to the list, I was able to get network connectivity with the script and had no further problems. The test machine did not have a HIDS client installed so that is why it was allowing me to talk out. FYI, both had firewalls but only one (production machine) had the HIDS.

HIDS stands for Host based Intrusion Detection System. If the network security team has made the HIDS not visible to you, you might not know where to find it. Also, even if you do find it, you will not be able to disable it. You can ask your security team if they can add an exception for your script. Another sneaky way around the HIDS is to build your script into an exe (using Py2EXE) and rename the executable you create to something already on the HIDS exception list. A good one to rename it to would be your browser, so if Firefox is allowed internet access, rename your exe to firefox.exe.



Related Topics



Leave a reply



Submit