[pywin32-bugs] [ pywin32-Bugs-2994205 ] SimpleXMLRPCServer behave strangely in win32 service
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2010-04-29 15:20:38
|
Bugs item #2994205, was opened at 2010-04-29 22:51 Message generated for change (Comment added) made by adamhj You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=2994205&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: adamhj (adamhj) Assigned to: Nobody/Anonymous (nobody) Summary: SimpleXMLRPCServer behave strangely in win32 service Initial Comment: i found that when i run a SimpleXMLRPCServer instance in a windows service(using pywin32 win32service module), the server will occasionally refuse xml rpc request. ---------------------------------------------------------------------- >Comment By: adamhj (adamhj) Date: 2010-04-29 23:20 Message: and my testing environment is python 2.6.4, pywin32-214.win32-py2.6, windows 2003 server(x86) with sp2 ---------------------------------------------------------------------- Comment By: adamhj (adamhj) Date: 2010-04-29 23:16 Message: sorry, i'm using sf tracker for the first time and mistake the post button for upload attachment button. the bad response behavior (of SimpleXMLRPCServer in service) does not happen everytime but appears regularly, it seems it will occurs every a few calls the attachment i uploaded yet is my testing script of the server side, and the client side is a simple loop: #---------------------------------------------------------------------- #client.py import xmlrpclib s = xmlrpclib.ServerProxy('http://localhost:8000') while True: print s.func0() #---------------------------------------------------------------------- way to product the bug: 1. install server.py as windows service: python server.py install 2. start the service in service manager 3. run client.py in console: python client.py > output.txt and after a few calls, the error is raised: Traceback (most recent call last): File "D:\test\xmlrpcsvc\client.py", line 6, in <module> print s.func0() File "D:\Python26\lib\xmlrpclib.py", line 1199, in __call__ return self.__send(self.__name, args) File "D:\Python26\lib\xmlrpclib.py", line 1489, in __request verbose=self.__verbose File "D:\Python26\lib\xmlrpclib.py", line 1243, in request headers xmlrpclib.ProtocolError: <ProtocolError for localhost:8000/RPC2: -1 > i changed func0 to func1,2,3 to test different parameter type and size, and all output.txt have exactly 37 lines, so it seems that this error will happen every 38 client calls sniffer shows that in the failed session, the server will close the connection(TCP FIN) just after receive client request, without sending any response data or error info this behavior only exists in windows service process, when running a SimpleXMLRPCServer from console script, this does not happen, so i think maybe this is some issue in pywin32 service module ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=2994205&group_id=78018 |