homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Jimbofbx
Recipients Jimbofbx
Date 2012年08月24日.17:42:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1345830136.59.0.644251371515.issue15779@psf.upfronthosting.co.za>
In-reply-to
Content
Windows 7 64-bit, Python 3.2.3
This is a very odd issue and I haven't figured out what caused it. I have a python script that runs continuously. When it receives a request to do a task, it creates a new thread (not a new process), does the task, then sends out an e-mail to indicate it was done. It doesn't do this a lot (maybe 10 - 30 times a day). This is all the script does.
Well today, it randomly broke. It was working fine, then suddenly I was getting the following error when it would create an SMTP object:
socket.error: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions
What I found was, even after trying a different script that did nothing but create a simple SMTP connection to localhost, running with admin privileges, and even after rebooting the machine, I was getting this error. I checked my firewall and didn't see any changes (I share a group policy so I do not have full control). I also tried the script on a different machine and found no issue. The issue also persisted between IDLE and simply running python.exe
When I tried to debug the issue, I discovered the following piece of code made the issue go away:
s = socket.socket()
s.bind(('',50007))
s.listen(1);
s.close();
And it hasn't come back since. I've tried to reproduce the circumstances that my script was running by creating SMTP instances in a loop but haven't been able to recreate the error. Checking my log, there isn't anything abnormal that occurred just before this issue (like attempting to do the task several times at once or something).
History
Date User Action Args
2012年08月24日 17:42:16Jimbofbxsetrecipients: + Jimbofbx
2012年08月24日 17:42:16Jimbofbxsetmessageid: <1345830136.59.0.644251371515.issue15779@psf.upfronthosting.co.za>
2012年08月24日 17:42:16Jimbofbxlinkissue15779 messages
2012年08月24日 17:42:15Jimbofbxcreate

AltStyle によって変換されたページ (->オリジナル) /