urgent issue running example code in ticket authentication

#1

Hello,

I saw the issue with Failed to import class ‘authenticator.AuthenticatorSession’ when I run the crossbar using the example code.

Here is what I did:

  1. install the crossbar at my ubuntu machine and verified that it was working fine.

  2. git clone https://github.com/crossbario/crossbarexamples.git.

  3. under crossbarexamples/authentication/ticket/dynamic, run /opt/crossbar/bin/crossbar start

then I saw the following log. I feel it may be some python path issue. Could somebody let me know what is missing in my steps? Thanks.

log:

···

2016-01-29T15:05:33-0800 [Router 6349] Worker running under PyPy-EPollReactor

2016-01-29T15:05:34-0800 [Controller 6344] Router with ID ‘worker1’ and PID 6349 started

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: realm ‘realm1’ (named ‘realm1’) started

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role1’ (named ‘authenticator’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role2’ (named ‘backend’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role3’ (named ‘frontend’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Router 6349] Failed to import class ‘authenticator.AuthenticatorSession’

2016-01-29T15:05:34-0800 [Router 6349] Traceback (most recent call last):

2016-01-29T15:05:34-0800 [Router 6349] Failure: exceptions.ImportError: cannot import name ‘pprint_json’

2016-01-29T15:05:34-0800 [Controller 6344] Failed to import class ‘authenticator.AuthenticatorSession’

2016-01-29T15:05:34-0800 [Controller 6344] Traceback (most recent call last):

2016-01-29T15:05:34-0800 [Controller 6344] Failure: exceptions.ImportError: cannot import name ‘pprint_json’

2016-01-29T15:05:34-0800 [Controller 6344] sending TERM to subprocess 6349

2016-01-29T15:05:34-0800 [Controller 6344] waiting for 6349 to exit…

2016-01-29T15:05:34-0800 [Router 6349] Received SIGTERM, shutting down.

2016-01-29T15:05:34-0800 [Router 6349] Connection to node controller lost.

2016-01-29T15:05:34-0800 [Router 6349] No more controller connection; shutting down.

2016-01-29T15:05:34-0800 [Controller 6344] Process connection gone: A process has ended with a probable error condition: process ended with exit code 1.

2016-01-29T15:05:34-0800 [Controller 6344] Node worker worker1 ended (0 workers left)

0 Likes

#2

Hi,

What version of crossbar are you using ??

(“crossbar version” will tell you)

···

On Friday, 29 January 2016 23:12:54 UTC, Jun wrote:

Hello,

I saw the issue with Failed to import class ‘authenticator.AuthenticatorSession’ when I run the crossbar using the example code.

Here is what I did:

  1. install the crossbar at my ubuntu machine and verified that it was working fine.
  1. git clone https://github.com/crossbario/crossbarexamples.git.
  1. under crossbarexamples/authentication/ticket/dynamic, run /opt/crossbar/bin/crossbar start

then I saw the following log. I feel it may be some python path issue. Could somebody let me know what is missing in my steps? Thanks.

log:


2016-01-29T15:05:33-0800 [Router 6349] Worker running under PyPy-EPollReactor

2016-01-29T15:05:34-0800 [Controller 6344] Router with ID ‘worker1’ and PID 6349 started

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: realm ‘realm1’ (named ‘realm1’) started

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role1’ (named ‘authenticator’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role2’ (named ‘backend’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role3’ (named ‘frontend’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Router 6349] Failed to import class ‘authenticator.AuthenticatorSession’

2016-01-29T15:05:34-0800 [Router 6349] Traceback (most recent call last):

2016-01-29T15:05:34-0800 [Router 6349] Failure: exceptions.ImportError: cannot import name ‘pprint_json’

2016-01-29T15:05:34-0800 [Controller 6344] Failed to import class ‘authenticator.AuthenticatorSession’

2016-01-29T15:05:34-0800 [Controller 6344] Traceback (most recent call last):

2016-01-29T15:05:34-0800 [Controller 6344] Failure: exceptions.ImportError: cannot import name ‘pprint_json’

2016-01-29T15:05:34-0800 [Controller 6344] sending TERM to subprocess 6349

2016-01-29T15:05:34-0800 [Controller 6344] waiting for 6349 to exit…

2016-01-29T15:05:34-0800 [Router 6349] Received SIGTERM, shutting down.

2016-01-29T15:05:34-0800 [Router 6349] Connection to node controller lost.

2016-01-29T15:05:34-0800 [Router 6349] No more controller connection; shutting down.

2016-01-29T15:05:34-0800 [Controller 6344] Process connection gone: A process has ended with a probable error condition: process ended with exit code 1.

2016-01-29T15:05:34-0800 [Controller 6344] Node worker worker1 ended (0 workers left)

0 Likes

#3

Here is the crossbar version info:

Crossbar.io : 0.11.1

Autobahn : 0.10.9

 UTF8 Validator : **autobahn**

 XOR Masker     : **autobahn**

 JSON Codec     : **stdlib**

 MsgPack Codec  : **msgpack-python-0.4.6**

Twisted : 15.4.0-EPollReactor

Python : 2.7.10/PyPy-2.6.1

OS : Linux-3.13.0-66-generic-x86_64-with-debian-wheezy-sid

Machine : x86_64

···

On Friday, January 29, 2016 at 3:41:29 PM UTC-8, Gareth Bult wrote:

Hi,

What version of crossbar are you using ??

(“crossbar version” will tell you)

On Friday, 29 January 2016 23:12:54 UTC, Jun wrote:

Hello,

I saw the issue with Failed to import class ‘authenticator.AuthenticatorSession’ when I run the crossbar using the example code.

Here is what I did:

  1. install the crossbar at my ubuntu machine and verified that it was working fine.
  1. git clone https://github.com/crossbario/crossbarexamples.git.
  1. under crossbarexamples/authentication/ticket/dynamic, run /opt/crossbar/bin/crossbar start

then I saw the following log. I feel it may be some python path issue. Could somebody let me know what is missing in my steps? Thanks.

log:


2016-01-29T15:05:33-0800 [Router 6349] Worker running under PyPy-EPollReactor

2016-01-29T15:05:34-0800 [Controller 6344] Router with ID ‘worker1’ and PID 6349 started

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: realm ‘realm1’ (named ‘realm1’) started

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role1’ (named ‘authenticator’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role2’ (named ‘backend’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role3’ (named ‘frontend’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Router 6349] Failed to import class ‘authenticator.AuthenticatorSession’

2016-01-29T15:05:34-0800 [Router 6349] Traceback (most recent call last):

2016-01-29T15:05:34-0800 [Router 6349] Failure: exceptions.ImportError: cannot import name ‘pprint_json’

2016-01-29T15:05:34-0800 [Controller 6344] Failed to import class ‘authenticator.AuthenticatorSession’

2016-01-29T15:05:34-0800 [Controller 6344] Traceback (most recent call last):

2016-01-29T15:05:34-0800 [Controller 6344] Failure: exceptions.ImportError: cannot import name ‘pprint_json’

2016-01-29T15:05:34-0800 [Controller 6344] sending TERM to subprocess 6349

2016-01-29T15:05:34-0800 [Controller 6344] waiting for 6349 to exit…

2016-01-29T15:05:34-0800 [Router 6349] Received SIGTERM, shutting down.

2016-01-29T15:05:34-0800 [Router 6349] Connection to node controller lost.

2016-01-29T15:05:34-0800 [Router 6349] No more controller connection; shutting down.

2016-01-29T15:05:34-0800 [Controller 6344] Process connection gone: A process has ended with a probable error condition: process ended with exit code 1.

2016-01-29T15:05:34-0800 [Controller 6344] Node worker worker1 ended (0 workers left)

0 Likes

#4

Ok, pprint_json isn’t available in that version so far as I can see (I use the same) … so I guess the example is designed to use a newer version of crossbar … (?!)

You could try “pip install crossbar” and see if 0.11.2 works for you … it does look like that function is in the 11.2 source tree …

···

On Friday, 29 January 2016 23:54:57 UTC, Jun wrote:

Here is the crossbar version info:

Crossbar.io : 0.11.1

Autobahn : 0.10.9

 UTF8 Validator : **autobahn**
 XOR Masker     : **autobahn**
 JSON Codec     : **stdlib**
 MsgPack Codec  : **msgpack-python-0.4.6**

Twisted : 15.4.0-EPollReactor

Python : 2.7.10/PyPy-2.6.1

OS : Linux-3.13.0-66-generic-x86_64-with-debian-wheezy-sid

Machine : x86_64

On Friday, January 29, 2016 at 3:41:29 PM UTC-8, Gareth Bult wrote:

Hi,

What version of crossbar are you using ??

(“crossbar version” will tell you)

On Friday, 29 January 2016 23:12:54 UTC, Jun wrote:

Hello,

I saw the issue with Failed to import class ‘authenticator.AuthenticatorSession’ when I run the crossbar using the example code.

Here is what I did:

  1. install the crossbar at my ubuntu machine and verified that it was working fine.
  1. git clone https://github.com/crossbario/crossbarexamples.git.
  1. under crossbarexamples/authentication/ticket/dynamic, run /opt/crossbar/bin/crossbar start

then I saw the following log. I feel it may be some python path issue. Could somebody let me know what is missing in my steps? Thanks.

log:


2016-01-29T15:05:33-0800 [Router 6349] Worker running under PyPy-EPollReactor

2016-01-29T15:05:34-0800 [Controller 6344] Router with ID ‘worker1’ and PID 6349 started

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: realm ‘realm1’ (named ‘realm1’) started

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role1’ (named ‘authenticator’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role2’ (named ‘backend’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role3’ (named ‘frontend’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Router 6349] Failed to import class ‘authenticator.AuthenticatorSession’

2016-01-29T15:05:34-0800 [Router 6349] Traceback (most recent call last):

2016-01-29T15:05:34-0800 [Router 6349] Failure: exceptions.ImportError: cannot import name ‘pprint_json’

2016-01-29T15:05:34-0800 [Controller 6344] Failed to import class ‘authenticator.AuthenticatorSession’

2016-01-29T15:05:34-0800 [Controller 6344] Traceback (most recent call last):

2016-01-29T15:05:34-0800 [Controller 6344] Failure: exceptions.ImportError: cannot import name ‘pprint_json’

2016-01-29T15:05:34-0800 [Controller 6344] sending TERM to subprocess 6349

2016-01-29T15:05:34-0800 [Controller 6344] waiting for 6349 to exit…

2016-01-29T15:05:34-0800 [Router 6349] Received SIGTERM, shutting down.

2016-01-29T15:05:34-0800 [Router 6349] Connection to node controller lost.

2016-01-29T15:05:34-0800 [Router 6349] No more controller connection; shutting down.

2016-01-29T15:05:34-0800 [Controller 6344] Process connection gone: A process has ended with a probable error condition: process ended with exit code 1.

2016-01-29T15:05:34-0800 [Controller 6344] Node worker worker1 ended (0 workers left)

0 Likes

#5

Actually, my pip install crossbar failed. Any thoughts on the errors?

···

On Fri, Jan 29, 2016 at 4:03 PM, Gareth Bult garet...@gmail.com wrote:

Ok, pprint_json isn’t available in that version so far as I can see (I use the same) … so I guess the example is designed to use a newer version of crossbar … (?!)

You could try “pip install crossbar” and see if 0.11.2 works for you … it does look like that function is in the 11.2 source tree …

On Friday, 29 January 2016 23:54:57 UTC, Jun wrote:

Here is the crossbar version info:

Crossbar.io : 0.11.1

Autobahn : 0.10.9

 UTF8 Validator : **autobahn**
 XOR Masker     : **autobahn**
 JSON Codec     : **stdlib**
 MsgPack Codec  : **msgpack-python-0.4.6**

Twisted : 15.4.0-EPollReactor

Python : 2.7.10/PyPy-2.6.1

OS : Linux-3.13.0-66-generic-x86_64-with-debian-wheezy-sid

Machine : x86_64

On Friday, January 29, 2016 at 3:41:29 PM UTC-8, Gareth Bult wrote:

Hi,

What version of crossbar are you using ??

(“crossbar version” will tell you)

On Friday, 29 January 2016 23:12:54 UTC, Jun wrote:

Hello,

I saw the issue with Failed to import class ‘authenticator.AuthenticatorSession’ when I run the crossbar using the example code.

Here is what I did:

  1. install the crossbar at my ubuntu machine and verified that it was working fine.
  1. git clone https://github.com/crossbario/crossbarexamples.git.
  1. under crossbarexamples/authentication/ticket/dynamic, run /opt/crossbar/bin/crossbar start

then I saw the following log. I feel it may be some python path issue. Could somebody let me know what is missing in my steps? Thanks.

log:


2016-01-29T15:05:33-0800 [Router 6349] Worker running under PyPy-EPollReactor

2016-01-29T15:05:34-0800 [Controller 6344] Router with ID ‘worker1’ and PID 6349 started

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: realm ‘realm1’ (named ‘realm1’) started

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role1’ (named ‘authenticator’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role2’ (named ‘backend’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role3’ (named ‘frontend’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Router 6349] Failed to import class ‘authenticator.AuthenticatorSession’

2016-01-29T15:05:34-0800 [Router 6349] Traceback (most recent call last):

2016-01-29T15:05:34-0800 [Router 6349] Failure: exceptions.ImportError: cannot import name ‘pprint_json’

2016-01-29T15:05:34-0800 [Controller 6344] Failed to import class ‘authenticator.AuthenticatorSession’

2016-01-29T15:05:34-0800 [Controller 6344] Traceback (most recent call last):

2016-01-29T15:05:34-0800 [Controller 6344] Failure: exceptions.ImportError: cannot import name ‘pprint_json’

2016-01-29T15:05:34-0800 [Controller 6344] sending TERM to subprocess 6349

2016-01-29T15:05:34-0800 [Controller 6344] waiting for 6349 to exit…

2016-01-29T15:05:34-0800 [Router 6349] Received SIGTERM, shutting down.

2016-01-29T15:05:34-0800 [Router 6349] Connection to node controller lost.

2016-01-29T15:05:34-0800 [Router 6349] No more controller connection; shutting down.

2016-01-29T15:05:34-0800 [Controller 6344] Process connection gone: A process has ended with a probable error condition: process ended with exit code 1.

2016-01-29T15:05:34-0800 [Controller 6344] Node worker worker1 ended (0 workers left)

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

To unsubscribe from this topic, visit https://groups.google.com/d/topic/crossbario/XGdgbol9DNU/unsubscribe.

To unsubscribe from this group and all its topics, 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/f573ec7a-2869-4965-9b2c-d9a5523a6be3%40googlegroups.com.

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

0 Likes

#6

I installed the 0.11.2 crossbar and still have the same problem but with more detailed error msg as below:

Can somebody help?

(python-venv)juzou@my-cpod:~/crossbarexamples/authentication/ticket/dynamic$ crossbar start

2016-01-29T16:32:39-0800 [Controller 9838] Automatically choosing optimal Twisted reactor

2016-01-29T16:32:39-0800 [Controller 9838] Running on Linux and optimal reactor (epoll) was installed.

2016-01-29T16:32:39-0800 [Controller 9838] __ __ __ __ __ __ __ __

2016-01-29T16:32:39-0800 [Controller 9838] */ |__)/ \/__/`|) /\ |__) |/ *

2016-01-29T16:32:39-0800 [Controller 9838] _,| \/././|)/~~| . |_/

2016-01-29T16:32:39-0800 [Controller 9838] ****

2016-01-29T16:32:39-0800 [Controller 9838] Version: 0.11.2

2016-01-29T16:32:39-0800 [Controller 9838]

2016-01-29T16:32:39-0800 [Controller 9838] Starting from node directory /home/juzou/crossbarexamples/authentication/ticket/dynamic/.crossbar

2016-01-29T16:32:39-0800 [Controller 9838] Loading node configuration file ‘/home/juzou/crossbarexamples/authentication/ticket/dynamic/.crossbar/config.json’

2016-01-29T16:32:39-0800 [Controller 9838] Entering reactor event loop…

2016-01-29T16:32:39-0800 [Controller 9838] Warning, could not set process title (setproctitle not installed)

2016-01-29T16:32:39-0800 [Controller 9838] Process utilities not available

2016-01-29T16:32:39-0800 [Controller 9838] Joined realm ‘crossbar’ on node management router

2016-01-29T16:32:39-0800 [Controller 9838] No WAMPlets detected in enviroment.

2016-01-29T16:32:39-0800 [Controller 9838] Starting Router with ID ‘worker1’…

2016-01-29T16:32:39-0800 [Router 9845] Worker running under CPython-EPollReactor

2016-01-29T16:32:39-0800 [Router 9845] Process utilities not available

2016-01-29T16:32:39-0800 [Controller 9838] Router with ID ‘worker1’ and PID 9845 started

2016-01-29T16:32:39-0800 [Controller 9838] Router ‘worker1’: realm ‘realm1’ (named ‘realm1’) started

2016-01-29T16:32:39-0800 [Controller 9838] Router ‘worker1’: role ‘role1’ (named ‘authenticator’) started on realm ‘realm1’

2016-01-29T16:32:39-0800 [Controller 9838] Router ‘worker1’: role ‘role2’ (named ‘backend’) started on realm ‘realm1’

2016-01-29T16:32:39-0800 [Controller 9838] Router ‘worker1’: role ‘role3’ (named ‘frontend’) started on realm ‘realm1’

2016-01-29T16:32:39-0800 [Router 9845] NativeWorkerSession.onUserError

Traceback (most recent call last):

File “/home/juzou/python-venv/local/lib/python2.7/site-packages/autobahn/twisted/websocket.py”, line 163, in _onMessage

self.onMessage(payload, isBinary)

File “/home/juzou/python-venv/local/lib/python2.7/site-packages/autobahn/wamp/websocket.py”, line 95, in onMessage

self._session.onMessage(msg)

File “/home/juzou/python-venv/local/lib/python2.7/site-packages/autobahn/wamp/protocol.py”, line 590, in onMessage

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

File “/home/juzou/python-venv/local/lib/python2.7/site-packages/txaio/tx.py”, line 339, in as_future

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

— —

File “/home/juzou/python-venv/local/lib/python2.7/site-packages/twisted/internet/defer.py”, line 150, in maybeDeferred

result = f(*args, **kw)

File “/home/juzou/python-venv/local/lib/python2.7/site-packages/crossbar/worker/router.py”, line 472, in start_router_component

create_component = _appsession_loader(config)

File “/home/juzou/python-venv/local/lib/python2.7/site-packages/crossbar/worker/init.py”, line 74, in _appsession_loader

pythonpath=sys.path

autobahn.wamp.exception.ApplicationError: ApplicationError(‘crossbar.error.class_import_failed’, args = (“Failed to import class ‘authenticator.AuthenticatorSession’\nTraceback (most recent call last):\nFailure: exceptions.ImportError: cannot import name pprint_json\n”,), kwargs = {‘pythonpath’: [u’/home/juzou/crossbarexamples/authentication/ticket/dynamic’, ‘/home/juzou/python-venv/lib/python2.7/site-packages/crossbar/worker’, ‘/home/juzou/python-venv/bin’, ‘/home/juzou/python-venv/lib/python2.7’, ‘/home/juzou/python-venv/lib/python2.7/plat-linux2’, ‘/home/juzou/python-venv/lib/python2.7/lib-tk’, ‘/home/juzou/python-venv/lib/python2.7/lib-old’, ‘/home/juzou/python-venv/lib/python2.7/lib-dynload’, ‘/usr/lib/python2.7’, ‘/usr/lib/python2.7/plat-linux2’, ‘/usr/lib/python2.7/lib-tk’, ‘/home/juzou/python-venv/local/lib/python2.7/site-packages’]})

2016-01-29T16:32:39-0800 [Controller 9838] crossbar.error.class_import_failed: Failed to import class ‘authenticator.AuthenticatorSession’

Traceback (most recent call last):

Failure: exceptions.ImportError: cannot import name pprint_json

2016-01-29T16:32:39-0800 [Controller 9838] sending TERM to subprocess 9845

2016-01-29T16:32:39-0800 [Controller 9838] waiting for 9845 to exit…

2016-01-29T16:32:39-0800 [Router 9845] Received SIGTERM, shutting down.

2016-01-29T16:32:39-0800 [Router 9845] Connection to node controller lost.

2016-01-29T16:32:39-0800 [Router 9845] No more controller connection; shutting down.

2016-01-29T16:32:39-0800 [Controller 9838] Process connection gone: A process has ended with a probable error condition: process ended with exit code 1.

2016-01-29T16:32:39-0800 [Controller 9838] Node worker worker1 ended (0 workers left)

2016-01-29T16:32:39-0800 [Controller 9838] Node shutting down …

2016-01-29T16:32:39-0800 [Controller 9838] Shutting down node…

(python-venv)juzou@my-cpod:~/crossbarexamples/authentication/ticket/dynamic$ pwd

/home/juzou/crossbarexamples/authentication/ticket/dynamic

···

On Fri, Jan 29, 2016 at 4:20 PM, Jun Zou junzo...@gmail.com wrote:

Actually, my pip install crossbar failed. Any thoughts on the errors?


Failed building wheel for cryptography


Failed building wheel for cffi

----------------------------------------

Command “/usr/bin/python -u -c “import setuptools, tokenize;file=’/tmp/pip-build-UYpWOw/cffi/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(’\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-gCxWKA-record/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /tmp/pip-build-UYpWOw/cffi

On Fri, Jan 29, 2016 at 4:03 PM, Gareth Bult garet...@gmail.com wrote:

Ok, pprint_json isn’t available in that version so far as I can see (I use the same) … so I guess the example is designed to use a newer version of crossbar … (?!)

You could try “pip install crossbar” and see if 0.11.2 works for you … it does look like that function is in the 11.2 source tree …

On Friday, 29 January 2016 23:54:57 UTC, Jun wrote:

Here is the crossbar version info:

Crossbar.io : 0.11.1

Autobahn : 0.10.9

 UTF8 Validator : **autobahn**
 XOR Masker     : **autobahn**
 JSON Codec     : **stdlib**
 MsgPack Codec  : **msgpack-python-0.4.6**

Twisted : 15.4.0-EPollReactor

Python : 2.7.10/PyPy-2.6.1

OS : Linux-3.13.0-66-generic-x86_64-with-debian-wheezy-sid

Machine : x86_64

On Friday, January 29, 2016 at 3:41:29 PM UTC-8, Gareth Bult wrote:

Hi,

What version of crossbar are you using ??

(“crossbar version” will tell you)

On Friday, 29 January 2016 23:12:54 UTC, Jun wrote:

Hello,

I saw the issue with Failed to import class ‘authenticator.AuthenticatorSession’ when I run the crossbar using the example code.

Here is what I did:

  1. install the crossbar at my ubuntu machine and verified that it was working fine.
  1. git clone https://github.com/crossbario/crossbarexamples.git.
  1. under crossbarexamples/authentication/ticket/dynamic, run /opt/crossbar/bin/crossbar start

then I saw the following log. I feel it may be some python path issue. Could somebody let me know what is missing in my steps? Thanks.

log:


2016-01-29T15:05:33-0800 [Router 6349] Worker running under PyPy-EPollReactor

2016-01-29T15:05:34-0800 [Controller 6344] Router with ID ‘worker1’ and PID 6349 started

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: realm ‘realm1’ (named ‘realm1’) started

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role1’ (named ‘authenticator’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role2’ (named ‘backend’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role3’ (named ‘frontend’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Router 6349] Failed to import class ‘authenticator.AuthenticatorSession’

2016-01-29T15:05:34-0800 [Router 6349] Traceback (most recent call last):

2016-01-29T15:05:34-0800 [Router 6349] Failure: exceptions.ImportError: cannot import name ‘pprint_json’

2016-01-29T15:05:34-0800 [Controller 6344] Failed to import class ‘authenticator.AuthenticatorSession’

2016-01-29T15:05:34-0800 [Controller 6344] Traceback (most recent call last):

2016-01-29T15:05:34-0800 [Controller 6344] Failure: exceptions.ImportError: cannot import name ‘pprint_json’

2016-01-29T15:05:34-0800 [Controller 6344] sending TERM to subprocess 6349

2016-01-29T15:05:34-0800 [Controller 6344] waiting for 6349 to exit…

2016-01-29T15:05:34-0800 [Router 6349] Received SIGTERM, shutting down.

2016-01-29T15:05:34-0800 [Router 6349] Connection to node controller lost.

2016-01-29T15:05:34-0800 [Router 6349] No more controller connection; shutting down.

2016-01-29T15:05:34-0800 [Controller 6344] Process connection gone: A process has ended with a probable error condition: process ended with exit code 1.

2016-01-29T15:05:34-0800 [Controller 6344] Node worker worker1 ended (0 workers left)

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

To unsubscribe from this topic, visit https://groups.google.com/d/topic/crossbario/XGdgbol9DNU/unsubscribe.

To unsubscribe from this group and all its topics, 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/f573ec7a-2869-4965-9b2c-d9a5523a6be3%40googlegroups.com.

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

0 Likes

#7

Hi,

I would be inclined to paste in the source for pprint_json directly into the example, I think it’s only for pretty output so it’s not “key” …

···

On Friday, 29 January 2016 23:12:54 UTC, Jun wrote:

Hello,

I saw the issue with Failed to import class ‘authenticator.AuthenticatorSession’ when I run the crossbar using the example code.

Here is what I did:

  1. install the crossbar at my ubuntu machine and verified that it was working fine.
  1. git clone https://github.com/crossbario/crossbarexamples.git.
  1. under crossbarexamples/authentication/ticket/dynamic, run /opt/crossbar/bin/crossbar start

then I saw the following log. I feel it may be some python path issue. Could somebody let me know what is missing in my steps? Thanks.

log:


2016-01-29T15:05:33-0800 [Router 6349] Worker running under PyPy-EPollReactor

2016-01-29T15:05:34-0800 [Controller 6344] Router with ID ‘worker1’ and PID 6349 started

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: realm ‘realm1’ (named ‘realm1’) started

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role1’ (named ‘authenticator’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role2’ (named ‘backend’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Controller 6344] Router ‘worker1’: role ‘role3’ (named ‘frontend’) started on realm ‘realm1’

2016-01-29T15:05:34-0800 [Router 6349] Failed to import class ‘authenticator.AuthenticatorSession’

2016-01-29T15:05:34-0800 [Router 6349] Traceback (most recent call last):

2016-01-29T15:05:34-0800 [Router 6349] Failure: exceptions.ImportError: cannot import name ‘pprint_json’

2016-01-29T15:05:34-0800 [Controller 6344] Failed to import class ‘authenticator.AuthenticatorSession’

2016-01-29T15:05:34-0800 [Controller 6344] Traceback (most recent call last):

2016-01-29T15:05:34-0800 [Controller 6344] Failure: exceptions.ImportError: cannot import name ‘pprint_json’

2016-01-29T15:05:34-0800 [Controller 6344] sending TERM to subprocess 6349

2016-01-29T15:05:34-0800 [Controller 6344] waiting for 6349 to exit…

2016-01-29T15:05:34-0800 [Router 6349] Received SIGTERM, shutting down.

2016-01-29T15:05:34-0800 [Router 6349] Connection to node controller lost.

2016-01-29T15:05:34-0800 [Router 6349] No more controller connection; shutting down.

2016-01-29T15:05:34-0800 [Controller 6344] Process connection gone: A process has ended with a probable error condition: process ended with exit code 1.

2016-01-29T15:05:34-0800 [Controller 6344] Node worker worker1 ended (0 workers left)

0 Likes

#8

Hi,

I've removed the offending code

https://github.com/crossbario/crossbarexamples/commit/1b08ae92473e9e68a5b22523cea56bbac58574cc

Note: for some examples in "crossbarexamples/authentication/*", you will need Crossbar.io trunk. Clone from GH and install from that. Or wait for crossbar 0.12, which will be release the coming days.

Cheers,
/Tobias

···

Am 30.01.2016 um 00:12 schrieb Jun:

Hello,

I saw the issue with Failed to import class
'authenticator.AuthenticatorSession' when I run the crossbar using the
example code.

Here is what I did:
1. install the crossbar at my ubuntu machine and verified that it was
working fine.
2. git clone https://github.com/crossbario/crossbarexamples.git.
3. under crossbarexamples/authentication/ticket/dynamic, run
/opt/crossbar/bin/crossbar start

then I saw the following log. I feel it may be some python path issue.
Could somebody let me know what is missing in my steps? Thanks.

log:
----

2016-01-29T15:05:33-0800 [Router 6349] Worker running under
PyPy-EPollReactor

2016-01-29T15:05:34-0800 [Controller 6344] Router with ID 'worker1'
and PID 6349 started

2016-01-29T15:05:34-0800 [Controller 6344] Router 'worker1': realm
'realm1' (named 'realm1') started

2016-01-29T15:05:34-0800 [Controller 6344] Router 'worker1': role
'role1' (named 'authenticator') started on realm 'realm1'

2016-01-29T15:05:34-0800 [Controller 6344] Router 'worker1': role
'role2' (named 'backend') started on realm 'realm1'

2016-01-29T15:05:34-0800 [Controller 6344] Router 'worker1': role
'role3' (named 'frontend') started on realm 'realm1'

2016-01-29T15:05:34-0800 [Router 6349] Failed to import class
'authenticator.AuthenticatorSession'

2016-01-29T15:05:34-0800 [Router 6349] Traceback (most recent call
last):

2016-01-29T15:05:34-0800 [Router 6349] Failure:
exceptions.ImportError: cannot import name 'pprint_json'

2016-01-29T15:05:34-0800 [Controller 6344] Failed to import class
'authenticator.AuthenticatorSession'

2016-01-29T15:05:34-0800 [Controller 6344] Traceback (most recent call
last):

2016-01-29T15:05:34-0800 [Controller 6344] Failure:
exceptions.ImportError: cannot import name 'pprint_json'

2016-01-29T15:05:34-0800 [Controller 6344] sending TERM to subprocess 6349

2016-01-29T15:05:34-0800 [Controller 6344] waiting for 6349 to exit...

2016-01-29T15:05:34-0800 [Router 6349] Received SIGTERM, shutting
down.

2016-01-29T15:05:34-0800 [Router 6349] Connection to node
controller lost.

2016-01-29T15:05:34-0800 [Router 6349] No more controller
connection; shutting down.

2016-01-29T15:05:34-0800 [Controller 6344] Process connection gone: A
process has ended with a probable error condition: process ended with
exit code 1.

2016-01-29T15:05:34-0800 [Controller 6344] Node worker worker1 ended
(0 workers left)

--
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
<mailto:crossbario+...@googlegroups.com>.
To post to this group, send email to cross...@googlegroups.com
<mailto:cross...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/crossbario/74e96593-c372-4a32-bf8a-dcba2b14e96c%40googlegroups.com
<https://groups.google.com/d/msgid/crossbario/74e96593-c372-4a32-bf8a-dcba2b14e96c%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

0 Likes