Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled error after receiving feedback from the APNS connection #7

Closed
st3fan opened this issue Nov 12, 2014 · 2 comments
Closed

Unhandled error after receiving feedback from the APNS connection #7

st3fan opened this issue Nov 12, 2014 · 2 comments
Assignees
Labels

Comments

@st3fan
Copy link
Owner

st3fan commented Nov 12, 2014

2014-10-29 19:40:31+0100 [APNSProtocol (TLSMemoryBIOProtocol),client] APNSProtocol.dataReceived: 080a00000000
2014-10-29 19:40:31+0100 [APNSProtocol (TLSMemoryBIOProtocol),client] APNSProtocol.connectionLost
2014-10-29 19:40:31+0100 [APNSProtocol (TLSMemoryBIOProtocol),client] APNSClientFactory.clientConnectionMade
2014-10-29 19:40:31+0100 [APNSProtocol (TLSMemoryBIOProtocol),client] Unhandled Error
        Traceback (most recent call last):
          File "/home/xapsd/env/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-x86_64.egg/twisted/application/app.py", line 313, in runReactorWithLogging
            reactor.run()
          File "/home/xapsd/env/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-x86_64.egg/twisted/internet/base.py", line 1192, in run
            self.mainLoop()
          File "/home/xapsd/env/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-x86_64.egg/twisted/internet/base.py", line 1204, in mainLoop
            self.doIteration(t)
          File "/home/xapsd/env/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-x86_64.egg/twisted/internet/epollreactor.py", line 396, in doPoll
            log.callWithLogger(selectable, _drdw, selectable, fd, event)
        --- <exception caught here> ---
          File "/home/xapsd/env/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-x86_64.egg/twisted/python/log.py", line 88, in callWithLogger
            return callWithContext({"system": lp}, func, *args, **kw)
          File "/home/xapsd/env/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-x86_64.egg/twisted/python/log.py", line 73, in callWithContext
            return context.call({ILogContext: newCtx}, func, *args, **kw)
          File "/home/xapsd/env/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-x86_64.egg/twisted/python/context.py", line 118, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args, **kw)
          File "/home/xapsd/env/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-x86_64.egg/twisted/python/context.py", line 81, in callWithContext
            return func(*args,**kw)
          File "/home/xapsd/env/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-x86_64.egg/twisted/internet/posixbase.py", line 627, in _doReadOrWrite
            self._disconnectSelectable(selectable, why, inRead)
          File "/home/xapsd/env/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-x86_64.egg/twisted/internet/posixbase.py", line 260, in _disconnectSelectable
            selectable.connectionLost(f)
          File "/home/xapsd/env/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-x86_64.egg/twisted/internet/tcp.py", line 484, in connectionLost
            self._commonConnection.connectionLost(self, reason)
          File "/home/xapsd/env/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-x86_64.egg/twisted/internet/tcp.py", line 298, in connectionLost
            protocol.connectionLost(reason)
          File "/home/xapsd/env/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-x86_64.egg/twisted/protocols/tls.py", line 477, in connectionLost
            ProtocolWrapper.connectionLost(self, reason)
          File "/home/xapsd/env/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-x86_64.egg/twisted/protocols/policies.py", line 125, in connectionLost
            self.wrappedProtocol.connectionLost(reason)
          File "/home/xapsd/env/local/lib/python2.7/site-packages/dovecot_xaps_daemon-0.2-py2.7.egg/xapsd/apns.py", line 72, in connectionLost
            self.factory.clientConnectionMade(self)
          File "/home/xapsd/env/local/lib/python2.7/site-packages/dovecot_xaps_daemon-0.2-py2.7.egg/xapsd/apns.py", line 116, in clientConnectionMade
            self.looper.start(2.5)
          File "/home/xapsd/env/local/lib/python2.7/site-packages/Twisted-14.0.2-py2.7-linux-x86_64.egg/twisted/internet/task.py", line 162, in start
            assert not self.running, ("Tried to start an already running "
        exceptions.AssertionError: Tried to start an already running LoopingCall.
@st3fan
Copy link
Owner Author

st3fan commented Nov 12, 2014

It seems the 080a00000000 means 'Shutdown' and I think the daemon does not recover from that. Looks easy to fix.

@st3fan
Copy link
Owner Author

st3fan commented Nov 13, 2014

The big hint here is APNSClientFactory.clientConnectionMade .. that is wrong. Instead, APNSClientFactory.clientConnectionLost should have been called.

st3fan added a commit that referenced this issue Nov 13, 2014
st3fan added a commit that referenced this issue Nov 13, 2014
@st3fan st3fan closed this as completed Nov 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant