0

I am getting following error while running portia on docker in ubuntu 14.04. I have gone through following answers, but they are not working.

Autobahn websocket issue while running with twistd using tac file

docker command: sudo docker run --rm -p 9001:9001 --name portia portia

Docker version 1.9.1, build a34a1d5

Twisted: 15.5.0

python - 2.7

building portia image downloaded from https://github.com/scrapinghub/portia

2015-12-12 15:34:03.676329 [HTTPChannel,56,127.0.0.1] Unhandled Error
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/twisted/protocols/basic.py", line 571, in dataReceived
    why = self.lineReceived(line)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1676, in lineReceived
    self.allContentReceived()
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1755, in allContentReceived
    req.requestReceived(command, path, version)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 823, in requestReceived
    self.process()
--- <exception caught here> ---
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/server.py", line 189, in process
    self.render(resrc)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/server.py", line 238, in render
    body = resrc.render(self)
  File "/app/slyd/slyd/splash/ferry.py", line 79, in render
    return WebSocketResource.render(self, request)
  File "/usr/local/lib/python2.7/dist-packages/autobahn/twisted/resource.py", line 162, in render
    protocol.makeConnection(transport)
  File "/usr/local/lib/python2.7/dist-packages/twisted/internet/protocol.py", line 487, in makeConnection
    self.connectionMade()
  File "/usr/local/lib/python2.7/dist-packages/autobahn/twisted/websocket.py", line 88, in connectionMade
    self._connectionMade()
  File "/usr/local/lib/python2.7/dist-packages/autobahn/websocket/protocol.py", line 2720, in _connectionMade
    WebSocketProtocol._connectionMade(self)
  File "/usr/local/lib/python2.7/dist-packages/autobahn/websocket/protocol.py", line 1187, in _connectionMade
    self.openHandshakeTimeoutCall = txaio.call_later(self.openHandshakeTimeout, self.onOpenHandshakeTimeout)
  File "/usr/local/lib/python2.7/dist-packages/txaio/_unframework.py", line 43, in _throw_usage_error
    "To use txaio, you must first select a framework "
exceptions.RuntimeError: To use txaio, you must first select a framework with .use_twisted() or .use_txaio()


2015-12-12 15:34:03.684892 [HTTPChannel,56,127.0.0.1] Unhandled Error
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/twisted/python/log.py", line 101, in callWithLogger
    return callWithContext({"system": lp}, func, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/twisted/python/log.py", line 84, in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
    return func(*args,**kw)
--- <exception caught here> ---
  File "/usr/local/lib/python2.7/dist-packages/qtreactor/qt4base.py", line 100, in _read
    data = w.doRead()
  File "/usr/local/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 209, in doRead
    return self._dataReceived(data)
  File "/usr/local/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 215, in _dataReceived
    rval = self.protocol.dataReceived(data)
  File "/usr/local/lib/python2.7/dist-packages/twisted/protocols/basic.py", line 571, in dataReceived
    why = self.lineReceived(line)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1676, in lineReceived
    self.allContentReceived()
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1755, in allContentReceived
    req.requestReceived(command, path, version)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 823, in requestReceived
    self.process()
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/server.py", line 191, in process
    self.processingFailed(failure.Failure())
  File "/app/slyd/slyd/server.py", line 30, in processingFailed
    return WebRequest.processingFailed(self, reason)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/server.py", line 329, in processingFailed
    self.write(body)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/server.py", line 217, in write
    http.Request.write(self, data)
  File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 1006, in write
    self.transport.writeSequence(l)
exceptions.AttributeError: 'NoneType' object has no attribute 'writeSequence'


2015-12-12 15:34:03.685464 [HTTPChannel,56,127.0.0.1] Unhandled Error
Traceback (most recent call last):
  File "bin/slyd", line 41, in <module>
    splash.server.main()
  File "/usr/local/lib/python2.7/dist-packages/splash/server.py", line 386, in main
    reactor.run()
  File "/usr/local/lib/python2.7/dist-packages/qtreactor/qt4base.py", line 282, in run
    self._blockApp.exec_()
  File "/usr/local/lib/python2.7/dist-packages/qtreactor/qt4base.py", line 110, in read
    log.callWithLogger(w, _read)
--- <exception caught here> ---
  File "/usr/local/lib/python2.7/dist-packages/twisted/python/log.py", line 101, in callWithLogger
    return callWithContext({"system": lp}, func, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/twisted/python/log.py", line 84, in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
    return func(*args,**kw)
  File "/usr/local/lib/python2.7/dist-packages/qtreactor/qt4base.py", line 107, in _read
    self.qt_reactor._disconnectSelectable(w, sys.exc_info()[1], False)
  File "/usr/local/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line 260, in _disconnectSelectable
    selectable.connectionLost(failure.Failure(why))
  File "/usr/local/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 293, in connectionLost
    protocol.connectionLost(reason)
  File "/usr/local/lib/python2.7/dist-packages/autobahn/twisted/websocket.py", line 98, in connectionLost
    self._connectionLost(reason)
  File "/usr/local/lib/python2.7/dist-packages/autobahn/websocket/protocol.py", line 2732, in _connectionLost
    WebSocketProtocol._connectionLost(self, reason)
  File "/usr/local/lib/python2.7/dist-packages/autobahn/websocket/protocol.py", line 1209, in _connectionLost
    if self.autoPingPendingCall:
exceptions.AttributeError: 'FerryServerProtocol' object has no attribute 'autoPingPendingCall'

`

Community
  • 1
  • 1
Siddhant
  • 687
  • 1
  • 8
  • 15
  • This needs a lot more information for anyone to really help debug. What is the `Dockerfile` building the image? What Docker commands used to run to reproduce the error? What version of Docker, Twisted, Portia, and Python? – Andy Shinn Dec 12 '15 at 18:50
  • docker command: sudo docker run --rm -p 9001:9001 --name portia portia, Docker version 1.9.1, build a34a1d5, Twisted: 15.5.0 python - 2.7 – Siddhant Dec 14 '15 at 17:35
  • Please edit your initial question with the required information. What about `Dockerfile`? – Andy Shinn Dec 14 '15 at 18:38

0 Answers0