keenwon / antcolony Goto Github PK
View Code? Open in Web Editor NEWNodejs实现的一个磁力链接爬虫 https://findit.keenwon.com (原域名http://findit.so )
Nodejs实现的一个磁力链接爬虫 https://findit.keenwon.com (原域名http://findit.so )
Findit站点本身(express.js、nginx)---能否把这个简单程序共享出来
我也是按找教程来的安装,但还是pm2 还是错误;
[worker[3001]-1 (out)] 'redis error: Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED'
[male[1]-2 (out)] 'redis error: Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED'
[female[1]-3 (out)] 'redis error: Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED'
[worker[3000]-0 (out)] 'redis error: Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED'
[worker[3001]-1 (out)] 'redis error: Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED'
[male[1]-2 (out)] 'redis error: Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED'
[female[1]-3 (out)] 'redis error: Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED'
[worker[3000]-0 (out)] 'redis error: Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED'
[worker[3001]-1 (out)] 'redis error: Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED'
[male[1]-2 (out)] 'redis error: Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED'
[female[1]-3 (out)] 'redis error: Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED'
dist目录下就是用来部署的文件--能否把这个文件发出来
mac 系统,最新版本的操作系统,普通用户
npm install [email protected] --save -g
报错
[email protected] preinstall /usr/local/lib/node_modules/.staging/pm2-d445599b
bash ./scripts/preinstall.sh
/usr/local/bin/pm2 -> /usr/local/lib/node_modules/pm2/bin/pm2
[email protected] install /usr/local/lib/node_modules/pm2/node_modules/fsevents
node-gyp rebuild
CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
../../nan/nan.h:339:13: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
~~~~~~~~~~~~^
../../nan/nan.h:343:5: error: no member named 'ThrowException' in namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
~~~~^
../../nan/nan.h:343:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
~~~~~~~~~~~~^
../../nan/nan.h:348:9: error: no type named 'ThrowException' in namespace 'v8'
v8::ThrowException(error);
~~~~^
../../nan/nan.h:355:65: error: no member named 'New' in 'v8::String'
v8::Localv8::Value err = v8::Exception::Error(v8::String::New(msg));
~~~~~~~~~~~~^
../../nan/nan.h:357:26: error: no member named 'New' in 'v8::String'
obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber));
~~~~~~~~~~~~^
../../nan/nan.h:369:12: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
~~~~~~~~~~~~^
../../nan/nan.h:373:5: error: no member named 'ThrowException' in namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
~~~~^
../../nan/nan.h:373:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
~~~~~~~~~~~~^
../../nan/nan.h:377:12: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
~~~~~~~~~~~~^
../../nan/nan.h:381:5: error: no member named 'ThrowException' in namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
~~~~^
../../nan/nan.h:381:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:324:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg));
^~~~~~~~~~~~~~~~~~~~~~~
../../nan/nan.h:319:50: note: expanded from macro '_NAN_ERROR'
~~~~~~~~~~~~^
../../nan/nan.h:406:13: error: no member named 'smalloc' in namespace 'node'
, node::smalloc::FreeCallback callback
~~~~~~^
../../nan/nan.h:141:71: note: expanded from macro 'NAN_INLINE'
^
../../nan/nan.h:416:12: error: no matching function for call to 'New'
return node::Buffer::New(data, size);
^~~~~~~~~~~~~~~~~
/Users/xiatian/.node-gyp/6.2.2/include/node/node_buffer.h:31:40: note:
candidate function not viable: no known conversion from 'char ' to
'v8::Isolate *' for 1st argument
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate isolate, size_t length);
^
/Users/xiatian/.node-gyp/6.2.2/include/node/node_buffer.h:34:40: note:
candidate function not viable: no known conversion from 'char ' to
'v8::Isolate *' for 1st argument
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate isolate,
^
/Users/xiatian/.node-gyp/6.2.2/include/node/node_buffer.h:39:40: note:
candidate function not viable: requires 5 arguments, but 2 were provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
/Users/xiatian/.node-gyp/6.2.2/include/node/node_buffer.h:46:40: note:
candidate function not viable: requires 3 arguments, but 2 were provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:420:12: error: no matching function for call to 'New'
return node::Buffer::New(size);
^~~~~~~~~~~~~~~~~
/Users/xiatian/.node-gyp/6.2.2/include/node/node_buffer.h:31:40: note:
candidate function not viable: requires 2 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate, size_t length);
^
/Users/xiatian/.node-gyp/6.2.2/include/node/node_buffer.h:34:40: note:
candidate function not viable: requires at least 2 arguments, but 1 was
provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
/Users/xiatian/.node-gyp/6.2.2/include/node/node_buffer.h:39:40: note:
candidate function not viable: requires 5 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
/Users/xiatian/.node-gyp/6.2.2/include/node/node_buffer.h:46:40: note:
candidate function not viable: requires 3 arguments, but 1 was provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:427:26: error: no member named 'Use' in namespace 'node::Buffer'
return node::Buffer::Use(data, size);
~~~~~~~~~~~~~~^
../../nan/nan.h:727:49: error: too few arguments to function call, single
argument 'isolate' was not specified
v8::Localv8::Object obj = v8::Object::New();
~~~~~~~~~~~~~~~ ^
/Users/xiatian/.node-gyp/6.2.2/include/node/v8.h:2986:3: note: 'New' declared
here
static Local New(Isolate* isolate);
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:733:49: error: too few arguments to function call, single
argument 'isolate' was not specified
v8::Localv8::Object obj = v8::Object::New();
~~~~~~~~~~~~~~~ ^
/Users/xiatian/.node-gyp/6.2.2/include/node/v8.h:2986:3: note: 'New' declared
here
static Local New(Isolate* isolate);
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:740:12: error: no member named 'Dispose' in
'v8::Persistent<v8::Object, v8::NonCopyablePersistentTraitsv8::Object >'
handle.Dispose();
~~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Darwin 15.5.0
gyp ERR! command "/usr/local/Cellar/node/6.2.2/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/pm2/node_modules/fsevents
gyp ERR! node -v v6.2.2
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN install:[email protected] [email protected] install: node-gyp rebuild
npm WARN install:[email protected] Exit status 1
[email protected] postinstall /usr/local/lib/node_modules/pm2
bash ./scripts/postinstall.sh
只会python 爬虫 node.JS的看不懂
2015-04-21T13:41:51.727+0800 [initandlisten] MongoDB starting : pid=606 port=27017 dbpath=/usr/src/mongodb-linux-x86_64-2.6.4/db 64-bit host=talway
2015-04-21T13:41:51.727+0800 [initandlisten]
2015-04-21T13:41:51.727+0800 [initandlisten] ** WARNING: You are running in OpenVZ which can cause issues on versions of RHEL older than RHEL6.
2015-04-21T13:41:51.731+0800 [initandlisten]
2015-04-21T13:41:51.731+0800 [initandlisten] db version v2.6.4
2015-04-21T13:41:51.732+0800 [initandlisten] git version: 3a830be0eb92d772aa855ebb711ac91d658ee910
2015-04-21T13:41:51.732+0800 [initandlisten] build info: Linux build7.nj1.10gen.cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
2015-04-21T13:41:51.732+0800 [initandlisten] allocator: tcmalloc
2015-04-21T13:41:51.732+0800 [initandlisten] options: { processManagement: { fork: true }, security: { authorization: "enabled" }, storage: { dbPath: "/usr/src/mongodb-linux-x86_64-2.6.4/db" }, systemLog: { destination: "file", path: "/usr/src/mongodb-linux-x86_64-2.6.4/log/mongodb.log" } }
2015-04-21T13:41:51.744+0800 [initandlisten] journal dir=/usr/src/mongodb-linux-x86_64-2.6.4/db/journal
2015-04-21T13:41:51.744+0800 [initandlisten] recover : no journal files present, no recovery needed
2015-04-21T13:41:51.994+0800 [initandlisten] waiting for connections on port 27017
2015-04-21T13:41:52.273+0800 [initandlisten] connection accepted from 104.238.160.31:33275 #1 (1 connection now open)
2015-04-21T13:41:52.311+0800 [initandlisten] connection accepted from 104.238.160.31:33277 #2 (2 connections now open)
2015-04-21T13:41:52.387+0800 [initandlisten] connection accepted from 104.238.160.31:33279 #3 (3 connections now open)
2015-04-21T13:41:52.427+0800 [initandlisten] connection accepted from 104.238.160.31:33280 #4 (4 connections now open)
2015-04-21T13:41:52.493+0800 [initandlisten] connection accepted from 104.238.160.31:33281 #5 (5 connections now open)
2015-04-21T13:41:52.517+0800 [initandlisten] connection accepted from 104.238.160.31:33283 #6 (6 connections now open)
2015-04-21T13:41:52.520+0800 [initandlisten] connection accepted from 104.238.160.31:33284 #7 (7 connections now open)
2015-04-21T13:41:52.547+0800 [initandlisten] connection accepted from 104.238.160.31:33286 #8 (8 connections now open)
2015-04-21T13:41:52.579+0800 [initandlisten] connection accepted from 104.238.160.31:33289 #9 (9 connections now open)
2015-04-21T13:41:52.594+0800 [initandlisten] connection accepted from 104.238.160.31:33290 #10 (10 connections now open)
2015-04-21T13:41:52.620+0800 [initandlisten] connection accepted from 104.238.160.31:33292 #11 (11 connections now open)
2015-04-21T13:41:52.622+0800 [initandlisten] connection accepted from 104.238.160.31:33291 #12 (12 connections now open)
2015-04-21T13:41:52.647+0800 [initandlisten] connection accepted from 104.238.160.31:33293 #13 (13 connections now open)
2015-04-21T13:41:52.685+0800 [initandlisten] connection accepted from 104.238.160.31:33294 #14 (14 connections now open)
2015-04-21T13:41:52.696+0800 [initandlisten] connection accepted from 104.238.160.31:33295 #15 (15 connections now open)
2015-04-21T13:41:52.729+0800 [initandlisten] connection accepted from 104.238.160.31:33296 #16 (16 connections now open)
2015-04-21T13:41:52.744+0800 [initandlisten] connection accepted from 104.238.160.31:33297 #17 (17 connections now open)
2015-04-21T13:41:52.751+0800 [initandlisten] connection accepted from 104.238.160.31:33298 #18 (18 connections now open)
2015-04-21T13:41:52.777+0800 [initandlisten] connection accepted from 104.238.160.31:33300 #19 (19 connections now open)
2015-04-21T13:41:52.792+0800 [initandlisten] connection accepted from 104.238.160.31:33301 #20 (20 connections now open)
2015-04-21T13:41:52.839+0800 [initandlisten] connection accepted from 104.238.160.31:33302 #21 (21 connections now open)
2015-04-21T13:41:52.862+0800 [initandlisten] connection accepted from 104.238.160.31:33303 #22 (22 connections now open)
2015-04-21T13:41:52.893+0800 [initandlisten] connection accepted from 104.238.160.31:33305 #23 (23 connections now open)
2015-04-21T13:41:52.897+0800 [initandlisten] connection accepted from 104.238.160.31:33304 #24 (24 connections now open)
2015-04-21T13:41:52.925+0800 [conn15] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:52.928+0800 [conn10] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:52.931+0800 [conn1] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:52.933+0800 [conn5] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:52.939+0800 [conn3] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:52.949+0800 [initandlisten] connection accepted from 104.238.160.31:33306 #25 (25 connections now open)
2015-04-21T13:41:52.954+0800 [conn7] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:52.954+0800 [conn11] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:52.955+0800 [conn2] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:52.956+0800 [initandlisten] connection accepted from 104.238.160.31:33307 #26 (26 connections now open)
2015-04-21T13:41:52.969+0800 [conn4] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:52.973+0800 [conn17] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:52.993+0800 [initandlisten] connection accepted from 104.238.160.31:33308 #27 (27 connections now open)
2015-04-21T13:41:53.013+0800 [initandlisten] connection accepted from 104.238.160.31:33309 #28 (28 connections now open)
2015-04-21T13:41:53.112+0800 [initandlisten] connection accepted from 104.238.160.31:33310 #29 (29 connections now open)
2015-04-21T13:41:53.177+0800 [conn16] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:53.179+0800 [conn12] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:53.180+0800 [conn21] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:53.181+0800 [conn25] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:53.181+0800 [conn26] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:53.182+0800 [conn6] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:53.183+0800 [conn18] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:53.184+0800 [conn13] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:53.189+0800 [conn8] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:53.192+0800 [conn22] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:53.222+0800 [initandlisten] connection accepted from 104.238.160.31:33311 #30 (30 connections now open)
2015-04-21T13:41:53.232+0800 [conn23] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:53.234+0800 [conn9] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:53.236+0800 [conn20] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:53.237+0800 [conn14] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:53.249+0800 [conn28] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:53.434+0800 [conn19] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:53.438+0800 [conn27] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:53.450+0800 [conn30] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:53.451+0800 [conn29] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
2015-04-21T13:41:53.452+0800 [conn24] authenticate db: antcolony { authenticate: 1, user: "antcolony", nonce: "xxx", key: "xxx" }
我希望部署您的项目 AntColon,根据 Readme.md 中提到的安装了环境 NodeJS、MongoDB、Redis、Elasticsearch、PM2,并且配置了 config.js。
执行命令 node startup worker 3000 并没有得到任何反应,我并没有使用过 pm2,使用据我推测的命令 pm2 list 得到的列表里并没有应用,简单阅读了应用的源代码我仍然没有任何头绪。
[cenegd@iZ28acwb340Z antcolony-master]$ node startup worker 3000
[cenegd@iZ28acwb340Z antcolony-master]$
[cenegd@iZ28acwb340Z antcolony-master]$ pm2 list
┌──────────┬────┬──────┬─────┬────────┬─────────┬────────┬────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
└──────────┴────┴──────┴─────┴────────┴─────────┴────────┴────────┴──────────┘
Use pm2 show <id|name>
to get more details about an app
[cenegd@iZ28acwb340Z antcolony-master]$
Error: Cannot find module 'winston'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Function._load (/usr/local/lib/node_modules/pm2/node_modules/pmx/lib/transaction.js:62:21)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
$ npm install -g winston
is ok
我在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)
请问如何解决
_worker[3000]-0 (out):_ _##############################################################_
_worker[3000]-0 (out): #_
_worker[3000]-0 (out): # !!! MONGOOSE WARNING !!!_
_worker[3000]-0 (out): #_
_worker[3000]-0 (out): # This is an UNSTABLE release of Mongoose._
_worker[3000]-0 (out): # Unstable releases are available for preview/testing only._
_worker[3000]-0 (out): # DO NOT run this in production._
_worker[3000]-0 (out): #_
_worker[3000]-0 (out):_ _##############################################################_
_2015-05-31T00:25:43.449+0800 [conn2] end connection 127.0.0.1:35222 (19 connections now open)_
_2015-05-31T00:25:43.449+0800 [conn5] end connection 127.0.0.1:35225 (19 connections now open)_
...
_2015-05-31T00:25:44.132+0800 [initandlisten] connection accepted from 127.0.0.1:35251 #21 (1 connection now open)_
_2015-05-31T00:25:44.150+0800 [initandlisten] connection accepted from 127.0.0.1:35254 #22 (2 connections now open)_
...
_==> /var/log/redis.log <==_
_1569:M 31 May 00:28:42.083 * 10 changes in 300 seconds. Saving..._
_1569:M 31 May 00:28:42.085 * Background saving started by pid 2948_
_2948:C 31 May 00:28:42.088 * DB saved on disk_
_2948:C 31 May 00:28:42.089 * RDB: 4 MB of memory used by copy-on-write_
_1569:M 31 May 00:28:42.185 * Background saving terminated with success_
_==> /home/local/mongodb/log/mongodb.log <==_
_2015-05-31T00:29:42.067+0800 [clientcursormon] mem (MB) res:82 virt:942_
_2015-05-31T00:29:42.067+0800 [clientcursormon] mapped (incl journal view):640_
_2015-05-31T00:29:42.067+0800 [clientcursormon] connections:20_
female.js 中,使用fs.readFileSync
读取种子文件,对于特别的大的种子,可能会造成内存泄露,切换为fs.createReadStream
执行node startup worker 3000报错
node startup worker 3000
Error: Expect "max_memory_restart" to be a typeof [object String] / [object Number], but now is [object Object]
at Object.Common.verifyConfs (D:\nodejs\node_modules\pm2\lib\Common.js:834:14)
at API._startScript (D:\nodejs\node_modules\pm2\lib\API.js:701:27)
at API.start (D:\nodejs\node_modules\pm2\lib\API.js:334:12)
at D:\nodejs\antcolony\startup:20:13
at D:\nodejs\node_modules\pm2\lib\API.js:187:16
at D:\nodejs\node_modules\pm2\lib\API\Modules\Modularizer.js:79:19
at wrapper (D:\nodejs\node_modules\pm2\node_modules\async\internal\once.js:12:16)
at replenish (D:\nodejs\node_modules\pm2\node_modules\async\internal\eachOfLimit.js:76:25)
at D:\nodejs\node_modules\pm2\node_modules\async\internal\eachOfLimit.js:86:9
at eachLimit (D:\nodejs\node_modules\pm2\node_modules\async\eachLimit.js:47:43)
pm2运行显示正常
redis里有数据,但.temp和mongodb没有数据
male 和 female也运行了的
日志里也没有错误,怎么回事
等了半天,也没没数据啊,是不是要配置开放端口啥的
'use strict';
module.exports = {
debug: true,
// TODO:绑定address
//address:'127.0.0.1',
// redis相关
//redisHost: '<设置redis地址>', // 服务器
redisHost: '127.0.0.1',
redisPort: 6379,
redisAuth: 'a426416',
// mongodb相关
//mongodbHost: '<设置mongodb地址>', // 服务器
mongodbHost: '127.0.0.1',
mongodbPort: 27017,
mongodbDatabase: 'antcolony',
mongodbUserName: 'antcolony',
mongodbPassword: 'a426416',
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: 20
},
3003: {
sended: true,
cycle: 20
},
3004: {
sended: true,
cycle: 20
}
}
};
AntColony部署文档 --能否写的在小白点,前端网页 数据库分离
ElasticSearch 定期同步插件形式,你试试,
https://github.com/richardwilly98/elasticsearch-river-mongodb/
通过ElasticSearch 定期同步MongoDB 数据库,你测试下如何,性能
$ node startup worker 3000 Error: Expect "max_memory_restart" to be a typeof [object String] / [object Numb er], but now is [object Object] at Object.Common.verifyConfs (D:\nodejs\ss\antcolony\node_modules\[email protected]. 1@pm2\lib\Common.js:624:14) at module.exports.API._startScript (D:\nodejs\ss\antcolony\node_modules\_pm2 @2.10.1@pm2\lib\API.js:692:25) at module.exports.API.start (D:\nodejs\ss\antcolony\node_modules\[email protected] @pm2\lib\API.js:325:10) at D:\nodejs\ss\antcolony\startup:20:13 at D:\nodejs\ss\antcolony\node_modules\[email protected]@pm2\lib\API.js:169:14 at D:\nodejs\ss\antcolony\node_modules\[email protected]@pm2\lib\Client.js:54:16 at Timeout._onTimeout (D:\nodejs\ss\antcolony\node_modules\[email protected]@pm2\l ib\Client.js:360:19) at ontimeout (timers.js:466:11) at tryOnTimeout (timers.js:304:5) at Timer.listOnTimeout (timers.js:267:5)
请问这是什么错误哈?
log很长一串不换行
node startup之后停在 Starting PM2 daemon,没有log,排查困难
目前代码生成后,elasticsearch是每天手动更新还是自动更新的,
都更新些什么内容,占用空间大吗?
worker 系统设置是4个,我自己手工增加到10个,能否有快捷命令增加数量
内存或cpu比较多,批量增加有否快捷方式。
// util.format('http://zoink.it/torrent/%s.torrent', _infohash),
// util.format('http://bt.box.n0808.com/%s/%s/%s.torrent', _infohash.substr(0, 2), _infohash.substr(_infohash.length - 2, 2), _infohash),
// util.format('http://torrage.com/torrent/%s.torrent', _infohash),
// util.format('http://torrage.luisaranguren.com/torrent/%s.torrent', _infohash),
util.format('http://thetorrent.org/%s.torrent', _infohash)
这些地址貌似都过期了。我手动上传种子torrent 到.temp目录里,可以解析 但是就是无法下载。求大神推荐个可以下载的torrent托管站
还是说家庭网络里面运行也能有数据?
var fs = require('fs'),
path = require('path'),
download = require('./download');
// 保存文件
save = function (_infohash, data) {
var filePath = path.join( _infohash + '.torrent');
fs.writeFile(filePath, data,function (err) {
if (err) {
logger.error(err);
}
});
};
var url="http://itorrents.org/torrent/B415C913643E5FF49FE37D304BBB5E6E11AD5101.torrent";
_infohash='B415C913643E5FF49FE37D304BBB5E6E11AD5101';
download(url, function (err, data) {
//clearTimeout(timer);
if (err) {
// 下载失败,但是这里要响应为'成功',以进入下一个地址的下载
callback(null);
} else {
save(_infohash, data);
// callback('success');
}
});
保存torrent可以保存,而且torrent托管站的用浏览器下的torrent文件可以用迅雷解析,也能被程序解析到mongo里。但是用fs.writeFile保存后编码和原来的编码不一样 导致不能解析。大神怎么破?
安装好服务器环境,如何实现前端访问的?
爬虫
入库
数据库
如何分离
数据库 我是安装另外一天机器上,远程到这台的;
安装数据库时建立了数据库和用户密码;
在提示成功后
查询是否有入库时,提示出错了;
db.yourColl.count();
2015-04-20T22:31:29.448+0800 count failed: {
"ok" : 0,
"errmsg" : "not authorized on antcolony to execute command { count: "yourColl", query: {}, fields: {} }",
"code" : 13
} at src/mongo/shell/query.js:191
如果可以合作的话,可添加我的TG:@liuxianran
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.