增加worker端口时出错
wdfsinap opened this issue · comments
我在config.js里新加一个worker,
3005: {
sended: true,
cycle: 10
}
然后node startup worker 3005,提示出错:
/usr/src/antcolony/config.js:65
3005: {
^^^^
SyntaxError: Unexpected number
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/src/antcolony/startup:4:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
请问如何解决
完整的config.js贴上来看看
'use strict';
module.exports = {
debug: true,
// TODO:绑定address
//address:'127.0.0.1',
// redis相关
redisHost: '127.0.0.1', // 服务器
//redisHost: '127.0.0.1',
redisPort: 6379,
redisAuth: '123456',
// mongodb相关
mongodbHost: '127.0.0.1', // 服务器
//mongodbHost: '127.0.0.1',
mongodbPort: 27017,
mongodbDatabase: 'antcolony',
mongodbUserName: 'wico',
mongodbPassword: '123456',
elasticsearchHost: '<设置Elasticsearch地址>', // 127.0.0.1:9200
// bootstrap dht
//'bootstrapAddress': 'dht.transmissionbt.com',
bootstrapAddress: 'router.utorrent.com',
bootstrapPort: 6881,
// remoteNodes数量限制
remoteNodesLimit: 100000,
// 单个worker内存限制
memoryLimit: {
'worker': '65',
'male': '45',
'female': '60'
},
// 保留多少天的热度
hotCounts: 14,
worker: {
3000: {
sended: true, // 是否发送find_node
cycle: 20 // 周期,每隔多少毫秒发送一次find_node。值越小,频率越高
},
3001: {
sended: true,
cycle: 20
},
3002: {
sended: true,
cycle: 10
},
3003: {
sended: true,
cycle: 10
},
3004: {
sended: true,
cycle: 10
}
}
};
解决了,3004:{}后面加个“,”就行了
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.