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

ngilmore ngilmore at grammatech.com
Tue Sep 6 02:31:52 UTC 2016


Hi Pierre,

Yes, changing the realm to unicode worked. Both masters say they're 
connected to wamp. And getting the log level on crossbar to debug seems 
to indicate that both masters are connected to it. And his time I got 
the expected behaviot of the master shutting down if crossbar stops 
running. That's still kind of a problem in my case, as we'd certainly 
prefer that masters kept running. I don't think you could keep them 
running without the database, though.

However, not everything is perfect. For example, I do not get a force 
build button on the non-UI master's builder (nor a 'clear the queue' 
button). That will drive my users crazy for sure.

And I'm not sure how to determine whether the masters are talking to 
each other or that the UI master is just reading the database for the 
other masters' information.

I'll be messing with it more tomorrow. There's always the possibility 
I've messed up in my master.cfg's somehow. Still, I'm closer.

Neil Gilmore
grammatech.com

On 2016-09-02 14:25, Neil Gilmore wrote:
> 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 [18]> 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 [1]',
>>>      '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 [2]',
>>> '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:// [3]127.0.0.1:8020/ws/buildbot [4]',
>>>      '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" [5],
>>>                      "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 [6]'
>>> 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:// [7]127.0.0.1:8020/ws/buildbot [8]', '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:// [9]127.0.0.1:80/ws/buildbot [10]', '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:// [11]127.0.0.1:8020/ws [12]',
>>>      '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:// [13]127.0.0.1:8020/ws [14]', '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 [15]
>>> _______________________________________________
>>> users mailing list
>>> users at buildbot.net [16]
>>> https://lists.buildbot.net/mailman/listinfo/users [17]
>
>
>
> Links:
> ------
> [1] http://placid.grammatech.com/ws://ws/buildbot
> [2] http://placid.grammatech.com/ws://ws/buildbot
> [3] http://placid.grammatech.com/ws://
> [4] http://127.0.0.1:8020/ws/buildbot
> [5] http://placid.grammatech.com/ws://ws/buildbot
> [6] http://127.0.0.1:8020
> [7] http://placid.grammatech.com/ws://
> [8] http://127.0.0.1:8020/ws/buildbot
> [9] http://placid.grammatech.com/ws://
> [10] http://127.0.0.1:80/ws/buildbot
> [11] http://placid.grammatech.com/ws://
> [12] http://127.0.0.1:8020/ws
> [13] http://placid.grammatech.com/ws://
> [14] http://127.0.0.1:8020/ws
> [15] http://grammatech.com
> [16] mailto:users at buildbot.net
> [17] https://lists.buildbot.net/mailman/listinfo/users
> [18] mailto:ngilmore at grammatech.com



More information about the users mailing list