[英]XML-RPC ResponseError failures on some machines and not others
I have a very simple python script that connects to a MoinMoin wiki via XMLRPC (v2) and pulls some data. 我有一个非常简单的python脚本,该脚本通过XMLRPC(v2)连接到MoinMoin Wiki,并提取一些数据。 It all begins with a simple authentication:
一切都从简单的身份验证开始:
self._server = xmlrpclib.ServerProxy(self.url)
self.token = self._server.getAuthToken(self.user, self.password)
The same script works on some machines, and fails on others. 同一脚本可在某些计算机上运行,而在其他计算机上则失败。 Below are the error dumps, and at the bottom the Apache logs.
下面是错误转储,在底部是Apache日志。
It works on this machine: 它可以在此机器上运行:
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3] on linux2
But it fails on this machine (notice same python version): 但它在这台机器上失败(注意相同的python版本):
Python 2.7.3 (default, Sep 26 2013, 20:08:41)
[GCC 4.6.3] on linux2
[...]
self.token = self._server.getAuthToken(self.user, self.password)
File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
verbose=self.__verbose
File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python2.7/xmlrpclib.py", line 1297, in single_request
return self.parse_response(response)
File "/usr/lib/python2.7/xmlrpclib.py", line 1473, in parse_response
return u.close()
File "/usr/lib/python2.7/xmlrpclib.py", line 791, in close
raise ResponseError()
xmlrpclib.ResponseError: ResponseError()
It also fails on this machine (same error, different line numbers obviously): 它在这台机器上也失败了(相同的错误,显然是不同的行号):
Python 2.6.5 (r265:79063, Sep 26 2013, 18:48:04)
[GCC 4.4.3] on linux2
[...]
self.token = self._server.getAuthToken(self.user, self.password)
File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in __request
verbose=self.__verbose
File "/usr/lib/python2.6/xmlrpclib.py", line 1253, in request
return self._parse_response(h.getfile(), sock)
File "/usr/lib/python2.6/xmlrpclib.py", line 1392, in _parse_response
return u.close()
File "/usr/lib/python2.6/xmlrpclib.py", line 836, in close
raise ResponseError()
xmlrpclib.ResponseError: ResponseError()
MoinMoin server details: MoinMoin服务器详细信息:
Python Version
2.7.3 (default, Feb 27 2014, 20:09:21) [GCC 4.6.3]
MoinMoin Version
Release 1.9.7 [Revision release]
Here's the apache log (captured later, so it might not be related; I haven't tried a cross-correlation with the time): 这是apache日志(稍后捕获,因此可能不相关;我没有尝试与时间进行互相关):
[Wed Apr 02 00:20:15 2014] [error] 2014-04-02 00:20:15,212 INFO MoinMoin.config.multiconfig:127 using wiki config: /opt/moin/share/moin/wikiconfig.pyc
[Wed Apr 02 00:23:35 2014] [info] mod_wsgi (pid=4909): Maximum requests reached 'moin'.
[Wed Apr 02 00:23:35 2014] [info] mod_wsgi (pid=4909): Shutdown requested 'moin'.
[Wed Apr 02 00:23:35 2014] [info] mod_wsgi (pid=4909): Stopping process 'moin'.
[Wed Apr 02 00:23:35 2014] [info] mod_wsgi (pid=4909): Destroying interpreters.
[Wed Apr 02 00:23:35 2014] [info] mod_wsgi (pid=4909): Destroy interpreter 'foo.bar.baz|'.
[Wed Apr 02 00:23:35 2014] [info] mod_wsgi (pid=4909): Cleanup interpreter ''.
[Wed Apr 02 00:23:35 2014] [info] mod_wsgi (pid=4909): Terminating Python.
[Wed Apr 02 00:23:35 2014] [info] mod_wsgi (pid=4909): Python has shutdown.
[Wed Apr 02 00:23:35 2014] [info] mod_wsgi (pid=10496): Attach interpreter ''.
Any clue? 有什么线索吗? I'm really flabbergasted.
我真的很惊讶。
Use a keyword search in the server configuration files to troubleshoot by looking for access control restrictions based on IP or hostnames: 在服务器配置文件中使用关键字搜索通过查找基于IP或主机名的访问控制限制来进行故障排除:
Apache: Allow from
or Deny from
Apache:
Allow from
或Deny from
nginx: allow
or deny
nginx:
allow
或deny
Lighttpd: $HTTP["host"]
or $HTTP["remoteip"]
Lighttpd:
$HTTP["host"]
或$HTTP["remoteip"]
References 参考文献
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.