Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加worker端口时出错 #2

Closed
wdfsinap opened this issue Apr 9, 2015 · 4 comments
Closed

增加worker端口时出错 #2

wdfsinap opened this issue Apr 9, 2015 · 4 comments
Labels

Comments

@wdfsinap
Copy link

wdfsinap commented Apr 9, 2015

我在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)

请问如何解决

@keenwon
Copy link
Owner

keenwon commented Apr 9, 2015

完整的config.js贴上来看看

@wdfsinap
Copy link
Author

wdfsinap commented Apr 9, 2015

'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
    }

}

};

@wdfsinap
Copy link
Author

wdfsinap commented Apr 9, 2015

解决了,3004:{}后面加个“,”就行了

@lock
Copy link

lock bot commented Dec 28, 2018

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.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants