What is the status of the Python 3 support?

#1

Hi,

Crossbar.io fully supports Python 3 as a platform, and for app components in router and container workers, but Twisted only.

For asyncio based components, you can use guest workers with any Python - including the one where Crossbar.io might be installed - if it is a Python 3.

Cheers,
/Tobias

···

Am 28.02.2017 um 21:11 schrieb Adam Jorgensen:

Hi guys, quick question, what is the status of the Python 3 support in
Crossbar 17.2.1?

I asked because I started a new Crossbar project using Python 3 as the
base. Crossbar runs fine under Python 3 but my components written using
asyncio fail with output as follows:

adamj@Harvester-LINUX  ~/Development/OpenDNA/ethel-crossbar   master 
venv/bin/crossbar start

2017-02-28T22:08:31+0200 [Controller 14227] __ __ __ __ __ __
   __ __

2017-02-28T22:08:31+0200 [Controller 14227] / `|__)/ \/__`/__`|__)
/\ |__) |/ \

2017-02-28T22:08:31+0200 [Controller 14227] \__,|
\\__/.__/.__/|__)/~~\| \. |\__/

2017-02-28T22:08:31+0200 [Controller 14227]

2017-02-28T22:08:31+0200 [Controller 14227] Version: Crossbar.io
COMMUNITY 17.2.1

2017-02-28T22:08:31+0200 [Controller 14227] Public Key:
4f6cd89aae30ab9ee0f28b5f3e3aa9f8bb32b3227d35718a0c42714cf7550c3f

2017-02-28T22:08:31+0200 [Controller 14227]
2017-02-28T22:08:31+0200 [Controller 14227] Node created with personality
"community" [crossbar.controller.node.Node]

2017-02-28T22:08:31+0200 [Controller 14227] Running from node directory
"/home/adamj/Development/OpenDNA/ethel-crossbar/.crossbar"

2017-02-28T22:08:31+0200 [Controller 14227] Node configuration loaded from
"/home/adamj/Development/OpenDNA/ethel-crossbar/.crossbar/config.yaml"

2017-02-28T22:08:31+0200 [Controller 14227] Controller process starting
(CPython-EPollReactor) ..

2017-02-28T22:08:31+0200 [Controller 14227] No extra node router roles

2017-02-28T22:08:31+0200 [Controller 14227] Router service session
attached [crossbar.router.service.RouterServiceSession]

2017-02-28T22:08:31+0200 [Controller 14227] Joined realm 'crossbar' on
node management router

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API
procedure "crossbar.get_info"

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API
procedure "crossbar.shutdown"

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API
procedure "crossbar.get_workers"

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API
procedure "crossbar.get_worker"

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API
procedure "crossbar.get_worker_log"

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API
procedure "crossbar.start_router"

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API
procedure "crossbar.stop_router"

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API
procedure "crossbar.start_container"

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API
procedure "crossbar.stop_container"

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API
procedure "crossbar.start_guest"

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API
procedure "crossbar.stop_guest"

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API
procedure "crossbar.start_websocket_testee"

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API
procedure "crossbar.stop_websocket_testee"

2017-02-28T22:08:31+0200 [Controller 14227] Node controller attached
[crossbar.controller.process.NodeControllerSession]

2017-02-28T22:08:31+0200 [Controller 14227] Using default node shutdown
triggers ['shutdown_on_worker_exit']

2017-02-28T22:08:31+0200 [Controller 14227] Configuring node from local
configuration ...

2017-02-28T22:08:31+0200 [Controller 14227] Starting 2 workers ...

2017-02-28T22:08:31+0200 [Controller 14227] Starting Router with ID
'worker-001'...

2017-02-28T22:08:31+0200 [Router 14232] Worker process starting
(CPython-EPollReactor) ..

2017-02-28T22:08:31+0200 [Router 14232] RouterWorkerSession:
SessionDetails(realm=<crossbar>, session=5792398432447254,
authid=<crossbar.process.14232>, authrole=<crossbar.worker.worker-001>,
authmethod=trusted, authprovider=programcode, authextra=None, re
sumed=None, resumable=None, resume_token=None)

2017-02-28T22:08:31+0200 [Controller 14227] Router with ID 'worker-001'
and PID 14232 started

2017-02-28T22:08:31+0200 [Router 14232] Realm 'ai.opendna.ethel'
started

2017-02-28T22:08:31+0200 [Controller 14227] Router 'worker-001': realm
'realm-001' (named 'ai.opendna.ethel') started

2017-02-28T22:08:31+0200 [Router 14232] role role-001 on realm
realm-001 started

2017-02-28T22:08:31+0200 [Controller 14227] Router 'worker-001': role
'role-001' (named 'user') started on realm 'realm-001'

2017-02-28T22:08:31+0200 [Router 14232] role role-002 on realm
realm-001 started

2017-02-28T22:08:31+0200 [Controller 14227] Router 'worker-001': role
'role-002' (named 'system') started on realm 'realm-001'

2017-02-28T22:08:31+0200 [Router 14232] WampWebSocketServerFactory
starting on 8080

2017-02-28T22:08:31+0200 [Controller 14227] Router 'worker-001': transport
'transport-001' started

2017-02-28T22:08:31+0200 [Router 14232] WampRawSocketServerFactory
starting on '/tmp/ethel'

2017-02-28T22:08:31+0200 [Controller 14227] Router 'worker-001': transport
'transport-002' started

2017-02-28T22:08:31+0200 [Controller 14227] Starting Container with ID
'worker-002'...

2017-02-28T22:08:31+0200 [Container 14237] Worker process starting
(CPython-EPollReactor) ..

2017-02-28T22:08:32+0200 [Container 14237] ContainerWorkerSession:
SessionDetails(realm=<crossbar>, session=5534053852863604,
authid=<crossbar.process.14237>, authrole=<crossbar.worker.worker-002>,
authmethod=trusted, authprovider=programcode, authextra=None,
resumed=None, resumable=None, resume_token=None)

2017-02-28T22:08:32+0200 [Controller 14227] Container with ID 'worker-002'
and PID 14237 started

2017-02-28T22:08:32+0200 [Container 14237] Component loading failed

Traceback (most recent call last):

  File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/autobahn/wamp/websocket.py",
line 95, in onMessage

    self._session.onMessage(msg)

  File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/autobahn/wamp/protocol.py",
line 871, in onMessage

    on_reply = txaio.as_future(endpoint.fn, *invoke_args, **invoke_kwargs)

  File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/txaio/tx.py",
line 408, in as_future

    return maybeDeferred(fun, *args, **kwargs)

  File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/twisted/internet/defer.py",
line 150, in maybeDeferred

    result = f(*args, **kw)

--- <exception caught here> ---

  File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/crossbar/worker/container.py",
line 206, in start_container_component

    create_component = _appsession_loader(config)

  File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/crossbar/worker/__init__.py",
line 74, in _appsession_loader

    pythonpath=sys.path

autobahn.wamp.exception.ApplicationError:
ApplicationError(error=<crossbar.error.class_import_failed>, args=['Failed
to import class
\'ethel.authentication.odna_sso.ODNASSOTokenAuthentication\'\nTraceback
(most recent call last):\n File "/home/adamj/Developmen
t/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/autobahn/wamp/protocol.py",
line 871, in onMessage\n on_reply = txaio.as_future(endpoint.fn,
*invoke_args, **invoke_kwargs)\n File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/s
ite-packages/txaio/tx.py", line 408, in as_future\n return
maybeDeferred(fun, *args, **kwargs)\n File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/twisted/internet/defer.py",
line 150, in maybeDeferred\n result = f(*ar
gs, **kw)\n File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/crossbar/worker/container.py",
line 206, in start_container_component\n create_component =
_appsession_loader(config)\n--- <exception caught here> ---\n File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/crossbar/worker/__init__.py",
line 58, in _appsession_loader\n module =
importlib.import_module(module_name)\n File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/pyt
hon3.5/importlib/__init__.py", line 126, in import_module\n return
_bootstrap._gcd_import(name[level:], package, level)\n File "<frozen
importlib._bootstrap>", line 986, in _gcd_import\n \n File "<frozen
importlib._bootstrap>", line 969, in _find_and_lo
ad\n \n File "<frozen importlib._bootstrap>", line 958, in
_find_and_load_unlocked\n \n File "<frozen importlib._bootstrap>", line
673, in _load_unlocked\n \n File "<frozen
importlib._bootstrap_external>", line 673, in exec_module\n \n File "<fr
ozen importlib._bootstrap>", line 222, in _call_with_frames_removed\n \n
File
"/home/adamj/Development/OpenDNA/ethel-crossbar-components/ethel/authentication/odna_sso.py",
line 9, in <module>\n from ethel.common import ETHELSession, settings\n
File "/ho
me/adamj/Development/OpenDNA/ethel-crossbar-components/ethel/common/__init__.py",
line 2, in <module>\n from autobahn.asyncio import ApplicationSession\n
File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/autobahn/asyncio/
__init__.py", line 36, in <module>\n from autobahn.asyncio.websocket
import \\\n File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/autobahn/asyncio/websocket.py",
line 32, in <module>\n txaio.use_asyncio()\n File "/ho
me/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/txaio/__init__.py",
line 119, in use_asyncio\n raise RuntimeError("Explicitly using \'{}\'
already".format(_explicit_framework))\nbuiltins.RuntimeError: Explicitly
using \'twisted\'
already\n'], kwargs={'pythonpath':
['/home/adamj/Development/OpenDNA/ethel-crossbar', '',
'/home/adamj/Development/OpenDNA/ethel-crossbar/venv/bin',
'/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python35.zip',
'/home/adamj/Development/OpenDNA/ethel-
crossbar/venv/lib/python3.5',
'/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/plat-x86_64-linux-gnu',
'/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/lib-dynload',
'/usr/lib/python3.5', '/usr/lib/python3.5/plat-x86_64-linux
-gnu',
'/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages',
'/home/adamj/Development/OpenDNA/ethel-crossbar-components']},
enc_algo=None)

2017-02-28T22:08:32+0200 [Controller 14227]
crossbar.error.class_import_failed: Failed to import class
'ethel.authentication.odna_sso.ODNASSOTokenAuthentication'

Traceback (most recent call last):

  File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/autobahn/wamp/protocol.py",
line 871, in onMessage

    on_reply = txaio.as_future(endpoint.fn, *invoke_args, **invoke_kwargs)

  File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/txaio/tx.py",
line 408, in as_future

    return maybeDeferred(fun, *args, **kwargs)

  File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/twisted/internet/defer.py",
line 150, in maybeDeferred

    result = f(*args, **kw)

  File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/crossbar/worker/container.py",
line 206, in start_container_component

    create_component = _appsession_loader(config)

--- <exception caught here> ---

  File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/crossbar/worker/__init__.py",
line 58, in _appsession_loader

    module = importlib.import_module(module_name)

  File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/importlib/__init__.py",
line 126, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

  File "<frozen importlib._bootstrap>", line 986, in _gcd_import

  File "<frozen importlib._bootstrap>", line 969, in _find_and_load

  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked

  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked

  File "<frozen importlib._bootstrap_external>", line 673, in exec_module

  File "<frozen importlib._bootstrap>", line 222, in
_call_with_frames_removed

  File
"/home/adamj/Development/OpenDNA/ethel-crossbar-components/ethel/authentication/odna_sso.py",
line 9, in <module>

    from ethel.common import ETHELSession, settings

  File
"/home/adamj/Development/OpenDNA/ethel-crossbar-components/ethel/common/__init__.py",
line 2, in <module>

    from autobahn.asyncio import ApplicationSession

  File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/autobahn/asyncio/__init__.py",
line 36, in <module>

    from autobahn.asyncio.websocket import \

  File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/autobahn/asyncio/websocket.py",
line 32, in <module>

    txaio.use_asyncio()

  File
"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/txaio/__init__.py",
line 119, in use_asyncio

    raise RuntimeError("Explicitly using '{}'
already".format(_explicit_framework))

builtins.RuntimeError: Explicitly using 'twisted' already

2017-02-28T22:08:32+0200 [Controller 14227] sending TERM to subprocess
14232

2017-02-28T22:08:32+0200 [Controller 14227] waiting for 14232 to exit...

2017-02-28T22:08:32+0200 [Controller 14227] sending TERM to subprocess
14237

2017-02-28T22:08:32+0200 [Controller 14227] waiting for 14237 to exit...

2017-02-28T22:08:32+0200 [Router 14232] Native worker received SIGTERM
- shutting down ..

2017-02-28T22:08:32+0200 [Router 14232] Shutdown of worker requested!

2017-02-28T22:08:32+0200 [Container 14237] Native worker received SIGTERM
- shutting down ..

2017-02-28T22:08:32+0200 [Container 14237] Shutdown of worker requested!

2017-02-28T22:08:32+0200 [Container 14237] Connection to node controller
closed cleanly

2017-02-28T22:08:32+0200 [Router 14232] Connection to node controller
closed cleanly

2017-02-28T22:08:32+0200 [Router 14232] (TCP Port 8080 Closed)

2017-02-28T22:08:32+0200 [Router 14232] (UNIX Port /tmp/ethel Closed)

2017-02-28T22:08:32+0200 [Controller 14227] Native worker connection
closed cleanly.

2017-02-28T22:08:32+0200 [Controller 14227] Node worker worker-002 ended
successfully

2017-02-28T22:08:32+0200 [Controller 14227] Node worker ended, and trigger
'shutdown_on_worker_exit' active

2017-02-28T22:08:32+0200 [Controller 14227] Node shutting down ..

2017-02-28T22:08:32+0200 [Controller 14227] Shutting down node...

2017-02-28T22:08:32+0200 [Controller 14227] Native worker connection
closed cleanly.

2017-02-28T22:08:32+0200 [Controller 14227] Node worker worker-001 ended
successfully

2017-02-28T22:08:32+0200 [Controller 14227] Node worker ended, and trigger
'shutdown_on_worker_exit' active

2017-02-28T22:08:32+0200 [Controller 14227] Node is already shutting down.

Initially I was running my components inside the router and figured I'd get
around this by running them in a container but that doesn't seem to have
worked. Any ideas?

0 Likes

#2

Adam, you can definitely run pure asyncio outside of crossbar. This is how I do all of my projects. The only component I run within crossbar is a very short and simple dynamic authenticator. You can run in a pure py3 setup regardless of twisted/asyncio choice. Here’s a stale project that I’ve been refreshing and put up on GH yesterday. https://github.com/Blue-Labs/misty it’s all py3, got a dynamic authenticator component running under crossbar, and a side provider.py that is pure asyncio. As a bonus, it runs threads and the WAMP code runs in its own thread, not as the main process.

···

On Tue, Feb 28, 2017 at 3:17 PM Tobias Oberstein tobias.o...@gmail.com wrote:

Hi,

Crossbar.io fully supports Python 3 as a platform, and for app

components in router and container workers, but Twisted only.

For asyncio based components, you can use guest workers with any Python

  • including the one where Crossbar.io might be installed - if it is a

Python 3.

Cheers,

/Tobias

Am 28.02.2017 um 21:11 schrieb Adam Jorgensen:

Hi guys, quick question, what is the status of the Python 3 support in

Crossbar 17.2.1?

I asked because I started a new Crossbar project using Python 3 as the

base. Crossbar runs fine under Python 3 but my components written using

asyncio fail with output as follows:

adamj@Harvester-LINUX  ~/Development/OpenDNA/ethel-crossbar   master 

venv/bin/crossbar start

2017-02-28T22:08:31+0200 [Controller 14227] __ __ __ __ __ __


2017-02-28T22:08:31+0200 [Controller 14227] / |__)/ \/__/`|)

/\ |__) |/ \

2017-02-28T22:08:31+0200 [Controller 14227] __,|

\/././|)/~~| . |__/

2017-02-28T22:08:31+0200 [Controller 14227]

2017-02-28T22:08:31+0200 [Controller 14227] Version: Crossbar.io

COMMUNITY 17.2.1

2017-02-28T22:08:31+0200 [Controller 14227] Public Key:

4f6cd89aae30ab9ee0f28b5f3e3aa9f8bb32b3227d35718a0c42714cf7550c3f

2017-02-28T22:08:31+0200 [Controller 14227]

2017-02-28T22:08:31+0200 [Controller 14227] Node created with personality

“community” [crossbar.controller.node.Node]

2017-02-28T22:08:31+0200 [Controller 14227] Running from node directory

“/home/adamj/Development/OpenDNA/ethel-crossbar/.crossbar”

2017-02-28T22:08:31+0200 [Controller 14227] Node configuration loaded from

“/home/adamj/Development/OpenDNA/ethel-crossbar/.crossbar/config.yaml”

2017-02-28T22:08:31+0200 [Controller 14227] Controller process starting

(CPython-EPollReactor) …

2017-02-28T22:08:31+0200 [Controller 14227] No extra node router roles

2017-02-28T22:08:31+0200 [Controller 14227] Router service session

attached [crossbar.router.service.RouterServiceSession]

2017-02-28T22:08:31+0200 [Controller 14227] Joined realm ‘crossbar’ on

node management router

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API

procedure “crossbar.get_info”

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API

procedure “crossbar.shutdown”

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API

procedure “crossbar.get_workers”

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API

procedure “crossbar.get_worker”

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API

procedure “crossbar.get_worker_log”

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API

procedure “crossbar.start_router”

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API

procedure “crossbar.stop_router”

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API

procedure “crossbar.start_container”

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API

procedure “crossbar.stop_container”

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API

procedure “crossbar.start_guest”

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API

procedure “crossbar.stop_guest”

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API

procedure “crossbar.start_websocket_testee”

2017-02-28T22:08:31+0200 [Controller 14227] Registering management API

procedure “crossbar.stop_websocket_testee”

2017-02-28T22:08:31+0200 [Controller 14227] Node controller attached

[crossbar.controller.process.NodeControllerSession]

2017-02-28T22:08:31+0200 [Controller 14227] Using default node shutdown

triggers [‘shutdown_on_worker_exit’]

2017-02-28T22:08:31+0200 [Controller 14227] Configuring node from local

configuration …

2017-02-28T22:08:31+0200 [Controller 14227] Starting 2 workers …

2017-02-28T22:08:31+0200 [Controller 14227] Starting Router with ID

‘worker-001’…

2017-02-28T22:08:31+0200 [Router 14232] Worker process starting

(CPython-EPollReactor) …

2017-02-28T22:08:31+0200 [Router 14232] RouterWorkerSession:

SessionDetails(realm=, session=5792398432447254,

authid=<crossbar.process.14232>, authrole=<crossbar.worker.worker-001>,

authmethod=trusted, authprovider=programcode, authextra=None, re

sumed=None, resumable=None, resume_token=None)

2017-02-28T22:08:31+0200 [Controller 14227] Router with ID ‘worker-001’

and PID 14232 started

2017-02-28T22:08:31+0200 [Router 14232] Realm ‘ai.opendna.ethel’

started

2017-02-28T22:08:31+0200 [Controller 14227] Router ‘worker-001’: realm

‘realm-001’ (named ‘ai.opendna.ethel’) started

2017-02-28T22:08:31+0200 [Router 14232] role role-001 on realm

realm-001 started

2017-02-28T22:08:31+0200 [Controller 14227] Router ‘worker-001’: role

‘role-001’ (named ‘user’) started on realm ‘realm-001’

2017-02-28T22:08:31+0200 [Router 14232] role role-002 on realm

realm-001 started

2017-02-28T22:08:31+0200 [Controller 14227] Router ‘worker-001’: role

‘role-002’ (named ‘system’) started on realm ‘realm-001’

2017-02-28T22:08:31+0200 [Router 14232] WampWebSocketServerFactory

starting on 8080

2017-02-28T22:08:31+0200 [Controller 14227] Router ‘worker-001’: transport

‘transport-001’ started

2017-02-28T22:08:31+0200 [Router 14232] WampRawSocketServerFactory

starting on ‘/tmp/ethel’

2017-02-28T22:08:31+0200 [Controller 14227] Router ‘worker-001’: transport

‘transport-002’ started

2017-02-28T22:08:31+0200 [Controller 14227] Starting Container with ID

‘worker-002’…

2017-02-28T22:08:31+0200 [Container 14237] Worker process starting

(CPython-EPollReactor) …

2017-02-28T22:08:32+0200 [Container 14237] ContainerWorkerSession:

SessionDetails(realm=, session=5534053852863604,

authid=<crossbar.process.14237>, authrole=<crossbar.worker.worker-002>,

authmethod=trusted, authprovider=programcode, authextra=None,

resumed=None, resumable=None, resume_token=None)

2017-02-28T22:08:32+0200 [Controller 14227] Container with ID ‘worker-002’

and PID 14237 started

2017-02-28T22:08:32+0200 [Container 14237] Component loading failed

Traceback (most recent call last):

File

“/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/autobahn/wamp/websocket.py”,

line 95, in onMessage

self._session.onMessage(msg)

File

“/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/autobahn/wamp/protocol.py”,

line 871, in onMessage

on_reply = txaio.as_future(endpoint.fn, *invoke_args, **invoke_kwargs)

File

“/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/txaio/tx.py”,

line 408, in as_future

return maybeDeferred(fun, *args, **kwargs)

File

“/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/twisted/internet/defer.py”,

line 150, in maybeDeferred

result = f(*args, **kw)

— —

File

“/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/crossbar/worker/container.py”,

line 206, in start_container_component

create_component = _appsession_loader(config)

File

“/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/crossbar/worker/init.py”,

line 74, in _appsession_loader

pythonpath=sys.path

autobahn.wamp.exception.ApplicationError:

ApplicationError(error=<crossbar.error.class_import_failed>, args=['Failed

to import class

‘ethel.authentication.odna_sso.ODNASSOTokenAuthentication’\nTraceback

(most recent call last):\n File "/home/adamj/Developmen

t/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/autobahn/wamp/protocol.py",

line 871, in onMessage\n on_reply = txaio.as_future(endpoint.fn,

*invoke_args, **invoke_kwargs)\n File

"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/s

ite-packages/txaio/tx.py", line 408, in as_future\n return

maybeDeferred(fun, *args, **kwargs)\n File

“/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/twisted/internet/defer.py”,

line 150, in maybeDeferred\n result = f(*ar

gs, **kw)\n File

“/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/crossbar/worker/container.py”,

line 206, in start_container_component\n create_component =

_appsession_loader(config)\n— —\n File

“/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/crossbar/worker/init.py”,

line 58, in _appsession_loader\n module =

importlib.import_module(module_name)\n File

"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/pyt

hon3.5/importlib/init.py", line 126, in import_module\n return

_bootstrap._gcd_import(name[level:], package, level)\n File "<frozen

importlib._bootstrap>", line 986, in _gcd_import\n \n File "<frozen

importlib._bootstrap>", line 969, in _find_and_lo

ad\n \n File “”, line 958, in

_find_and_load_unlocked\n \n File “”, line

673, in _load_unlocked\n \n File "<frozen

importlib._bootstrap_external>", line 673, in exec_module\n \n File "<fr

ozen importlib._bootstrap>", line 222, in _call_with_frames_removed\n \n

File

“/home/adamj/Development/OpenDNA/ethel-crossbar-components/ethel/authentication/odna_sso.py”,

line 9, in \n from ethel.common import ETHELSession, settings\n

File "/ho

me/adamj/Development/OpenDNA/ethel-crossbar-components/ethel/common/init.py",

line 2, in \n from autobahn.asyncio import ApplicationSession\n

File

"/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/autobahn/asyncio/

init.py", line 36, in \n from autobahn.asyncio.websocket

import \\n File

“/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/autobahn/asyncio/websocket.py”,

line 32, in \n txaio.use_asyncio()\n File "/ho

me/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/txaio/init.py",

line 119, in use_asyncio\n raise RuntimeError("Explicitly using ‘{}’

already".format(_explicit_framework))\nbuiltins.RuntimeError: Explicitly

using ‘twisted’

already\n’], kwargs={‘pythonpath’:

[’/home/adamj/Development/OpenDNA/ethel-crossbar’, ‘’,

‘/home/adamj/Development/OpenDNA/ethel-crossbar/venv/bin’,

‘/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python35.zip’,

'/home/adamj/Development/OpenDNA/ethel-

crossbar/venv/lib/python3.5’,

‘/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/plat-x86_64-linux-gnu’,

‘/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/lib-dynload’,

‘/usr/lib/python3.5’, '/usr/lib/python3.5/plat-x86_64-linux

-gnu’,

‘/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages’,

‘/home/adamj/Development/OpenDNA/ethel-crossbar-components’]},

enc_algo=None)

2017-02-28T22:08:32+0200 [Controller 14227]

crossbar.error.class_import_failed: Failed to import class

‘ethel.authentication.odna_sso.ODNASSOTokenAuthentication’

Traceback (most recent call last):

File

“/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/autobahn/wamp/protocol.py”,

line 871, in onMessage

on_reply = txaio.as_future(endpoint.fn, *invoke_args, **invoke_kwargs)

File

“/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/txaio/tx.py”,

line 408, in as_future

return maybeDeferred(fun, *args, **kwargs)

File

“/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/twisted/internet/defer.py”,

line 150, in maybeDeferred

result = f(*args, **kw)

File

“/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/crossbar/worker/container.py”,

line 206, in start_container_component

create_component = _appsession_loader(config)

— —

File

“/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/crossbar/worker/init.py”,

line 58, in _appsession_loader

module = importlib.import_module(module_name)

File

“/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/importlib/init.py”,

line 126, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File “”, line 986, in _gcd_import

File “”, line 969, in _find_and_load

File “”, line 958, in _find_and_load_unlocked

File “”, line 673, in _load_unlocked

File “”, line 673, in exec_module

File “”, line 222, in

_call_with_frames_removed

File

“/home/adamj/Development/OpenDNA/ethel-crossbar-components/ethel/authentication/odna_sso.py”,

line 9, in

from ethel.common import ETHELSession, settings

File

“/home/adamj/Development/OpenDNA/ethel-crossbar-components/ethel/common/init.py”,

line 2, in

from autobahn.asyncio import ApplicationSession

File

“/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/autobahn/asyncio/init.py”,

line 36, in

from autobahn.asyncio.websocket import \

File

“/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/autobahn/asyncio/websocket.py”,

line 32, in

txaio.use_asyncio()

File

“/home/adamj/Development/OpenDNA/ethel-crossbar/venv/lib/python3.5/site-packages/txaio/init.py”,

line 119, in use_asyncio

raise RuntimeError("Explicitly using '{}'

already".format(_explicit_framework))

builtins.RuntimeError: Explicitly using ‘twisted’ already

2017-02-28T22:08:32+0200 [Controller 14227] sending TERM to subprocess

14232

2017-02-28T22:08:32+0200 [Controller 14227] waiting for 14232 to exit…

2017-02-28T22:08:32+0200 [Controller 14227] sending TERM to subprocess

14237

2017-02-28T22:08:32+0200 [Controller 14227] waiting for 14237 to exit…

2017-02-28T22:08:32+0200 [Router 14232] Native worker received SIGTERM

  • shutting down …

2017-02-28T22:08:32+0200 [Router 14232] Shutdown of worker requested!

2017-02-28T22:08:32+0200 [Container 14237] Native worker received SIGTERM

  • shutting down …

2017-02-28T22:08:32+0200 [Container 14237] Shutdown of worker requested!

2017-02-28T22:08:32+0200 [Container 14237] Connection to node controller

closed cleanly

2017-02-28T22:08:32+0200 [Router 14232] Connection to node controller

closed cleanly

2017-02-28T22:08:32+0200 [Router 14232] (TCP Port 8080 Closed)

2017-02-28T22:08:32+0200 [Router 14232] (UNIX Port /tmp/ethel Closed)

2017-02-28T22:08:32+0200 [Controller 14227] Native worker connection

closed cleanly.

2017-02-28T22:08:32+0200 [Controller 14227] Node worker worker-002 ended

successfully

2017-02-28T22:08:32+0200 [Controller 14227] Node worker ended, and trigger

‘shutdown_on_worker_exit’ active

2017-02-28T22:08:32+0200 [Controller 14227] Node shutting down …

2017-02-28T22:08:32+0200 [Controller 14227] Shutting down node…

2017-02-28T22:08:32+0200 [Controller 14227] Native worker connection

closed cleanly.

2017-02-28T22:08:32+0200 [Controller 14227] Node worker worker-001 ended

successfully

2017-02-28T22:08:32+0200 [Controller 14227] Node worker ended, and trigger

‘shutdown_on_worker_exit’ active

2017-02-28T22:08:32+0200 [Controller 14227] Node is already shutting down.

Initially I was running my components inside the router and figured I’d get

around this by running them in a container but that doesn’t seem to have

worked. Any ideas?

You received this message because you are subscribed to the Google Groups “Crossbar” group.

To unsubscribe from this group and stop receiving emails from it, send an email to crossbario+...@googlegroups.com.

To post to this group, send email to cross...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/crossbario/ab2b512f-7975-23e1-4e57-069576798462%40gmail.com.

For more options, visit https://groups.google.com/d/optout.

0 Likes

#3

Thanks for the replies. I realised my issue was trying to run asyncio components with the router hence me deleting the original post.

0 Likes