praekelt/vumi-go — pull request #717 by hodgestar (2013-10-02 13:44:00+00:00)
Title: survey app control messages can get stuck.

Something's got Riak complaining about inputs in a M/R all of a sudden.

At the moment 3 of the 4 workers have a control message that's stuck because of this.

```
2013-09-19 21:50:07+0000 [HTTP11ClientProtocol,client] Unhandled error in Deferred:
2013-09-19 21:50:07+0000 [HTTP11ClientProtocol,client] Unhandled Error
Traceback (most recent call last):
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 397, in errback
self._startRunCallbacks(fail)
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 464, in _startRunCallbacks
self._runCallbacks()
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 551, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1101, in gotResult
_inlineCallbacks(r, g, deferred)
--- ---
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1043, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/mnt/praekelt/vumi-go/ve/src/vumi/vumi/service.py", line 283, in read_messages
yield self.consume(message)
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1043, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/mnt/praekelt/vumi-go/ve/src/vumi/vumi/service.py", line 302, in consume
message.content.body))
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1043, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/mnt/praekelt/vumi-go/go/apps/surveys/vumi_app.py", line 121, in process_command_send_survey
for contact in (yield contacts):
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1043, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/mnt/praekelt/vumi-go/go/vumitools/conversation/utils.py", line 497, in _filter_opted_out_contacts
address_type, addresses)
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1043, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/riakasaurus/mapreduce.py", line 234, in run
result = yield t.mapred(self._inputs, query, timeout)
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1045, in _inlineCallbacks
result = g.send(result)
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/riakasaurus/transport/http_transport.py", line 479, in mapred
(repr(response[0]),repr(response[1])))
exceptions.Exception: Error running MapReduce operation. Headers: {'date': 'Thu, 19 Sep 2013 21:50:07 GMT', 'content-type': 'text/plain', 'http_code': 400, 'server': 'MochiWeb/1.1 WebMachine/1.9.0 (someone had painted it blue)'} Body: 'An error occurred parsing the "inputs" field.\n"No inputs were given.\\n"'
```