wish documentation was up to date ... universal transport?

#1

I installed the docker version of crossbar on my Ubuntu 16.04 box, but I haven’t gotten any clients to connect to it just yet. I can watch the logs by doing this:

journalctl -f -u crossbar

And … ok, the version I’m seeing is:

Version: Crossbar.io COMMUNITY 17.6.1-3

Yeah! So, that’s a good sign …

Now I’m trying to get a sample app to connect to crossbar with code that I wrote a few years ago and it used to work just fine. Now I get the following error:

… docker[20011]: 2017-06-29T00:14:41+0000 [Router 17] failing WebSocket opening handshake ('This server only speaks WebSocket

subprotocols wamp.2.cbor.batched, wamp.2.cbor, wamp.2.msgpack.batched, wamp.2.msgpack, wamp.2.ubjson.batched,

wamp.2.ubjson, wamp.2.json.batched, wamp.2.json’)

… docker[20011]: 2017-06-29T00:14:41+0000 [Router 17] dropping connection to peer tcp4:**********:64040 with abort=False: This server only

speaks WebSocket subprotocols wamp.2.cbor.batched, wamp.2.cbor, wamp.2.msgpack.batched, wamp.2.msgpack,

wamp.2.ubjson.batched, wamp.2.ubjson, wamp.2.json.batched, wamp.2.json

I have no idea what that means, but I suspected that maybe my autobahn.min.js library was out of date or something so I went here and downloaded a new one:

https://github.com/crossbario/autobahn-js-built/blob/master/autobahn.min.js

But after putting that in place of my old file, it didn’t help. So, I figured I’d go and dig around some sources and look for clues … so I did:

npm install autobahn

and looked at the node_modules/autobahn directory … but there’s a lot more in there than I expected to find:

.

├── .crossbar/

├── .npmignore

├── .sconsign.dblite

├── Dockerfile

├── LICENSE

├── Makefile

├── README.md

├── SConstruct

├── doc/

├── index.js

├── lib/

├── package.json

└── test/

Uhh? Why is there a “.crossbar” directory in the autobahn javascript package? So I looked at the config.json in there out of curiosity:

There’s a whole block of transports like this:

“transports”: [

{

“type”: “universal”,

“endpoint”: {

“type”: “tcp”,

“port”: 8080

}, …

What is that “universal” type!? I google “crossbar.io universal transport” and find nothing interesting:

http://crossbar.io/docs/Router-Transports/

http://crossbar.io/docs/Table-of-Contents/

I find web socket and raw socket:

http://crossbar.io/docs/WebSocket-Transport/

http://crossbar.io/docs/RawSocket-Transport/

The word “universal” is never mentioned on any of those pages!

It would be nice if I could figure out why my connections are borked, but better would be finding consistency in examples and documentation. It’s possible there’s a version mismatch where the examples are for a future or past version than the online documentation, but … somehow we need to bring it all together. I’m losing a lot of time just trying to get this to work … in previous years, I was able to install the demo and get up and running a lot easier. I’m not sure you have enough examples for how you want people to do it “the new way”. And stuff like this “universal” type of transport look like a mysterious undocumented feature.

– Dante

0 Likes

#2

Further googling did find this:

https://github.com/crossbario/crossbar-examples/tree/master/unitransport

The readme says this was over a year ago … so maybe these docs are just way out of date?

http://crossbar.io/docs/

– Dante

···

On Wednesday, June 28, 2017 at 7:45:39 PM UTC-5, Dante Lorenso wrote:

I installed the docker version of crossbar on my Ubuntu 16.04 box, but I haven’t gotten any clients to connect to it just yet. I can watch the logs by doing this:

journalctl -f -u crossbar

And … ok, the version I’m seeing is:

Version: Crossbar.io COMMUNITY 17.6.1-3

Yeah! So, that’s a good sign …

Now I’m trying to get a sample app to connect to crossbar with code that I wrote a few years ago and it used to work just fine. Now I get the following error:

… docker[20011]: 2017-06-29T00:14:41+0000 [Router 17] failing WebSocket opening handshake ('This server only speaks WebSocket

subprotocols wamp.2.cbor.batched, wamp.2.cbor, wamp.2.msgpack.batched, wamp.2.msgpack, wamp.2.ubjson.batched,

wamp.2.ubjson, wamp.2.json.batched, wamp.2.json’)

… docker[20011]: 2017-06-29T00:14:41+0000 [Router 17] dropping connection to peer tcp4:**********:64040 with abort=False: This server only

speaks WebSocket subprotocols wamp.2.cbor.batched, wamp.2.cbor, wamp.2.msgpack.batched, wamp.2.msgpack,

wamp.2.ubjson.batched, wamp.2.ubjson, wamp.2.json.batched, wamp.2.json

I have no idea what that means, but I suspected that maybe my autobahn.min.js library was out of date or something so I went here and downloaded a new one:

https://github.com/crossbario/autobahn-js-built/blob/master/autobahn.min.js

But after putting that in place of my old file, it didn’t help. So, I figured I’d go and dig around some sources and look for clues … so I did:

npm install autobahn

and looked at the node_modules/autobahn directory … but there’s a lot more in there than I expected to find:

.

├── .crossbar/

├── .npmignore

├── .sconsign.dblite

├── Dockerfile

├── LICENSE

├── Makefile

├── README.md

├── SConstruct

├── doc/

├── index.js

├── lib/

├── package.json

└── test/

Uhh? Why is there a “.crossbar” directory in the autobahn javascript package? So I looked at the config.json in there out of curiosity:

There’s a whole block of transports like this:

“transports”: [

{

“type”: “universal”,

“endpoint”: {

“type”: “tcp”,

“port”: 8080

}, …

What is that “universal” type!? I google “crossbar.io universal transport” and find nothing interesting:

http://crossbar.io/docs/Router-Transports/

http://crossbar.io/docs/Table-of-Contents/

I find web socket and raw socket:

http://crossbar.io/docs/WebSocket-Transport/

http://crossbar.io/docs/RawSocket-Transport/

The word “universal” is never mentioned on any of those pages!

It would be nice if I could figure out why my connections are borked, but better would be finding consistency in examples and documentation. It’s possible there’s a version mismatch where the examples are for a future or past version than the online documentation, but … somehow we need to bring it all together. I’m losing a lot of time just trying to get this to work … in previous years, I was able to install the demo and get up and running a lot easier. I’m not sure you have enough examples for how you want people to do it “the new way”. And stuff like this “universal” type of transport look like a mysterious undocumented feature.

– Dante

0 Likes

#3

sigh … the examples don’t work either:

https://github.com/crossbario/crossbar-examples/tree/master/unitransport

I get this error now:

invalid attribute value ‘unisocket’ for attribute ‘type’ in transport item

So, the correct term should be ‘universal’ … and not ‘unisocket’ … but that’s not documented anywhere that I can find.

– Dante

0 Likes

#4

Hi Dante,

  ... docker[20011]: 2017-06-29T00:14:41+0000 [Router 17] dropping
connection to peer tcp4:**********:64040 with abort=False: This server only
speaks WebSocket subprotocols wamp.2.cbor.batched, wamp.2.cbor,
wamp.2.msgpack.batched, wamp.2.msgpack,
wamp.2.ubjson.batched, wamp.2.ubjson, wamp.2.json.batched, wamp.2.json

I have no idea what that means, but I suspected that maybe my

It means, the client connecting does not speak WAMP (v2).

autobahn.min.js library was out of date or something so I went here and
downloaded a new one:

   https://github.com/crossbario/autobahn-js-built/blob/master/autobahn.min.js

But after putting that in place of my old file, it didn't help. So, I

I suspect, you have an app built on the years old AutobahnJS for WAMPv1.

AutobahnJS does not support WAMP v1 anymore, only v2. Same with Crossbar.io.

The API of AutobahnJS has slightly changed moving to WAMP v2, so the app code needs to be adjusted.

figured I'd go and dig around some sources and look for clues ... so I did:

   > npm install autobahn

The Node version of Autobahn does not run in the browser.

and looked at the *node_modules/autobahn* directory ... but there's a lot
more in there than I expected to find:

Right, there are a handful of files we could exclude:

https://github.com/crossbario/autobahn-js/issues/314

What is that "universal" type!? I google "crossbar.io universal transport"
and find nothing interesting:

Sorry for inconvenience, yes, this is a relatively new feature.

Please see

https://github.com/crossbario/crossbar-examples/tree/master/unitransport#universal-transport

for a complete example. Docs are indeed missing

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

It would be nice if I could figure out why my connections are borked, but

You need to upgrade your clients to WAMP v2.

Hope above helps a little,

Cheers,
Tobias

0 Likes

#5

I have just updated this example to the latest, and simplified everything to run on Docker.

here is Crossbar.io (with universal transport) and 3 clients in 3 different languages:

https://asciinema.org/a/Wao2khxTgBcWsZLazuSXrbcBb

···

Am 29.06.2017 um 03:18 schrieb Dante Lorenso:

*sigh* ... the examples don't work either:

   https://github.com/crossbario/crossbar-examples/tree/master/unitransport

I get this error now:

invalid attribute value 'unisocket' for attribute 'type' in transport item

So, the correct term should be 'universal' ... and not 'unisocket' ... but
that's not documented anywhere that I can find.

-- Dante

0 Likes