AutobahnCPP: Can't Join

100 views
Skip to first unread message

Mattia Romeo

unread,
Jan 10, 2015, 3:08:03 PM1/10/15
to autob...@googlegroups.com
I'm trying to experiment with the AutobahnCPP examples and some tests of my own and while I can connect to a local server, joining always fails. There's no errors, exceptions, messages, etc. The continuation in session.join just never gets called. Here's what I'm working with:

- Local server is an instance of the hello:python crossbar.io template
- Building on OSX 10.10 using Apple LLVM compiler v.6 (which is based on clang 3.5)
- Using Boost 1.57 (macports build)

Anyone run into anything similar or have any tips to share?

Tobias Oberstein

unread,
Jan 10, 2015, 3:32:37 PM1/10/15
to autob...@googlegroups.com
Hi Mattia,
Are you running a RawSocket transport? Since AutobahnCpp wants to talk
WAMP-over-RawSocket.

See:
https://github.com/crossbario/crossbarexamples/blob/master/hello/cpp/.crossbar/config.json#L43

And the tutorial:
http://crossbar.io/docs/Getting-started-with-Cplusplus/

/Tobias

Mattia Romeo

unread,
Jan 10, 2015, 5:33:07 PM1/10/15
to autob...@googlegroups.com
Thanks so much! Adding the rawsocket transport did it. Now if I could just figure out how to get Heroku to expose two ports so that I can have an app that uses both websockets for mobile browsers and tcp for PCs... ;)

Tobias Oberstein

unread,
Jan 10, 2015, 6:36:12 PM1/10/15
to autobahnws

Good to hear you got it working - in principle. Pls let me know if/how the 2 port thing works on Heroku!

Sent from Mobile (Google Nexus 5)

--
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.
To post to this group, send email to autob...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/autobahnws/f17c3964-1da1-4926-8d66-bd446f0ce74c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mattia Romeo

unread,
Jan 10, 2015, 10:09:14 PM1/10/15
to autob...@googlegroups.com
No dice. As far as I can tell it's not possible to get multiple external ports on Heroku. I'll switch over to AWS and then revisit Heroku if and when there's websockets support in AutobahnCPP so I can use a single transport for all traffic.

Tobias Oberstein

unread,
Jan 11, 2015, 12:54:03 AM1/11/15
to autob...@googlegroups.com
Am 11.01.2015 um 04:09 schrieb Mattia Romeo:
> No dice. As far as I can tell it's not possible to get multiple external
> ports on Heroku. I'll switch over to AWS and then revisit Heroku if and

Huh, ok. That is .. restricting.

> when there's websockets support in AutobahnCPP so I can use a single
> transport for all traffic.


Yes, either WebSocket

https://github.com/tavendo/AutobahnCpp/issues/20

or the RawSocket revision

https://github.com/tavendo/AutobahnCpp/issues/15

The latter is a slight revision of the RawSocket transport in the WAMP
spec that allows to run both WebSocket and RawSocket on 1 port. It needs
code in AutobahnCpp, AutobahnPython and Crossbar.io to do so - but
running on one port was one of the reasons for the slight revision of
RawSocket.

/Tobias

pd

unread,
Apr 7, 2015, 5:32:16 PM4/7/15
to autob...@googlegroups.com
I am also experimenting with AutobahnCPP but it does not seem to be completing the handshake.

Server:
FreeBSD 10.1
hello:cpp template

Client:
OSX 10.10
created using hello.cpp from the template

Local connections on the server and connections from another FreeBSD machine are able to complete the handshake.

At first the server output was...
[Router        772] WAMP-over-RawSocket connection made
[Router        772] failing RawSocket connection - message length exceeded: message was 2146566144 bytes, but current maximum is 131072 bytes

So it looked like maybe the handshake packet needed to be byte swapped.

Server output after byte swap...
[Router        772] WAMP-over-RawSocket connection made

There is no further indication that the server received the initial handshake packet as it would in a successful join.

Client Output:
Running on 105500
Starting ASIO I/O loop ..
Connected to server
TX message (56 octets) ...
TX message sent (60 / 60 octets)

Does anyone have any ideas?

emile.co...@gmail.com

unread,
Apr 7, 2015, 10:24:52 PM4/7/15
to autob...@googlegroups.com
On Tuesday, April 7, 2015 at 6:32:16 PM UTC-3, pd wrote:
I am also experimenting with AutobahnCPP but it does not seem to be completing the handshake.

If you're using the latest bleeding edge Autobahn|Cpp, you'll also have to update Crossbar to the latest development version. That's because support for raw socket handshaking (i.e. "revised raw sockets") has only been implemented on Crossbar a few days ago. See here about how you can obtain the latest Crossbar.

pd

unread,
Apr 8, 2015, 10:07:35 AM4/8/15
to autob...@googlegroups.com
On Tuesday, April 7, 2015 at 7:24:52 PM UTC-7, emile.co...@gmail.com wrote:
If you're using the latest bleeding edge Autobahn|Cpp, you'll also have to update Crossbar to the latest development version. That's because support for raw socket handshaking (i.e. "revised raw sockets") has only been implemented on Crossbar a few days ago. See here about how you can obtain the latest Crossbar.

Thanks for the response. I pulled the latest but that did not resolve my issue. I am still getting the same behavior. 

pd

unread,
Apr 8, 2015, 3:03:20 PM4/8/15
to autob...@googlegroups.com
Cannot seem to find any evidence of the raw socket handshake in the latest Crossbar code.

commit 49572fd0b078b3ffe8747659e04581569827d0bb
Date:   Tue Apr 7 21:34:40 2015 +0200

emile.co...@gmail.com

unread,
Apr 8, 2015, 3:15:23 PM4/8/15
to autob...@googlegroups.com
On Wednesday, April 8, 2015 at 4:03:20 PM UTC-3, pd wrote:
Cannot seem to find any evidence of the raw socket handshake in the latest Crossbar code.

I believe the raw socket handshake functionality is implemented in Autobahn|Python, which is a dependency of Crossbar. 

Tobias Oberstein

unread,
Apr 8, 2015, 3:21:54 PM4/8/15
to autob...@googlegroups.com
Do you have AutobahnPython trunk also? Crossbar.io requires that.

You need current trunk of all these:

* AutobahnPython
* Crossbar.io
* AutobahnCpp

Look here (I added RawSocket revised protocol support around 4. April
just days ago):

https://github.com/tavendo/AutobahnPython/blob/master/autobahn/twisted/rawsocket.py#L187

I have tested above with this example

https://github.com/crossbario/crossbarexamples/tree/master/hello/cpp
> --
> 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>.
> To post to this group, send email to autob...@googlegroups.com
> <mailto:autob...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/autobahnws/b19edd25-0d86-47d6-896e-53bcb9cc8c20%40googlegroups.com
> <https://groups.google.com/d/msgid/autobahnws/b19edd25-0d86-47d6-896e-53bcb9cc8c20%40googlegroups.com?utm_medium=email&utm_source=footer>.

pd

unread,
Apr 8, 2015, 4:58:16 PM4/8/15
to autob...@googlegroups.com
Thank you. It does indeed work with latest AutobahnPython.

Tobias Oberstein

unread,
Apr 8, 2015, 5:05:09 PM4/8/15
to autob...@googlegroups.com
Am 08.04.2015 um 22:58 schrieb pd:
> Thank you. It does indeed work with latest AutobahnPython.

Good to hear! And sorry for wasting your time on this:(

>
> --
> 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>.
> To post to this group, send email to autob...@googlegroups.com
> <mailto:autob...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/autobahnws/7d93ab6a-919f-4dd0-a690-749e9a0c0b47%40googlegroups.com
> <https://groups.google.com/d/msgid/autobahnws/7d93ab6a-919f-4dd0-a690-749e9a0c0b47%40googlegroups.com?utm_medium=email&utm_source=footer>.

pd

unread,
Apr 8, 2015, 6:36:03 PM4/8/15
to autob...@googlegroups.com
Thank you for the quick response. It was not a waste of time at all. It forced me to dig deeper and dispel my ignorance.
Reply all
Reply to author
Forward
0 new messages