[users at bb.net] 0.9.0rc2 and multi-master

Neil Gilmore ngilmore at grammatech.com
Fri Sep 2 19:25:20 UTC 2016


Hi Pierre,

That should be easy enough to remedy. And there was something tickling 
my mind about unicode. It's still odd that it happens when it happens, 
though. We'll see how it changes things.

I can't promise a how-to, though I surely wouldn't mind writing one.

Thanks for the advice.

Neil Gilmore
grammatech.com

On 9/2/2016 1:45 PM, Pierre Tardy wrote:
> Hi Neil,
>
> Nice to hear you are making progress on multimaster
>
> >assert(realm is None or type(realm) == six.text_type)
>
> six.text_type means unicode.
> So on python2.7, you need to use u'buildbot' for the realm config.
>
> Thanks for your patience.
> Once you got it figured out, I would love if you can contribute a 
> multimaster how-to.
>
> Regards,
> Pierre
>
>
> Le ven. 2 sept. 2016 à 18:58, Neil Gilmore <ngilmore at grammatech.com 
> <mailto:ngilmore at grammatech.com>> a écrit :
>
>     Hi everyone,
>
>     Getting multi-master to work has only gone so far.
>
>     I can set up a database and have masters talk to it just fine. And the
>     masters can mostly function correctly. I'm using mostly
>     master.cfg.sample instead of our own because I want something
>     smaller. I
>     have 2 masters that are mostly the same except for various names, and
>     only 1 is running a UI.
>
>     I don't seem to be able to have them talk to crossbar. And there's not
>     many log messages giving me a clue as to what's going on. I suspect my
>     crossbar configuration. But the default configuration with a changed
>     realm and port doesn't seem to work, either.
>
>     My first attempt had this:
>     c['mq'] = {
>          'type' : 'wamp',
>          'router_url': 'ws://ws/buildbot',
>          'realm': 'buildbot',
>          'debug' : True,
>          'debug_websockets' : True,
>          'debug_lowlevel' : True,
>     }
>
>     Obviously incorrect, as there's no host:port in there. Using my
>     handwritten config.json on the crossbar side, here's what happens.
>     Crossbar starts, and since I'm not putting the log in a file, I
>     can see
>     it on my terminal, and it looks fine enough. Then I start
>     buildbot, and
>     the only entries I see that might be relevant are:
>     2016-09-02 12:34:50-0400 [-] Starting wamp with config: %r {'realm':
>     'buildbot', 'debug_lowlevel': True, 'router_url': 'ws://ws/buildbot',
>     'debug': True, 'debug_websockets': True, 'type': 'wamp'}
>     2016-09-02 12:34:50-0400 [-] Starting factory
>     <autobahn.twisted.websocket.WampWebSocketClientFactory object at
>     0x7fb21ffd3ed0>
>     2016-09-02 12:35:20-0400 [-] Stopping factory
>     <autobahn.twisted.websocket.WampWebSocketClientFactory object at
>     0x7fb21ffd3ed0>
>
>     and that's it. OK, so I put in the host:port into master.cfg:
>     c['mq'] = {
>          'type' : 'wamp',
>          'router_url': 'ws://127.0.0.1:8020/ws/buildbot
>     <http://127.0.0.1:8020/ws/buildbot>',
>          'realm': 'buildbot',
>          'debug' : True,
>          'debug_websockets' : True,
>          'debug_lowlevel' : True,
>     }
>
>     and my config.json looks like the one in the crossbar defaults, except
>     for the transport, which looks like this:
>                  "transports": [
>                      {
>                          "type": "websocket",
>                          "endpoint": {
>                              "type": "tcp",
>                              "port": 8020
>                          },
>                          "url": "ws://ws/buildbot",
>                          "auth": {
>                              "anonymous": {
>                                  "type": "static",
>                                  "role": "public"
>                              }
>                          }
>                      }
>                  ]
>
>     and try again. This time, I get a crossbar log entry:
>     2016-09-02T12:38:48-0400 [Router      31742] failing WebSocket opening
>     handshake ('port 8020 in HTTP Host header '127.0.0.1:8020
>     <http://127.0.0.1:8020>' does not
>     match server listening port 80')
>     and on buildbot:
>     2016-09-02 12:38:48-0400 [-] Starting wamp with config: %r {'realm':
>     'buildbot' , 'debug_lowlevel': True, 'router_url':
>     'ws://127.0.0.1:8020/ws/buildbot
>     <http://127.0.0.1:8020/ws/buildbot>', 'deb ug': True,
>     'debug_websockets':
>     True, 'type': 'wamp'}
>     2016-09-02 12:38:48-0400 [-] Starting factory
>     <autobahn.twisted.websocket.WampWebSocketClientFactory object at
>     0x7f89de379950>
>     2016-09-02 12:38:48-0400 [-] failing WebSocket opening handshake
>     ('WebSocket connection upgrade failed (400 -
>     port8020inHTTPHostheader'127.0.0.1:8020'doesnotmatchserverlisteningport80)')
>     2016-09-02 12:38:48-0400 [-] Stopping factory
>     <autobahn.twisted.websocket.WampWebSocketClientFactory object at
>     0x7f89de379950>
>
>     Betterm I think. At least I get an error, and both sides agree.
>     But why
>     is my crossbar listening on 80 when I told it 8020? OK, we'll try port
>     80 then...
>
>     (same mq, just change the port)
>
>     No messages from crossbar. From buildbot:
>     2016-09-02 12:42:07-0400 [-] Starting wamp with config: %r {'realm':
>     'buildbot', 'debug_lowlevel': True, 'router_url':
>     'ws://127.0.0.1:80/ws/buildbot <http://127.0.0.1:80/ws/buildbot>',
>     'debug': True, 'debug_websockets':
>     True, 'type': 'wamp'}
>     2016-09-02 12:42:07-0400 [-] Starting factory
>     <autobahn.twisted.websocket.WampWebSocketClientFactory object at
>     0x7f33e87d7650>
>     2016-09-02 12:42:07-0400 [-] failing WebSocket opening handshake
>     ('WebSocket connection upgrade failed (404 - NotFound)')
>     2016-09-02 12:42:07-0400 [-] Stopping factory
>     <autobahn.twisted.websocket.WampWebSocketClientFactory object at
>     0x7f33e87d7650>
>
>     So no connection there, either.
>
>     OK, we'll try the default config.json, and only change the port. It's
>     transports look like this:
>                  "transports": [
>                      {
>                          "type": "universal",
>                          "endpoint": {
>                              "type": "tcp",
>                              "port": 8020
>                          },
>                          "websocket": {
>                              "ws": {
>                                  "type": "websocket"
>                              }
>                          }
>                      }
>                  ]
>
>     We'll also have to change master.cfg to match urls:
>     c['mq'] = {
>          'type' : 'wamp',
>          'router_url': 'ws://127.0.0.1:8020/ws
>     <http://127.0.0.1:8020/ws>',
>          'realm': 'buildbot',
>          'debug' : True,
>          'debug_websockets' : True,
>          'debug_lowlevel' : True,
>     }
>
>     Crossbar starts fine. Buildbot excepts:
>     2016-09-02 12:52:46-0400 [-] Starting wamp with config: %r {'realm':
>     'buildbot', 'debug_lowlevel': True, 'router_url':
>     'ws://127.0.0.1:8020/ws <http://127.0.0.1:8020/ws>', 'debug':
>     True, 'debug_websockets': True,
>     'type': 'wamp'}
>     2016-09-02 12:52:46-0400 [-] Starting factory
>     <autobahn.twisted.websocket.WampWebSocketClientFactory object at
>     0x7fdd9d381890>
>     2016-09-02 12:52:46-0400 [-] Traceback (most recent call last):
>                File
>     "/leg0/ngilmore/abyss/lib/python2.7/site-packages/autobahn-0.16.0-py2.7.egg/autobahn/wamp/websocket.py",
>     line 60, in onOpen
>                  self._session = self.factory._factory()
>                File
>     "/leg0/ngilmore/abyss/lib/python2.7/site-packages/autobahn-0.16.0-py2.7.egg/autobahn/twisted/wamp.py",
>     line 639, in create
>                  cfg = ComponentConfig(self.realm, self.extra)
>                File
>     "/leg0/ngilmore/abyss/lib/python2.7/site-packages/autobahn-0.16.0-py2.7.egg/autobahn/wamp/types.py",
>     line 84, in __init__
>                  assert(realm is None or type(realm) == six.text_type)
>              AssertionError
>
>     2016-09-02 12:52:46-0400 [-] Stopping factory
>     <autobahn.twisted.websocket.WampWebSocketClientFactory object at
>     0x7fdd9d381890>
>
>     Any idea where I'm going wrong?
>
>     Neil Gilmore
>     grammatech.com <http://grammatech.com>
>     _______________________________________________
>     users mailing list
>     users at buildbot.net <mailto:users at buildbot.net>
>     https://lists.buildbot.net/mailman/listinfo/users
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20160902/d76b7c2a/attachment.html>


More information about the users mailing list