添加gate服务器,启动失败

    "connector": [
    {"id": "connector-server-1", "host": "127.0.0.1", "port": 3150, "clientHost": "127.0.0.1", "clientPort": 3010, "frontend": true},
    {"id": "connector-server-2", "host": "127.0.0.1", "port": 3151, "clientHost": "127.0.0.1", "clientPort": 3011, "frontend": true}
],
"gate":[
     {"id": "gate-server-1", "host": "127.0.0.1", "clientPort": 3014, "frontend": true}
]

配置是这样填的
在app.js里面添加了下面的代码

app.configure('production|development', 'gate', function(){
app.set('connectorConfig',
    {
        connector : pomelo.connectors.hybridconnector,
        heartbeat : 3,
        useDict : true,
        useProtobuf : true
    });

});

但是gate服务器还是启动不了,报错信息是:server "gate-server-1" "gate" register master failed

标签: pomelo 开发求助
Coder0xAQ 在 2016-3-18 18:11发布 分享到 weibo
1 回复
#1 stevenGerrard 2-6 11:43 回复

config/adminServer.json添加新增的gate的token就可以解决了;
{
"type": "gate",
"token": "agarxhqb98rpajloaxn34ga8xrunpagkjwlaw3ruxnpaagl29w4123"
}

回到顶部