set_option: Bad file descriptor / GuestWorkerClientProtocol.connectionLost

#1

Hi all,

I’m trying to get crossbar.io started and following the instruction from here:
https://github.com/crossbario/crossbar/wiki/Getting-started-with-Cplusplus

Unfortunately, crossbar won’t start. Do you happen to know what the problem might be?

Thanks.
Ivan.

ivan@ivan-VirtualBox:~/hello$ scons
scons: Reading SConscript files …
Using GNU toolchain
scons: done reading SConscript files.
scons: Building targets …
g++ -o hello.o -c -std=c++11 -O2 -Wall -pedantic -Wno-deprecated-declarations -Wno-unused-local-typedefs -Wl,–no-as-needed -pthread -I/usr/local/include -I/home/ivan/msgpack_gcc/include -Iautobahn hello.cpp
g++ -o hello -pthread hello.o -L/usr/local/lib/boost -L/home/ivan/msgpack_gcc/lib -lboost_thread -lboost_system -lmsgpack
scons: done building targets.
ivan@ivan-VirtualBox:~/hello$ crossbar start
2014-10-07 19:28:28-0700 [Controller 13286] Log opened.
2014-10-07 19:28:28-0700 [Controller 13286] ============================== Crossbar.io ==============================

2014-10-07 19:28:28-0700 [Controller 13286] Crossbar.io 0.9.8-3 starting
2014-10-07 19:28:31-0700 [Controller 13286] Running on PyPy using EPollReactor reactor
2014-10-07 19:28:31-0700 [Controller 13286] Starting from node directory /home/ivan/hello/.crossbar
2014-10-07 19:28:31-0700 [Controller 13286] Starting from local configuration ‘/home/ivan/hello/.crossbar/config.json’
2014-10-07 19:28:31-0700 [Controller 13286] No WAMPlets detected in enviroment.
2014-10-07 19:28:31-0700 [Controller 13286] Starting Router with ID ‘worker1’ …
2014-10-07 19:28:32-0700 [Router 13297] Log opened.
2014-10-07 19:28:35-0700 [Router 13297] Running under PyPy using EPollReactor reactor
2014-10-07 19:28:36-0700 [Router 13297] Entering event loop …
2014-10-07 19:28:36-0700 [Controller 13286] Router with ID ‘worker1’ and PID 13297 started
2014-10-07 19:28:36-0700 [Controller 13286] Router ‘worker1’: realm ‘realm1’ started
2014-10-07 19:28:36-0700 [Controller 13286] Router ‘worker1’: role ‘role1’ started on realm ‘realm1’
2014-10-07 19:28:36-0700 [Router 13297] Site starting on 8080
2014-10-07 19:28:36-0700 [Controller 13286] Router ‘worker1’: transport ‘transport1’ started
2014-10-07 19:28:36-0700 [Router 13297] CrossbarWampRawSocketServerFactory starting on 8090
2014-10-07 19:28:36-0700 [Controller 13286] Router ‘worker1’: transport ‘transport2’ started
2014-10-07 19:28:36-0700 [Controller 13286] Starting Guest with ID ‘worker2’ …
2014-10-07 19:28:36-0700 [Controller 13286] GuestWorkerClientProtocol.connectionMade
2014-10-07 19:28:36-0700 [Controller 13286] Guest with ID ‘worker2’ and PID 13304 started
2014-10-07 19:28:36-0700 [Controller 13286] Guest ‘worker2’: started
2014-10-07 19:28:36-0700 [Guest 13304] Running on 105600
2014-10-07 19:28:36-0700 [Guest 13304] set_option: Bad file descriptor
2014-10-07 19:28:36-0700 [Controller 13286] GuestWorkerClientProtocol.connectionLost: [Failure instance: Traceback (failure with no frames): <class ‘twisted.internet.error.ProcessTerminated’>: A process has ended with a probable error condition: process ended with exit code 1.
]
2014-10-07 19:28:36-0700 [Controller 13286] GuestWorkerClientProtocol: guest ended with error 1
2014-10-07 19:28:36-0700 [Controller 13286] Guest excited with error [Failure instance: Traceback (failure with no frames): <class ‘twisted.internet.error.ProcessTerminated’>: A process has ended with a probable error condition: process ended with exit code 1.
]

``

ivan@ivan-VirtualBox:~/hello$ crossbar version

Crossbar.io software versions:

Crossbar.io : 0.9.8-3
Autobahn : 0.9.1
Twisted : 14.0.2-EPollReactor
Python : 2.7.6
UTF8 Validator : autobahn
XOR Masker : autobahn

``

0 Likes

#2

hello:python template works, but not hello:cpp

···

On Tuesday, October 7, 2014 7:40:01 PM UTC-7, IvanK wrote:

Hi all,

I’m trying to get crossbar.io started and following the instruction from here:
https://github.com/crossbario/crossbar/wiki/Getting-started-with-Cplusplus

Unfortunately, crossbar won’t start. Do you happen to know what the problem might be?

Thanks.
Ivan.

0 Likes

#3

Moving forward:

an asio::tcp::socket ctor taking one-parameter does not open a socket, see
http://www.boost.org/doc/libs/1_56_0/doc/html/boost_asio/reference/basic_stream_socket/basic_stream_socket.html

So instead of
tcp::socket socket(io);

``

in hello.cpp

there should rather be

tcp::socket socket(io, boost::asio::ip::tcp::v4());

``

···

On Thursday, October 9, 2014 6:06:20 PM UTC-7, IvanK wrote:

hello:python template works, but not hello:cpp

On Tuesday, October 7, 2014 7:40:01 PM UTC-7, IvanK wrote:

Hi all,

I’m trying to get crossbar.io started and following the instruction from here:
https://github.com/crossbario/crossbar/wiki/Getting-started-with-Cplusplus

Unfortunately, crossbar won’t start. Do you happen to know what the problem might be?

Thanks.
Ivan.

0 Likes

#4

And finally,

hello.cpp registeres ‘com.example.add2’ function whereas JS calls “com.myapp.add2”.

···

On Thursday, October 9, 2014 9:32:31 PM UTC-7, IvanK wrote:

Moving forward:

an asio::tcp::socket ctor taking one-parameter does not open a socket, see
http://www.boost.org/doc/libs/1_56_0/doc/html/boost_asio/reference/basic_stream_socket/basic_stream_socket.html

So instead of
tcp::socket socket(io);

``

in hello.cpp

there should rather be

tcp::socket socket(io, boost::asio::ip::tcp::v4());

``

On Thursday, October 9, 2014 6:06:20 PM UTC-7, IvanK wrote:

hello:python template works, but not hello:cpp

On Tuesday, October 7, 2014 7:40:01 PM UTC-7, IvanK wrote:

Hi all,

I’m trying to get crossbar.io started and following the instruction from here:
https://github.com/crossbario/crossbar/wiki/Getting-started-with-Cplusplus

Unfortunately, crossbar won’t start. Do you happen to know what the problem might be?

Thanks.
Ivan.

0 Likes

#5

Hi Ivan,

sorry for the long delay .. I am still catching up with my mail backlog. This (and the previous issues you mention) are now fixed in Crossbar. 0.9.9. Further, AutobahnCpp has gotten some improvements as well.

Cheers,
/Tobias

···

Am 10.10.2014 06:53, schrieb IvanK:

And finally,

hello.cpp registeres 'com.example.add2' function whereas JS calls
"com.myapp.add2".

On Thursday, October 9, 2014 9:32:31 PM UTC-7, IvanK wrote:

    Moving forward:

    an asio::tcp::socket ctor taking one-parameter does not open a
    socket, see
    http://www.boost.org/doc/libs/1_56_0/doc/html/boost_asio/reference/basic_stream_socket/basic_stream_socket.html
    <http://www.boost.org/doc/libs/1_56_0/doc/html/boost_asio/reference/basic_stream_socket/basic_stream_socket.html>

    So instead of
    >
    tcp::socket socket(io);
    >
    in hello.cpp
    there should rather be
    >
    tcp::socket socket(io,boost::asio::ip::tcp::v4());
    >

    On Thursday, October 9, 2014 6:06:20 PM UTC-7, IvanK wrote:

        hello:python template works, but not hello:cpp

        On Tuesday, October 7, 2014 7:40:01 PM UTC-7, IvanK wrote:

            Hi all,

            I'm trying to get crossbar.io <http://crossbar.io> started
            and following the instruction from here:
            https://github.com/crossbario/crossbar/wiki/Getting-started-with-Cplusplus
            <https://github.com/crossbario/crossbar/wiki/Getting-started-with-Cplusplus>

            Unfortunately, crossbar won't start. Do you happen to know
            what the problem might be?

            Thanks.
            Ivan.

--
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/7f1b033d-bf72-4de4-ae11-58ea463d86d0%40googlegroups.com
<https://groups.google.com/d/msgid/autobahnws/7f1b033d-bf72-4de4-ae11-58ea463d86d0%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

0 Likes