Opened 9 years ago

Last modified 7 years ago

#12408 closed defect

Numerous tracebacks in the log — at Initial Version

Reported by: Ryan J Ollos Owned by: osimons
Priority: normal Component: XmlRpcPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

I'm frequently seeing tracebacks in the logs, presumable due to invalid input from bots. I'd like to see if there are simple changes we can make to avoid uncaught exceptions.

Here are some samples:

2015-05-11 10:04:51,726 Trac[web_ui] ERROR: RPC(XML-RPC) Error
Traceback (most recent call last):
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracXMLRPC-1.1.2_r13776-py2.6.egg/tracrpc/web_ui.py", line 143, in _rpc_process
    rpcreq = req.rpc = protocol.parse_rpc_request(req, content_type)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracXMLRPC-1.1.2_r13776-py2.6.egg/tracrpc/xml_rpc.py", line 118, in parse_rpc_request
    raise ProtocolException(xmlrpclib.Fault(-32700, to_unicode(e)))
ProtocolException: <Fault -32700: u"int() argument must be a string or a number, not 'NoneType'">
2015-05-11 10:04:52,321 Trac[web_ui] ERROR: RPC(XML-RPC) Error
Traceback (most recent call last):
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracXMLRPC-1.1.2_r13776-py2.6.egg/tracrpc/web_ui.py", line 143, in _rpc_process
    rpcreq = req.rpc = protocol.parse_rpc_request(req, content_type)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracXMLRPC-1.1.2_r13776-py2.6.egg/tracrpc/xml_rpc.py", line 118, in parse_rpc_request
    raise ProtocolException(xmlrpclib.Fault(-32700, to_unicode(e)))
ProtocolException: <Fault -32700: u"int() argument must be a string or a number, not 'NoneType'">
2015-06-18 09:38:29,733 Trac[json_rpc] ERROR: RPC(json) decode error
Traceback (most recent call last):
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracXMLRPC-1.1.2_r13776-py2.6.egg/tracrpc/json_rpc.py", line 162, in parse_rpc_request
    data = json.load(req, cls=TracRpcJSONDecoder)
  File "/usr/lib/python2.6/json/__init__.py", line 267, in load
    parse_constant=parse_constant, **kw)
  File "/usr/lib/python2.6/json/__init__.py", line 318, in loads
    return cls(encoding=encoding, **kw).decode(s)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracXMLRPC-1.1.2_r13776-py2.6.egg/tracrpc/json_rpc.py", line 113, in decode
    obj = json.JSONDecoder.decode(self, obj, *args, **kwargs)
  File "/usr/lib/python2.6/json/decoder.py", line 319, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.6/json/decoder.py", line 338, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
2015-06-18 09:39:17,884 Trac[json_rpc] ERROR: RPC(json) decode error
Traceback (most recent call last):
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracXMLRPC-1.1.2_r13776-py2.6.egg/tracrpc/json_rpc.py", line 162, in parse_rpc_request
    data = json.load(req, cls=TracRpcJSONDecoder)
  File "/usr/lib/python2.6/json/__init__.py", line 267, in load
    parse_constant=parse_constant, **kw)
  File "/usr/lib/python2.6/json/__init__.py", line 318, in loads
    return cls(encoding=encoding, **kw).decode(s)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracXMLRPC-1.1.2_r13776-py2.6.egg/tracrpc/json_rpc.py", line 113, in decode
    obj = json.JSONDecoder.decode(self, obj, *args, **kwargs)
  File "/usr/lib/python2.6/json/decoder.py", line 319, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.6/json/decoder.py", line 336, in raw_decode
    obj, end = self._scanner.iterscan(s, **kw).next()
  File "/usr/lib/python2.6/json/scanner.py", line 55, in iterscan
    rval, next_pos = action(m, context)
  File "/usr/lib/python2.6/json/decoder.py", line 171, in JSONObject
    raise ValueError(errmsg("Expecting property name", s, end))
ValueError: Expecting property name: line 1 column 1 (char 1)
2015-06-18 09:39:17,906 Trac[web_ui] ERROR: RPC(JSON-RPC) Error
Traceback (most recent call last):
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracXMLRPC-1.1.2_r13776-py2.6.egg/tracrpc/web_ui.py", line 143, in _rpc_process
    rpcreq = req.rpc = protocol.parse_rpc_request(req, content_type)
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracXMLRPC-1.1.2_r13776-py2.6.egg/tracrpc/json_rpc.py", line 176, in parse_rpc_request
    raise JsonProtocolException(e, -32700)
2015-06-18 09:57:54,830 Trac[web_ui] ERROR: RPC(JSON-RPC) Error
Traceback (most recent call last):
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracXMLRPC-1.1.2_r13776-py2.6.egg/tracrpc/web_ui.py", line 158, in _rpc_process
    result = (XMLRPCSystem(self.env).get_method(method_name)(req, args))[0]
  File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracXMLRPC-1.1.2_r13776-py2.6.egg/tracrpc/api.py", line 197, in __call__
    result = self.callable(req, *args)
ServiceException: getAll() takes exactly 2 arguments (3 given)

I haven't looked at the code yet, but I hope to provide a patch soon.

Change History (0)

Note: See TracTickets for help on using tickets.