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