crossbario / crossbar

Crossbar.io - WAMP application router
https://crossbar.io/
Other
2.05k stars 274 forks source link

Long poll broken in 0.13 #702

Closed herm closed 8 years ago

herm commented 8 years ago

Trying to connect to my server via long poll return error 500 after the upgrade to 0.13.0. It worked in an earlier version (0.11?).

Output from Crossbar:

Unhandled Error
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1439, in dataReceived
    finishCallback(data[contentLength:])
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1704, in _finishRequestBody
    self.allContentReceived()
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1767, in allContentReceived
    req.requestReceived(command, path, version)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 768, in requestReceived
    self.process()
--- <exception caught here> ---
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/server.py", line 183, in process
    self.render(resrc)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/server.py", line 234, in render
    body = resrc.render(self)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/resource.py", line 250, in render
    return m(request)
  File "/usr/local/lib/python2.7/dist-packages/crossbar/router/longpoll.py", line 397, in render_POST
    self.log.debug("WampLongPoll: creating new session ..")
exceptions.AttributeError: WampLongPollResourceOpen instance has no attribute 'log'

Could be related to #610

herm commented 8 years ago

I'm still getting the same issue running current git master (701a2d2).

oberstet commented 8 years ago

@herm Could you please post the output of crossbar version and the traceback here?

herm commented 8 years ago
crossbar version
     __  __  __  __  __  __      __     __
    /  `|__)/  \/__`/__`|__) /\ |__)  |/  \
    \__,|  \\__/.__/.__/|__)/~~\|  \. |\__/

 Crossbar.io        : 0.13.2
   Autobahn         : 0.13.1 (with JSON, MessagePack, CBOR, UBJSON)
   Twisted          : 16.1.1-EPollReactor
   LMDB             : 0.89/lmdb-0.9.18
   Python           : 2.7.9/CPython
 OS                 : Linux-4.6.0-rc3-00057-g90de680-dirty-armv7l-with-debian-8.4
 Machine            : armv7l

The traceback hasn't changed:

2016-05-01T18:15:32+0200 [Router      13020] Unhandled Error
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1439, in dataReceived
    finishCallback(data[contentLength:])
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1704, in _finishRequestBody
    self.allContentReceived()
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1767, in allContentReceived
    req.requestReceived(command, path, version)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 768, in requestReceived
    self.process()
--- <exception caught here> ---
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/server.py", line 183, in process
    self.render(resrc)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/server.py", line 234, in render
    body = resrc.render(self)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/resource.py", line 250, in render
    return m(request)
  File "/usr/local/lib/python2.7/dist-packages/crossbar-0.13.2-py2.7.egg/crossbar/router/longpoll.py", line 397, in render_POST
    self.log.debug("WampLongPoll: creating new session ..")
exceptions.AttributeError: WampLongPollResourceOpen instance has no attribute 'log'
oberstet commented 8 years ago

Right. Thanks for reporting (again) =(

Obviously, all the resources like WampLongPollResourceSessionSend etc need a logger .. easy enough.

meejah commented 8 years ago

@herm does this fix your issue? (You can try before merge by pip install https://github.com/meejah/crossbar/archive/issue702-loggers.zip#egg=crossbar)

herm commented 8 years ago

Yes, the problem is gone now. Thanks.