'crossbar start' hangs? (v0.9.2)

162 views
Skip to first unread message

Roger Erens

unread,
Apr 9, 2014, 9:06:13 AM4/9/14
to autob...@googlegroups.com
Hi folks,

I am trying to get crossbar.io running on Mac OSX.
I used a virtualenv based on a pypy JIT and got this:

(my-pypy-env)Rogers-Mac-mini:test1 roger$ crossbar version

Crossbar.io software versions:

Crossbar.io     : 0.9.2
Autobahn        : 0.8.7
Twisted         : 13.2.0-KQueueReactor
Python          : 2.7.3
UTF8 Validator  : autobahn
XOR Masker      : autobahn

Then, following the First Steps wiki page, I did a crossbar init and tried to start crossbar. This is the logging in my terminal:

(my-pypy-env)Rogers-Mac-mini:test1 roger$ crossbar -d start
2014-04-09 13:24:59+0200 [Controller 28194] Log opened.
2014-04-09 13:24:59+0200 [Controller 28194] ============================== Crossbar.io ==============================

2014-04-09 13:24:59+0200 [Controller 28194] Crossbar.io 0.9.2 node starting
2014-04-09 13:24:59+0200 [Controller 28194] Automatically choosing optimal Twisted reactor
2014-04-09 13:25:01+0200 [Controller 28194] Running Twisted reactor twisted.internet.kqreactor.KQueueReactor
2014-04-09 13:25:01+0200 [Controller 28194] WampWebSocketServerFactory starting on 9000
2014-04-09 13:25:01+0200 [Controller 28194] Starting factory <autobahn.twisted.websocket.WampWebSocketServerFactory instance at 0x00000001057e7dc0>
2014-04-09 13:25:01+0200 [Controller 28194] Worker PID 28197 process connected
2014-04-09 13:25:01+0200 [Worker 28197] Log opened.
2014-04-09 13:25:01+0200 [Worker 28197] Starting from node directory /Users/roger/my-pypy-env/test1/.crossbar.
2014-04-09 13:25:03+0200 [Worker 28197] Running on KQueueReactor reactor.
2014-04-09 13:25:03+0200 [Worker 28197] Entering event loop ..
2014-04-09 13:25:03+0200 [Worker 28197] Connected to node router.
2014-04-09 13:25:03+0200 [Worker 28197] Procedures registered.

From the example log on the First Steps wiki page, I would expect the TimeService and TickService to get started.
The -d option seems not to give me extra output.

Any ideas on how to proceed?

Tobias Oberstein

unread,
Apr 11, 2014, 5:53:13 AM4/11/14
to autob...@googlegroups.com
> From the example log on the First Steps wiki page, I would expect the
> TimeService and TickService to get started.
> The -d option seems not to give me extra output.

Hi Roger,

the demo components have been moved to their own package. Sorry, this is
all still a bit in flux.

Could you try:

pip install crossbar
pip install crossbardemo

and then:

crossbar init --template demos
crossbar start

This should give you a log output like the one below. You can see 3 demo
components being loaded.

Cheers,
/Tobias


oberstet@TAVENDO-PC050 /c/Temp
$ crossbar init --template demos
Crossbar.io node initialized at c:\Temp\.crossbar

oberstet@TAVENDO-PC050 /c/Temp
$ crossbar start
2014-04-11 11:48:40+0200 [Controller 140] Log opened.
2014-04-11 11:48:40+0200 [Controller 140] ==============================
Crossbar.io ==============================

2014-04-11 11:48:40+0200 [Controller 140] Crossbar.io 0.9.2 node starting
2014-04-11 11:48:41+0200 [Controller 140] Warning, could not set process
title (setproctitle not installed)
2014-04-11 11:48:41+0200 [Controller 140] WampWebSocketServerFactory
starting on 9000
2014-04-11 11:48:41+0200 [Controller 140] Starting factory
<autobahn.twisted.websocket.WampWebSocketServerFactory instan
ce at 0x03345C10>
2014-04-11 11:48:41+0200 [Controller 140] Worker PID 3916 process connected
2014-04-11 11:48:42+0200 [Worker 3916] Log opened.
2014-04-11 11:48:42+0200 [Worker 3916] Warning, could not set process
title (setproctitle not installed)
2014-04-11 11:48:42+0200 [Worker 3916] Starting from node directory
c:\Temp\.crossbar.
2014-04-11 11:48:42+0200 [Worker 3916] Running on IOCPReactor reactor.
2014-04-11 11:48:42+0200 [Worker 3916] Entering event loop ..
2014-04-11 11:48:42+0200 [Worker 3916] Connected to node router.
2014-04-11 11:48:42+0200 [Worker 3916] Procedures registered.
2014-04-11 11:48:42+0200 [Controller 140] Worker 3916: CPU affinity is
[0, 1, 2, 3, 4, 5, 6, 7]
2014-04-11 11:48:46+0200 [Controller 140] Worker 3916: Router started (101)
2014-04-11 11:48:46+0200 [Controller 140] Worker 3916: Realm started on
router 101 (None)
2014-04-11 11:48:46+0200 [Controller 140] Worker 3916: Class
'crossbardemo.basic.TimeService' (1) started in realm 'real
m1' on router 101
2014-04-11 11:48:46+0200 [Controller 140] Worker 3916: Class
'crossbardemo.basic.TickService' (2) started in realm 'real
m1' on router 101
2014-04-11 11:48:46+0200 [Controller 140] Worker 3916: Class
'crossbardemo.basic.MathService' (3) started in realm 'real
m1' on router 101
2014-04-11 11:48:46+0200 [Worker 3916] Loaded static Web resource 'web'
from module 'crossbardemo 0.3.2' (filesystem pat
h c:\Python27\lib\site-packages\crossbardemo\web)
2014-04-11 11:48:47+0200 [Controller 140] Worker 3916: Transport web/tcp
(1) started on router 101
2014-04-11 11:48:47+0200 [Worker 3916] Site starting on 8080
2014-04-11 11:48:47+0200 [Worker 3916] Starting factory
<twisted.web.server.Site instance at 0x02A54AA8>


Roger Erens

unread,
Apr 11, 2014, 3:17:03 PM4/11/14
to autob...@googlegroups.com
Thanks Tobias,

but despite installing the separate demos and upgrading to autobahn 0.8.8, the output remains the same.

Could you also try running with the KQueueReactor?
I tried the iocp reactor like you had, but that gave me a 'No module named win32api' error which makes sense on a Mac.
Then, choosing another reactor still seems to  lead to the use of KQueueReactor:

(my-pypy-env)Rogers-Mac-mini:my-pypy-env roger$ crossbar version

Crossbar.io software versions:

Crossbar.io     : 0.9.2
Autobahn        : 0.8.8
Twisted         : 13.2.0-KQueueReactor
Python          : 2.7.3
UTF8 Validator  : autobahn
XOR Masker      : autobahn

(my-pypy-env)Rogers-Mac-mini:my-pypy-env roger$ cd t2
(my-pypy-env)Rogers-Mac-mini:t2 roger$ crossbar init --template demos
Crossbar.io node initialized at /Users/roger/my-pypy-env/t2/.crossbar

(my-pypy-env)Rogers-Mac-mini:t2 roger$ crossbar -d --reactor iocp start
2014-04-11 21:08:23+0200 [Controller 1490] Log opened.
2014-04-11 21:08:23+0200 [Controller 1490] ============================== Crossbar.io ==============================

2014-04-11 21:08:23+0200 [Controller 1490] Crossbar.io 0.9.2 node starting
2014-04-11 21:08:23+0200 [Controller 1490] Trying to install explicitly specified Twisted reactor 'iocp'
2014-04-11 21:08:23+0200 [Controller 1490] Could not install Twisted reactor iocp ["No module named win32api"]

(my-pypy-env)Rogers-Mac-mini:t2 roger$ crossbar -d --reactor select start
2014-04-11 21:09:27+0200 [Controller 1493] Log opened.
2014-04-11 21:09:27+0200 [Controller 1493] ============================== Crossbar.io ==============================

2014-04-11 21:09:27+0200 [Controller 1493] Crossbar.io 0.9.2 node starting
2014-04-11 21:09:27+0200 [Controller 1493] Trying to install explicitly specified Twisted reactor 'select'
2014-04-11 21:09:29+0200 [Controller 1493] Running Twisted reactor twisted.internet.selectreactor.SelectReactor
2014-04-11 21:09:29+0200 [Controller 1493] Worker PID 1496 process connected
2014-04-11 21:09:29+0200 [Worker 1496] Log opened.
2014-04-11 21:09:29+0200 [Worker 1496] Starting from node directory /Users/roger/my-pypy-env/t2/.crossbar.
2014-04-11 21:09:31+0200 [Worker 1496] Running on KQueueReactor reactor.
2014-04-11 21:09:31+0200 [Worker 1496] Entering event loop ..
2014-04-11 21:09:31+0200 [Worker 1496] Connected to node router.
2014-04-11 21:09:31+0200 [Worker 1496] Procedures registered.

Tobias Oberstein

unread,
Apr 12, 2014, 9:54:20 AM4/12/14
to autob...@googlegroups.com
Am 11.04.2014 21:17, schrieb Roger Erens:
> Thanks Tobias,
>
> but despite installing the separate demos and upgrading to autobahn
> 0.8.8, the output remains the same.
>
> Could you also try running with the KQueueReactor?

On OSX, there are only 2 reactors to choose from: kqueue and select.
IOCP is Windows only.

But you already tried kqueue and select.

I'm afraid I won't have a chance to look into that soon .. as I don't
have a OSX machine around ..

/Tobias
> --
> You received this message because you are subscribed to the Google
> Groups "Autobahn" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to autobahnws+...@googlegroups.com
> <mailto:autobahnws+...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Roger Erens

unread,
Apr 12, 2014, 1:52:16 PM4/12/14
to autob...@googlegroups.com
That's OK, I'll see how far I get when diving deeper into the code. First I'll work my way through some Twisted documentation. (I just now understood what the 'reactor' term refers to...)
But maybe you have some advice what to look out for?

Particularly it strikes me as odd that I chose the 'select' reactor on the command line, but the log says 'Running on KQueueReactor reactor'. Is the command line option only used for the Controller, not the Worker?

Thanks,

Roger



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

--
You received this message because you are subscribed to a topic in the Google Groups "Autobahn" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/autobahnws/q29kNV7JhNY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to autobahnws+unsubscribe@googlegroups.com.

Tobias Oberstein

unread,
Apr 13, 2014, 8:47:54 PM4/13/14
to autob...@googlegroups.com
> Particularly it strikes me as odd that I chose the 'select' reactor on
> the command line, but the log says 'Running on KQueueReactor reactor'.
> Is the command line option only used for the Controller, not the Worker?

That seems to be the case

https://github.com/crossbario/crossbar/blob/master/crossbar/crossbar/node/node.py#L248

which is wrong .. should be forwarded

https://github.com/crossbario/crossbar/issues/44

Tobias Oberstein

unread,
Apr 17, 2014, 2:28:19 PM4/17/14
to autob...@googlegroups.com

Alright, I dug out a years old Macbook .. latest Crossbar works for me with Python 2.7 vanilla build:

https://raw.githubusercontent.com/crossbario/crossbar/master/docs/shots/macosx_demos.png

Roger Erens

unread,
Apr 17, 2014, 6:04:21 PM4/17/14
to autob...@googlegroups.com
Great, with the latest git pull, it works for me (TM) now, too!

Pypy version:
Python 2.7.3 (87aa9de10f9c, Nov 24 2013, 20:57:21)
[PyPy 2.2.1 with GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``Every time someone argues with
"Smalltalk has always done X", it is always a good hint that something needs to
be changed fast. - Marcus Denker''
>>>>

Crossbar.io software versions:

Crossbar.io     : 0.9.3
Autobahn        : 0.8.8
Twisted         : 13.2.0-KQueueReactor
Python          : 2.7.3
UTF8 Validator  : autobahn
XOR Masker      : autobahn

I used the crossbardemo package you mentioned earlier in this thread.
Big thanks for your help!

Tobias Oberstein

unread,
Apr 17, 2014, 6:18:35 PM4/17/14
to autob...@googlegroups.com
Am 18.04.2014 00:04, schrieb Roger Erens:
> Great, with the latest git pull, it works for me (TM) now, too!

Perfect. I couldn't test PyPy on that machine, only CPython .. good.

FWIW, Git trunk has 1 change more than latest release (0.9.3): it makes
OpenSSL optional.

> I used the crossbardemo package you mentioned earlier in this thread.
> Big thanks for your help!

No problem. Thanks for testing and feedback!

/Tobias

>
> --
> You received this message because you are subscribed to the Google
> Groups "Autobahn" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to autobahnws+...@googlegroups.com
> <mailto:autobahnws+...@googlegroups.com>.

Roger Erens

unread,
Apr 17, 2014, 7:39:14 PM4/17/14
to autob...@googlegroups.com
On Friday, April 18, 2014 12:18:35 AM UTC+2, Tobias Oberstein wrote:
...


No problem. Thanks for testing and feedback!

/Tobias

To express my gratitude, I added some installation notes for Mac OSX.
And edited the 'First steps' page (but it's getting late now, so I hope I did not make serious errors in it). Please check :-)

Tobias Oberstein

unread,
Apr 18, 2014, 7:21:03 AM4/18/14
to autob...@googlegroups.com
> To express my gratitude, I added some installation notes for Mac OSX.
> And edited the 'First steps' page (but it's getting late now, so I hope
> I did not make serious errors in it). Please check :-)

Great! Thanks!
Reply all
Reply to author
Forward
0 new messages