Running Demo Launcher (problems)

26 views
Skip to first unread message

lon...@outstep.com

unread,
Jul 7, 2016, 11:15:32 AM7/7/16
to Crossbar
Greetings All,

I am very new to Crossbar, but from what I have seen thus far from the website, I am extremely impressed and am going to use Crossbar for the project that I am currently working on at the moment.

With that in mind, I have a Ubuntu 14.04 LTS system set up and was able to install Crossbar via the instructions at:



While also had to install nodejs via:

To install Node.js, type the following command in your terminal:

1
sudo apt-get install nodejs

Then install the Node package manager, npm:

1
sudo apt-get install npm

Create a symbolic link for node, as many Node.js tools use this name to execute.

1
sudo ln -s /usr/bin/nodejs /usr/bin/node

Now we should have both the Node and npm commands working:

1
2
3
4
$ node -v
v0.10.25
$ npm -v
1.3.10

Then, I was able to get the github crossbarexamples () and go into the "demo/spread" directory after which I started 

lonnie@ost1:~/demos/_demo_launcher$ /opt/crossbar/bin/crossbar start

But then when I tried to run the "_demo_launcher" example, I get some errors which I think are related to nodejs not being able to locate some modules but the readme files did not seem to suggest any dependencies:

lonnie@ost1:~/demos/_demo_launcher$ /opt/crossbar/bin/crossbar start
2016-07-07T16:11:38+0200 [Controller  12503]      __  __  __  __  __  __      __     __
2016-07-07T16:11:38+0200 [Controller  12503]     /  `|__)/  \/__`/__`|__) /\ |__)  |/  \
2016-07-07T16:11:38+0200 [Controller  12503]     \__,|  \\__/.__/.__/|__)/~~\|  \. |\__/
2016-07-07T16:11:38+0200 [Controller  12503]
2016-07-07T16:11:38+0200 [Controller  12503]     Crossbar.io Version: 0.13.2
2016-07-07T16:11:38+0200 [Controller  12503]     Node Public Key: 27d2431892e795ae7faab0e1c78aa7a23af5ce07b36ed20de3e9450fd6438b23
2016-07-07T16:11:38+0200 [Controller  12503]
2016-07-07T16:11:38+0200 [Controller  12503] Running from node directory '/home/lonnie/demos/_demo_launcher/.crossbar'
2016-07-07T16:11:38+0200 [Controller  12503] Controller process starting (PyPy-EPollReactor) ..
2016-07-07T16:11:38+0200 [Controller  12503] Node configuration loaded from 'config.json'
2016-07-07T16:11:38+0200 [Controller  12503] Node ID 'ost1.outstep.com' set from hostname
2016-07-07T16:11:38+0200 [Controller  12503] Using default node shutdown triggers [u'shutdown_on_worker_exit']
2016-07-07T16:11:38+0200 [Controller  12503] Joined realm 'crossbar' on node management router
2016-07-07T16:11:38+0200 [Controller  12503] Starting Router with ID 'worker-001'...
2016-07-07T16:11:39+0200 [Router      12508] Worker process starting (PyPy-EPollReactor) ..
2016-07-07T16:11:39+0200 [Controller  12503] Router with ID 'worker-001' and PID 12508 started
2016-07-07T16:11:39+0200 [Router      12508] Realm 'crossbardemo' started
2016-07-07T16:11:39+0200 [Controller  12503] Router 'worker-001': realm 'realm-001' (named 'crossbardemo') started
2016-07-07T16:11:39+0200 [Controller  12503] Router 'worker-001': role 'role-001' (named 'anonymous') started on realm 'realm-001'
2016-07-07T16:11:40+0200 [Router      12508] Site starting on 8080
2016-07-07T16:11:40+0200 [Controller  12503] Router 'worker-001': transport 'transport-001' started
2016-07-07T16:11:40+0200 [Controller  12503] Using guest worker executable '/usr/bin/node' (executable path detected from environment)
2016-07-07T16:11:40+0200 [Controller  12503] Starting Guest with ID 'worker-002'...
2016-07-07T16:11:40+0200 [Controller  12503] Guest with ID 'worker-002' and PID 12513 started
2016-07-07T16:11:40+0200 [Controller  12503] Guest 'worker-002': started
2016-07-07T16:11:40+0200 [Controller  12503] Using guest worker executable '/usr/bin/node' (executable path detected from environment)
2016-07-07T16:11:40+0200 [Controller  12503] Starting Guest with ID 'worker-003'...
2016-07-07T16:11:40+0200 [Controller  12503] Guest with ID 'worker-003' and PID 12518 started
2016-07-07T16:11:40+0200 [Controller  12503] Guest 'worker-003': started
2016-07-07T16:11:40+0200 [Controller  12503] Using guest worker executable '/usr/bin/node' (executable path detected from environment)
2016-07-07T16:11:40+0200 [Controller  12503] Starting Guest with ID 'worker-004'...
2016-07-07T16:11:40+0200 [Controller  12503] Guest with ID 'worker-004' and PID 12524 started
2016-07-07T16:11:40+0200 [Controller  12503] Guest 'worker-004': started
2016-07-07T16:11:40+0200 [Guest       12513] module.js:340
2016-07-07T16:11:40+0200 [Guest       12513] throw err;
2016-07-07T16:11:40+0200 [Guest       12513] ^
2016-07-07T16:11:40+0200 [Guest       12513] Error: Cannot find module 'autobahn'
2016-07-07T16:11:40+0200 [Guest       12513] at Function.Module._resolveFilename (module.js:338:15)
2016-07-07T16:11:40+0200 [Guest       12513] at Function.Module._load (module.js:280:25)
2016-07-07T16:11:40+0200 [Guest       12513] at Module.require (module.js:364:17)
2016-07-07T16:11:40+0200 [Guest       12513] at require (module.js:380:17)
2016-07-07T16:11:40+0200 [Guest       12513] at Object.<anonymous> (/home/lonnie/demos/votes/nodejs/node/backend.js:2:16)
2016-07-07T16:11:40+0200 [Guest       12513] at Module._compile (module.js:456:26)
2016-07-07T16:11:40+0200 [Guest       12513] at Object.Module._extensions..js (module.js:474:10)
2016-07-07T16:11:40+0200 [Guest       12513] at Module.load (module.js:356:32)
2016-07-07T16:11:40+0200 [Guest       12513] at Function.Module._load (module.js:312:12)
2016-07-07T16:11:40+0200 [Guest       12513] at Function.Module.runMain (module.js:497:10)
2016-07-07T16:11:40+0200 [Controller  12503] Guest worker-002 exited with error A process has ended with a probable error condition: process ended with exit code 8.
2016-07-07T16:11:40+0200 [Guest       12518] module.js:340
2016-07-07T16:11:40+0200 [Guest       12518] throw err;
2016-07-07T16:11:40+0200 [Guest       12518] ^
2016-07-07T16:11:40+0200 [Guest       12518] Error: Cannot find module 'autobahn'
2016-07-07T16:11:40+0200 [Guest       12518] at Function.Module._resolveFilename (module.js:338:15)
2016-07-07T16:11:40+0200 [Guest       12518] at Function.Module._load (module.js:280:25)
2016-07-07T16:11:40+0200 [Guest       12518] at Module.require (module.js:364:17)
2016-07-07T16:11:40+0200 [Guest       12518] at require (module.js:380:17)
2016-07-07T16:11:40+0200 [Guest       12518] at Object.<anonymous> (/home/lonnie/demos/editform/node/editform_backend.js:1:78)
2016-07-07T16:11:40+0200 [Guest       12518] at Module._compile (module.js:456:26)
2016-07-07T16:11:40+0200 [Guest       12518] at Object.Module._extensions..js (module.js:474:10)
2016-07-07T16:11:40+0200 [Guest       12518] at Module.load (module.js:356:32)
2016-07-07T16:11:40+0200 [Guest       12518] at Function.Module._load (module.js:312:12)
2016-07-07T16:11:40+0200 [Guest       12518] at Function.Module.runMain (module.js:497:10)
2016-07-07T16:11:40+0200 [Guest       12524] /home/lonnie/demos/visitors_counter/js/backend.js:12
2016-07-07T16:11:40+0200 [Guest       12524] var connection = new autobahn.Connection({
2016-07-07T16:11:40+0200 [Guest       12524] ^
2016-07-07T16:11:40+0200 [Guest       12524] TypeError: Cannot read property 'Connection' of undefined
2016-07-07T16:11:40+0200 [Guest       12524] at Object.<anonymous> (/home/lonnie/demos/visitors_counter/js/backend.js:12:30)
2016-07-07T16:11:40+0200 [Guest       12524] at Module._compile (module.js:456:26)
2016-07-07T16:11:40+0200 [Guest       12524] at Object.Module._extensions..js (module.js:474:10)
2016-07-07T16:11:40+0200 [Guest       12524] at Module.load (module.js:356:32)
2016-07-07T16:11:40+0200 [Guest       12524] at Function.Module._load (module.js:312:12)
2016-07-07T16:11:40+0200 [Guest       12524] at Function.Module.runMain (module.js:497:10)
2016-07-07T16:11:40+0200 [Guest       12524] at startup (node.js:119:16)
2016-07-07T16:11:40+0200 [Guest       12524] at node.js:902:3
2016-07-07T16:11:40+0200 [Controller  12503] Guest worker-003 exited with error A process has ended with a probable error condition: process ended with exit code 8.
2016-07-07T16:11:40+0200 [Controller  12503] Guest worker-004 exited with error A process has ended with a probable error condition: process ended with exit code 8.

Any suggestions to resolve this would be greatly appreciated as I would like to be able to use the demo_launcher while working out more on the project specifics.

Thanks and have a great day,
Lonnie

lon...@outstep.com

unread,
Jul 7, 2016, 11:20:51 AM7/7/16
to Crossbar
Hello Again,

Forgot to mention that I also tried to add in the "autobahn" module via:

npm install autobahn

but still get the same output error for some reason.

Cheers,
Lonnie

Lonnie Cumberland

unread,
Jul 7, 2016, 11:44:42 AM7/7/16
to cross...@googlegroups.com
Hi All,

I was able to figure things out as it had to do with nodejs being able to find the "node_modules" location.

Thanks again and have a great day,
Lonnie

--
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/8f62a38f-cf3c-473a-ad46-de532449052f%40googlegroups.com.

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

Alexander Gödde

unread,
Jul 8, 2016, 5:55:21 AM7/8/16
to Crossbar
Hi Lonnie!

Glad you got things working - and welcome to the Crossbar.io & WAMP community!

Regards,

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

To post to this group, send email to cross...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages