pomelo-admin-web 监测不到服务器运行数据,求大神解答~ 控制台报错:Failed to load resource , http://localhost:3005/socket.io/1/?t=1359170043036 ,浏览器用的chrome
// app configure app.configure('production|development’, function() { // enable the system monitor modules app.enable(‘systemMonitor’);
// route configures
app.route('chat', routeUtil.chat);
// filter configures
app.filter(pomelo.timeout());
});
是否增加了systemMonitor配置??
已经添加
app.configure('production|development’, function() { app.enable(‘systemMonitor’); var sceneInfo = require(‘./app/modules/sceneInfo’); var onlineUser = require(‘./app/modules/onlineUser’); if(typeof app.registerAdmin === ‘function’){ app.registerAdmin(sceneInfo, {app: app}); app.registerAdmin(onlineUser, {app: app}); } //Set areasIdMap, a map from area id to serverId. if (app.serverType !== ‘master’) { var areas = app.get(‘servers’).area; var areaIdMap = {}; for(var id in areas){ areaIdMap[areas[id].area] = areas[id].id; } app.set('areaIdMap’, areaIdMap); } // proxy configures app.set('proxyConfig’, { cacheMsg: true, interval: 30, lazyConnection: true, enableRpcLog: true });
// remote configures
app.set('remoteConfig', {
cacheMsg: true,
interval: 30
});
// route configures
app.route('area', routeUtil.area);
app.route('connector', routeUtil.connector);
app.loadConfig('mysql', app.getBase() + '/../shared/config/mysql.json');
app.filter(pomelo.timeout());
});
经过查证,发下没有连接上服务器,控制台有crash的log,[client],[browser-1359358598093],[1359358932213],[disconnect] ,原因未知 ,@halfblood @yourihua
查了两天,终于能显示了,还改了pomelo底层的代码 在addLoginedUser的时候,component.connection 的值未定义,搜了好久也没发现这个是在哪赋值的,手动加了 component.connection = component.app.components.connection; 然后就OK了(代码位置:pomelo/lib/components/connector.js 120行)@yourihua @halfblood