Some clarification please?

#1

Can someone please clarify the hierarchy for WAMPv2? For some reason I’m having a ton of trouble getting this straight as I go to code.

As far as I understand, I must start a Websocket transport, attach a router to the transport, attach a realm to the router, and then create sessions between a client and a router by attaching them to the realm on the router. Can I have multiple realms on a router? Where would I specify that in the code?

Thanks to anyone who replies.

0 Likes

#2

Hi Jess,

Can someone please clarify the hierarchy for WAMPv2? For some reason I'm
having a ton of trouble getting this straight as I go to code.

I assume your are referring to Python.

1)
If you let Crossbar.io host your application component, then the boilerplate machinery is done for you, and you write components by simply subclassing ApplicationSession:

https://github.com/crossbario/crossbar/wiki/Python-Application-Components

2)
If you "roll your own", then the best 2 starter points are:

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/client.py

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py

As far as I understand, I must start a Websocket transport, attach a
router to the transport, attach a realm to the router, and then create
sessions between a client and a router by attaching them to the realm on
the router. Can I have multiple realms on a router? Where would I
specify that in the code?

I will walk you through "server.py" in above:

2.1)
You first create a RouterFactory

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L63

This factory creates one router per realm, and realms with that code (basic router included with AutobahnPython) are created on demand.

2.2)
Second you create a RouterSessionFactory

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L69

This factory creates the "router end" of WAMP sessions attaching.

2.3.)
Optionally, you can add WAMP session directly to the router

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L87

2.4)
Then you create at least 1 transport factory

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L95

This is the actual transport across which (external) WAMP sessions talk to the router.

2.5)
Lastly, you create an Twisted stream endpoint listening, and using your transport factory:

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L121

···

Am 27.03.2014 21:10, schrieb Jess Updegrove:

===

This may seem overwhelming at first, but it provides and incredible amount of flexibility and extensibility. On each and every layer of this stack.

Hope this helps .. feel free to ask more/further!

/Tobias

Thanks to anyone who replies.

--
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.

0 Likes

#3

When I try to add my own session directly to the server it always gives me the error:

SessionKlass = getattr(app, klass)
2014-03-27 16:53:14-0400 [-] AttributeError: ‘module’ object has no attribute ‘Component’

I’ve followed all the examples and entered exactly what it told me and it keeps telling me this. Any idea how to fix this?

For reference, I enter

python server.py --component “myfile.Component”
into the terminal and I still get this.

Thanks

···

On Thursday, March 27, 2014 4:35:38 PM UTC-4, Tobias Oberstein wrote:

Hi Jess,

Am 27.03.2014 21:10, schrieb Jess Updegrove:

Can someone please clarify the hierarchy for WAMPv2? For some reason I’m

having a ton of trouble getting this straight as I go to code.

I assume your are referring to Python.

If you let Crossbar.io host your application component, then the
boilerplate machinery is done for you, and you write components by
simply subclassing ApplicationSession:

https://github.com/crossbario/crossbar/wiki/Python-Application-Components

If you “roll your own”, then the best 2 starter points are:

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/client.py

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py

As far as I understand, I must start a Websocket transport, attach a

router to the transport, attach a realm to the router, and then create

sessions between a client and a router by attaching them to the realm on

the router. Can I have multiple realms on a router? Where would I

specify that in the code?

I will walk you through “server.py” in above:

2.1)

You first create a RouterFactory

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L63

This factory creates one router per realm, and realms with that code
(basic router included with AutobahnPython) are created on demand.

2.2)

Second you create a RouterSessionFactory

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L69

This factory creates the “router end” of WAMP sessions attaching.

2.3.)

Optionally, you can add WAMP session directly to the router

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L87

2.4)

Then you create at least 1 transport factory

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L95

This is the actual transport across which (external) WAMP sessions talk
to the router.

2.5)

Lastly, you create an Twisted stream endpoint listening, and using your
transport factory:

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L121

===

This may seem overwhelming at first, but it provides and incredible
amount of flexibility and extensibility. On each and every layer of this
stack.

Hope this helps … feel free to ask more/further!

/Tobias

Thanks to anyone who replies.

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+unsub...@googlegroups.com.

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

0 Likes

#4

When I try to add my own session directly to the server it always gives
me the error:

SessionKlass = getattr(app, klass)
2014-03-27 16:53:14-0400 [-] AttributeError: 'module' object has no
attribute 'Component'

Python fails to load the class dynamically at this line

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L81

I'd recommend skipping this for now (it's there since I am lazy and don't want to duplicate code for dozens of demos), but it's some trickery code.

You can just add s.th. like this to the top of "server.py":

from autobahn.twisted.wamp import ApplicationSession

class YourComponent(ApplicationSession):

   ...

and then do:

session_factory.add(YourComponent())

Note to self: I should probably add a "less advanced / shorter" boilerplate server.py for easy tweaking.

···

Am 27.03.2014 21:58, schrieb Jess Updegrove:

I've followed all the examples and entered exactly what it told me and
it keeps telling me this. Any idea how to fix this?

For reference, I enter
> python server.py --component "myfile.Component"
into the terminal and I still get this.

Thanks

On Thursday, March 27, 2014 4:35:38 PM UTC-4, Tobias Oberstein wrote:

    Hi Jess,

    Am 27.03.2014 21:10, schrieb Jess Updegrove:
     > Can someone please clarify the hierarchy for WAMPv2? For some
    reason I'm
     > having a ton of trouble getting this straight as I go to code.

    I assume your are referring to Python.

    1)
    If you let Crossbar.io host your application component, then the
    boilerplate machinery is done for you, and you write components by
    simply subclassing ApplicationSession:

    https://github.com/crossbario/crossbar/wiki/Python-Application-Components
    <https://github.com/crossbario/crossbar/wiki/Python-Application-Components>

    2)
    If you "roll your own", then the best 2 starter points are:

    https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/client.py
    <https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/client.py>

    https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py
    <https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py>

     >
     > As far as I understand, I must start a Websocket transport, attach a
     > router to the transport, attach a realm to the router, and then
    create
     > sessions between a client and a router by attaching them to the
    realm on
     > the router. Can I have multiple realms on a router? Where would I
     > specify that in the code?

    I will walk you through "server.py" in above:

    2.1)
    You first create a RouterFactory

    https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L63
    <https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L63>

    This factory creates one router per realm, and realms with that code
    (basic router included with AutobahnPython) are created on demand.

    2.2)
    Second you create a RouterSessionFactory

    https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L69
    <https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L69>

    This factory creates the "router end" of WAMP sessions attaching.

    2.3.)
    Optionally, you can add WAMP session directly to the router

    https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L87
    <https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L87>

    2.4)
    Then you create at least 1 transport factory

    https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L95
    <https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L95>

    This is the actual transport across which (external) WAMP sessions talk
    to the router.

    2.5)
    Lastly, you create an Twisted stream endpoint listening, and using your
    transport factory:

    https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L121
    <https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/server.py#L121>

    ===

    This may seem overwhelming at first, but it provides and incredible
    amount of flexibility and extensibility. On each and every layer of
    this
    stack.

    Hope this helps .. feel free to ask more/further!

    /Tobias

     >
     > Thanks to anyone who replies.
     >
     > --
     > 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 autobah...@googlegroups.com <javascript:>
     > <mailto:autobahnws+...@googlegroups.com <javascript:>>.
     > For more options, visit https://groups.google.com/d/optout
    <https://groups.google.com/d/optout>.

--
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.

0 Likes

#5

Jess,

I've added a stripped down example here:

https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/beginner

Run:
python server.py
python client.py

This is as minimal as it gets;)

Does that work for you?

Cheers,
/Tobias

···

Am 27.03.2014 21:58, schrieb Jess Updegrove:

When I try to add my own session directly to the server it always gives
me the error:

0 Likes

#6

That’s wonderful, thank you!

···

On Thursday, March 27, 2014 5:33:35 PM UTC-4, Tobias Oberstein wrote:

Am 27.03.2014 21:58, schrieb Jess Updegrove:

When I try to add my own session directly to the server it always gives

me the error:

Jess,

I’ve added a stripped down example here:

https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/beginner

Run:

python server.py

python client.py

This is as minimal as it gets;)

Does that work for you?

Cheers,

/Tobias

0 Likes

#7

Tobias,

I’m getting this error:

2014-04-01 13:18:48-0400 [-] Log opened.
2014-04-01 13:18:48-0400 [-] Unable to write to plugin cache /usr/local/lib/python2.7/dist-packages/twisted/plugins/dropin.cache: error number 13
2014-04-01 13:18:48-0400 [-] Starting factory <autobahn.twisted.websocket.WampWebSocketClientFactory instance at 0x28a6cf8>
2014-04-01 13:18:48-0400 [Uninitialized] Unhandled Error
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/twisted/python/log.py”, line 88, in callWithLogger
return callWithContext({“system”: lp}, func, *args, **kw)
File “/usr/lib/python2.7/dist-packages/twisted/python/log.py”, line 73, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File “/usr/lib/python2.7/dist-packages/twisted/python/context.py”, line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File “/usr/lib/python2.7/dist-packages/twisted/python/context.py”, line 81, in callWithContext
return func(*args,**kw)
— —
File “/usr/lib/python2.7/dist-packages/twisted/internet/posixbase.py”, line 619, in _doReadOrWrite
why = selectable.doWrite()
File “/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py”, line 593, in doConnect
self._connectDone()
File “/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py”, line 612, in _connectDone
self.protocol.makeConnection(self)
File “/usr/lib/python2.7/dist-packages/twisted/internet/protocol.py”, line 460, in makeConnection
self.connectionMade()
File “/usr/lib/python2.7/dist-packages/twisted/internet/_endpointspy3.py”, line 55, in connectionMade
self._wrappedProtocol.makeConnection(self.transport)
File “/usr/lib/python2.7/dist-packages/twisted/internet/protocol.py”, line 460, in makeConnection
self.connectionMade()
File “/usr/local/lib/python2.7/dist-packages/autobahn/twisted/websocket.py”, line 68, in connectionMade
self._connectionMade()
File “/usr/local/lib/python2.7/dist-packages/autobahn/websocket/protocol.py”, line 3584, in _connectionMade
self.startHandshake()
File “/usr/local/lib/python2.7/dist-packages/autobahn/websocket/protocol.py”, line 3733, in startHandshake
request += “Host: %s:%d\x0d\x0a” % (self.factory.host, self.factory.port)
exceptions.TypeError: %d format: a number is required, not NoneType

2014-04-01 13:18:48-0400 [Uninitialized] Stopping factory <autobahn.twisted.websocket.WampWebSocketClientFactory instance at 0x28a6cf8>

Thoughts?

···

On Thursday, March 27, 2014 5:33:35 PM UTC-4, Tobias Oberstein wrote:

Am 27.03.2014 21:58, schrieb Jess Updegrove:

When I try to add my own session directly to the server it always gives

me the error:

Jess,

I’ve added a stripped down example here:

https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/beginner

Run:

python server.py

python client.py

This is as minimal as it gets;)

Does that work for you?

Cheers,

/Tobias

0 Likes

#8

Tobias,

Hello Jess, pls update Autobahn:

pip install --upgrade autobahn

should do the trick ..

···

Am 01.04.2014 19:22, schrieb Jess Updegrove:

I'm getting this error:

2014-04-01 13:18:48-0400 [-] Log opened.
2014-04-01 13:18:48-0400 [-] Unable to write to plugin cache
/usr/local/lib/python2.7/dist-packages/twisted/plugins/dropin.cache:
error number 13
2014-04-01 13:18:48-0400 [-] Starting factory
<autobahn.twisted.websocket.WampWebSocketClientFactory instance at
0x28a6cf8>
2014-04-01 13:18:48-0400 [Uninitialized] Unhandled Error
     Traceback (most recent call last):
       File "/usr/lib/python2.7/dist-packages/twisted/python/log.py",
line 88, in callWithLogger
         return callWithContext({"system": lp}, func, *args, **kw)
       File "/usr/lib/python2.7/dist-packages/twisted/python/log.py",
line 73, in callWithContext
         return context.call({ILogContext: newCtx}, func, *args, **kw)
       File
"/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118,
in callWithContext
         return self.currentContext().callWithContext(ctx, func, *args,
**kw)
       File
"/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81,
in callWithContext
         return func(*args,**kw)
     --- <exception caught here> ---
       File
"/usr/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line
619, in _doReadOrWrite
         why = selectable.doWrite()
       File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py",
line 593, in doConnect
         self._connectDone()
       File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py",
line 612, in _connectDone
         self.protocol.makeConnection(self)
       File
"/usr/lib/python2.7/dist-packages/twisted/internet/protocol.py", line
460, in makeConnection
         self.connectionMade()
       File
"/usr/lib/python2.7/dist-packages/twisted/internet/_endpointspy3.py",
line 55, in connectionMade
         self._wrappedProtocol.makeConnection(self.transport)
       File
"/usr/lib/python2.7/dist-packages/twisted/internet/protocol.py", line
460, in makeConnection
         self.connectionMade()
       File
"/usr/local/lib/python2.7/dist-packages/autobahn/twisted/websocket.py",
line 68, in connectionMade
         self._connectionMade()
       File
"/usr/local/lib/python2.7/dist-packages/autobahn/websocket/protocol.py",
line 3584, in _connectionMade
         self.startHandshake()
       File
"/usr/local/lib/python2.7/dist-packages/autobahn/websocket/protocol.py",
line 3733, in startHandshake
         request += "Host: %s:%d\x0d\x0a" % (self.factory.host,
self.factory.port)
     exceptions.TypeError: %d format: a number is required, not NoneType

2014-04-01 13:18:48-0400 [Uninitialized] Stopping factory
<autobahn.twisted.websocket.WampWebSocketClientFactory instance at
0x28a6cf8>

Thoughts?

On Thursday, March 27, 2014 5:33:35 PM UTC-4, Tobias Oberstein wrote:

    Am 27.03.2014 21:58, schrieb Jess Updegrove:
     > When I try to add my own session directly to the server it always
    gives
     > me the error:

    Jess,

    I've added a stripped down example here:

    https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/beginner
    <https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/beginner>

    Run:
    python server.py
    python client.py

    This is as minimal as it gets;)

    Does that work for you?

    Cheers,
    /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.

0 Likes

#9

Okay, now it worked but it says this:

2014-04-01 13:38:47-0400 [-] Log opened.
2014-04-01 13:38:47-0400 [-] Unable to write to plugin cache /usr/local/lib/python2.7/dist-packages/twisted/plugins/dropin.cache: error number 13
2014-04-01 13:38:47-0400 [-] Starting factory <autobahn.twisted.websocket.WampWebSocketClientFactory instance at 0x2f685a8>
2014-04-01 13:38:47-0400 [-] Stopping factory <autobahn.twisted.websocket.WampWebSocketClientFactory instance at 0x2f685a8>

So the component doesn’t do anything.

Jess

···

On Tuesday, April 1, 2014 1:28:37 PM UTC-4, Tobias Oberstein wrote:

Am 01.04.2014 19:22, schrieb Jess Updegrove:

Tobias,

Hello Jess, pls update Autobahn:

pip install --upgrade autobahn

should do the trick …

I’m getting this error:

2014-04-01 13:18:48-0400 [-] Log opened.

2014-04-01 13:18:48-0400 [-] Unable to write to plugin cache

/usr/local/lib/python2.7/dist-packages/twisted/plugins/dropin.cache:

error number 13

2014-04-01 13:18:48-0400 [-] Starting factory

<autobahn.twisted.websocket.WampWebSocketClientFactory instance at

0x28a6cf8>

2014-04-01 13:18:48-0400 [Uninitialized] Unhandled Error

 Traceback (most recent call last):
   File "/usr/lib/python2.7/dist-packages/twisted/python/log.py",

line 88, in callWithLogger

     return callWithContext({"system": lp}, func, *args, **kw)
   File "/usr/lib/python2.7/dist-packages/twisted/python/log.py",

line 73, in callWithContext

     return context.call({ILogContext: newCtx}, func, *args, **kw)
   File

“/usr/lib/python2.7/dist-packages/twisted/python/context.py”, line 118,

in callWithContext

     return self.currentContext().callWithContext(ctx, func, *args,

**kw)

   File

“/usr/lib/python2.7/dist-packages/twisted/python/context.py”, line 81,

in callWithContext

     return func(*args,**kw)
 --- <exception caught here> ---
   File

“/usr/lib/python2.7/dist-packages/twisted/internet/posixbase.py”, line

619, in _doReadOrWrite

     why = selectable.doWrite()
   File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py",

line 593, in doConnect

     self._connectDone()
   File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py",

line 612, in _connectDone

     self.protocol.makeConnection(self)
   File

“/usr/lib/python2.7/dist-packages/twisted/internet/protocol.py”, line

460, in makeConnection

     self.connectionMade()
   File

“/usr/lib/python2.7/dist-packages/twisted/internet/_endpointspy3.py”,

line 55, in connectionMade

     self._wrappedProtocol.makeConnection(self.transport)
   File

“/usr/lib/python2.7/dist-packages/twisted/internet/protocol.py”, line

460, in makeConnection

     self.connectionMade()
   File

“/usr/local/lib/python2.7/dist-packages/autobahn/twisted/websocket.py”,

line 68, in connectionMade

     self._connectionMade()
   File

“/usr/local/lib/python2.7/dist-packages/autobahn/websocket/protocol.py”,

line 3584, in _connectionMade

     self.startHandshake()
   File

“/usr/local/lib/python2.7/dist-packages/autobahn/websocket/protocol.py”,

line 3733, in startHandshake

     request += "Host: %s:%d\x0d\x0a" % (self.factory.host,

self.factory.port)

 exceptions.TypeError: %d format: a number is required, not NoneType

2014-04-01 13:18:48-0400 [Uninitialized] Stopping factory

<autobahn.twisted.websocket.WampWebSocketClientFactory instance at

0x28a6cf8>

Thoughts?

On Thursday, March 27, 2014 5:33:35 PM UTC-4, Tobias Oberstein wrote:

Am 27.03.2014 21:58, schrieb Jess Updegrove:
 > When I try to add my own session directly to the server it always
gives
 > me the error:
Jess,
I've added a stripped down example here:
[https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/beginner](https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/beginner)
<[https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/beginner](https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/beginner)>
Run:
python server.py
python client.py
This is as minimal as it gets;)
Does that work for you?
Cheers,
/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+unsub...@googlegroups.com.

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

0 Likes

#10

This may be helpful to you:

2014-04-01 13:40:10-0400 [WampWebSocketServerProtocol,4,127.0.0.1] received HTTP headers in opening handshake : {u’upgrade’: u’WebSocket’, u’sec-websocket-version’: u’13’, u’sec-websocket-protocol’: u’wamp.2.json’, u’connection’: u’Upgrade’, u’sec-websocket-key’: u’9L5qC3M/Ae+hCJiojVsCbg==’, u’user-agent’: u’AutobahnPython/0.8.7’, u’host’: u’localhost:80’, u’pragma’: u’no-cache’, u’cache-control’: u’no-cache’}
2014-04-01 13:40:10-0400 [WampWebSocketServerProtocol,4,127.0.0.1] failing WebSocket opening handshake (‘port 80 in HTTP Host header ‘localhost:80’ does not match server listening port None’)
2014-04-01 13:40:10-0400 [WampWebSocketServerProtocol,4,127.0.0.1] TX Octets to 127.0.0.1:33825 : sync = False, octets = 485454502f312e312034303020706f727420383020696e204854545020486f73742068656164657220276c6f63616c686f73743a38302720646f6573206e6f74206d6174636820736572766572206c697374656e696e6720706f7274204e6f6e650d0a0d0a
2014-04-01 13:40:10-0400 [WampWebSocketServerProtocol,4,127.0.0.1] WAMP-over-WebSocket transport lost: wasClean = False, code = 1006, reason = ‘connection was closed uncleanly (None)’
2014-04-01 13:40:10-0400 [WampWebSocketServerProtocol,4,127.0.0.1] connection from 127.0.0.1:33825 lost

···

On Tuesday, April 1, 2014 1:28:37 PM UTC-4, Tobias Oberstein wrote:

Am 01.04.2014 19:22, schrieb Jess Updegrove:

Tobias,

Hello Jess, pls update Autobahn:

pip install --upgrade autobahn

should do the trick …

I’m getting this error:

2014-04-01 13:18:48-0400 [-] Log opened.

2014-04-01 13:18:48-0400 [-] Unable to write to plugin cache

/usr/local/lib/python2.7/dist-packages/twisted/plugins/dropin.cache:

error number 13

2014-04-01 13:18:48-0400 [-] Starting factory

<autobahn.twisted.websocket.WampWebSocketClientFactory instance at

0x28a6cf8>

2014-04-01 13:18:48-0400 [Uninitialized] Unhandled Error

 Traceback (most recent call last):
   File "/usr/lib/python2.7/dist-packages/twisted/python/log.py",

line 88, in callWithLogger

     return callWithContext({"system": lp}, func, *args, **kw)
   File "/usr/lib/python2.7/dist-packages/twisted/python/log.py",

line 73, in callWithContext

     return context.call({ILogContext: newCtx}, func, *args, **kw)
   File

“/usr/lib/python2.7/dist-packages/twisted/python/context.py”, line 118,

in callWithContext

     return self.currentContext().callWithContext(ctx, func, *args,

**kw)

   File

“/usr/lib/python2.7/dist-packages/twisted/python/context.py”, line 81,

in callWithContext

     return func(*args,**kw)
 --- <exception caught here> ---
   File

“/usr/lib/python2.7/dist-packages/twisted/internet/posixbase.py”, line

619, in _doReadOrWrite

     why = selectable.doWrite()
   File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py",

line 593, in doConnect

     self._connectDone()
   File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py",

line 612, in _connectDone

     self.protocol.makeConnection(self)
   File

“/usr/lib/python2.7/dist-packages/twisted/internet/protocol.py”, line

460, in makeConnection

     self.connectionMade()
   File

“/usr/lib/python2.7/dist-packages/twisted/internet/_endpointspy3.py”,

line 55, in connectionMade

     self._wrappedProtocol.makeConnection(self.transport)
   File

“/usr/lib/python2.7/dist-packages/twisted/internet/protocol.py”, line

460, in makeConnection

     self.connectionMade()
   File

“/usr/local/lib/python2.7/dist-packages/autobahn/twisted/websocket.py”,

line 68, in connectionMade

     self._connectionMade()
   File

“/usr/local/lib/python2.7/dist-packages/autobahn/websocket/protocol.py”,

line 3584, in _connectionMade

     self.startHandshake()
   File

“/usr/local/lib/python2.7/dist-packages/autobahn/websocket/protocol.py”,

line 3733, in startHandshake

     request += "Host: %s:%d\x0d\x0a" % (self.factory.host,

self.factory.port)

 exceptions.TypeError: %d format: a number is required, not NoneType

2014-04-01 13:18:48-0400 [Uninitialized] Stopping factory

<autobahn.twisted.websocket.WampWebSocketClientFactory instance at

0x28a6cf8>

Thoughts?

On Thursday, March 27, 2014 5:33:35 PM UTC-4, Tobias Oberstein wrote:

Am 27.03.2014 21:58, schrieb Jess Updegrove:
 > When I try to add my own session directly to the server it always
gives
 > me the error:
Jess,
I've added a stripped down example here:
[https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/beginner](https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/beginner)
<[https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/beginner](https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/beginner)>
Run:
python server.py
python client.py
This is as minimal as it gets;)
Does that work for you?
Cheers,
/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+unsub...@googlegroups.com.

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

0 Likes

#11

Did you restart (also) the server after upgrading? I dont# know, it works for me. Sorry.

···

Am 01.04.2014 19:40, schrieb Jess Updegrove:

This may be helpful to you:

0 Likes

#12

Yea, I restarted everything and it still doesn’t work… I’ll try to figure it out. Thanks though!

···

On Tuesday, April 1, 2014 1:43:36 PM UTC-4, Tobias Oberstein wrote:

Am 01.04.2014 19:40, schrieb Jess Updegrove:

This may be helpful to you:

Did you restart (also) the server after upgrading? I dont# know, it
works for me. Sorry.

0 Likes

#13

Oh! I got it now; sorry, error on my part this time. Thanks again for the help!

Just for future reference, how can I find out if I need to update Autobahn? Are the updates announced anywhere?

···

On Tuesday, April 1, 2014 1:43:36 PM UTC-4, Tobias Oberstein wrote:

Am 01.04.2014 19:40, schrieb Jess Updegrove:

This may be helpful to you:

Did you restart (also) the server after upgrading? I dont# know, it
works for me. Sorry.

0 Likes

#14

Oh! I got it now; sorry, error on my part this time. Thanks again for
the help!

Great! No No problem ..

Just for future reference, how can I find out if I need to update
Autobahn? Are the updates announced anywhere?

Yep, updates are announced usually on this list.

Sidenote: e.g. 0.8.6 came with allowing running with specifying WebSocket URL (and relaxing the checks in that area). And I made use of that in the examples added that you tried ..

···

Am 01.04.2014 19:52, schrieb Jess Updegrove:

On Tuesday, April 1, 2014 1:43:36 PM UTC-4, Tobias Oberstein wrote:

    Am 01.04.2014 19:40, schrieb Jess Updegrove:
     > This may be helpful to you:

    Did you restart (also) the server after upgrading? I dont# know, it
    works for me. Sorry.

--
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.

0 Likes