DEgITx / rats-search

BitTorrent P2P multi-platform search engine for Desktop and Web servers with integrated torrent client.
MIT License
1.62k stars 176 forks source link

Server build problem (spawn ENOENT) #66

Closed ghost closed 5 years ago

ghost commented 5 years ago

When I attempt to install rats search following the instructions on the README.md, the install fails at the 'npm run server' step. My system is a ODROID-C2 (arm64).

Output from 'npm run server'

rats-search@1.0.0 server /home/ratse/rats-search node src/background/server.js

[system] Rats v1.0.0 [system] Listening web server on 8095 port [system] Platform: linux [system] Arch: arm64 [system] OS Release: 3.16.60+ [system] CPU: unknown [system] CPU Logic cores: 4 [system] Total memory: 1984.32 MB [system] Free memory: 123.92 MB [system] NodeJS: v8.14.0 [sphinx] Sphinx Path: /home/ratse/rats-search/searchd [udp-tracker] listening udp tracker respose on 0.0.0.0:4446 [sphinx] writed sphinx config to /home/ratse/rats-search [sphinx] db path: /home/ratse/rats-search events.js:183 throw er; // Unhandled 'error' event ^

Error: spawn /home/ratse/rats-search/searchd ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19) at onErrorNT (internal/child_process.js:362:16) at _combinedTickCallback (internal/process/next_tick.js:139:11) at process._tickCallback (internal/process/next_tick.js:181:9) at Function.Module.runMain (module.js:696:11) at startup (bootstrap_node.js:204:16) at bootstrap_node.js:625:3 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! rats-search@1.0.0 server: node src/background/server.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the rats-search@1.0.0 server script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/ratse/.npm/_logs/2018-12-13T15_04_45_921Z-debug.log

Output from 'debug.log' 0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'server' ] 2 info using npm@6.4.1 3 info using node@v8.14.0 4 verbose run-script [ 'preserver', 'server', 'postserver' ] 5 info lifecycle rats-search@1.0.0~preserver: rats-search@1.0.0 6 info lifecycle rats-search@1.0.0~server: rats-search@1.0.0 7 verbose lifecycle rats-search@1.0.0~server: unsafe-perm in lifecycle true 8 verbose lifecycle rats-search@1.0.0~server: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/r$ 9 verbose lifecycle rats-search@1.0.0~server: CWD: /home/ratse/rats-search 10 silly lifecycle rats-search@1.0.0~server: Args: [ '-c', 'node src/background/server.js' ] 11 silly lifecycle rats-search@1.0.0~server: Returned: code: 1 signal: null 12 info lifecycle rats-search@1.0.0~server: Failed to exec server script 13 verbose stack Error: rats-search@1.0.0 server: node src/background/server.js 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16) 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at EventEmitter.emit (events.js:214:7) 13 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at ChildProcess.emit (events.js:214:7) 13 verbose stack at maybeClose (internal/child_process.js:915:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) 14 verbose pkgid rats-search@1.0.0 15 verbose cwd /home/ratse/rats-search 16 verbose Linux 3.16.60+ 17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "server" 18 verbose node v8.14.0 19 verbose npm v6.4.1 20 error code ELIFECYCLE 21 error errno 1 22 error rats-search@1.0.0 server: node src/background/server.js 22 error Exit status 1 23 error Failed at the rats-search@1.0.0 server script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

DEgITx commented 5 years ago

Rats now have not supported arm64, may be future version will support, all depends on one internal component

ghost commented 5 years ago

Ah okay, hopefully, I can run rats-search on ARM devices in the future... Thanks for the quick reply 👍

DEgITx commented 5 years ago

Can you test test from master? Maybe it will work now.

ghost commented 5 years ago

I'll give it a run sometime today on the same system and post results!

ghost commented 5 years ago

Okay so I went through the entire installation process again. It did not work but this time the program crashed during the startup process. This is exactly the same system that I used to run the program before.

Here is some system information.

uname -a

Linux 4-SvN6-BTSearch 3.16.60+ #1 SMP PREEMPT Sat Oct 27 11:52:17 CEST 2018 aarch64 GNU/Linux

*cat /etc/-release**

PRETTY_NAME="Debian GNU/Linux 9 (stretch)" NAME="Debian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"

npm version

{ 'rats-search': '1.0.0', npm: '6.5.0-next.0', ares: '1.15.0', cldr: '34.0', http_parser: '2.8.0', icu: '63.1', llhttp: '1.0.1', modules: '67', napi: '3', nghttp2: '1.34.0', node: '11.6.0', openssl: '1.1.0j', tz: '2018e', unicode: '11.0', uv: '1.24.1', v8: '7.0.276.38-node.13', zlib: '1.2.11' }

And here is the output from the three steps as outlined in README.md. The clone of the git directory was placed in the folder /home/ratse-run/ All of the commands below were executed with root privlieges, including the git clone command

npm install

> bufferutil@4.0.0 install /home/ratse-run/rats-search/node_modules/bufferutil > node-gyp-build

make: Entering directory '/home/ratse-run/rats-search/node_modules/bufferutil/build' CC(target) Release/obj.target/bufferutil/src/bufferutil.o SOLINK_MODULE(target) Release/obj.target/bufferutil.node COPY Release/bufferutil.node make: Leaving directory '/home/ratse-run/rats-search/node_modules/bufferutil/build'

> utf-8-validate@5.0.1 install /home/ratse-run/rats-search/node_modules/utf-8-validate > node-gyp-build

make: Entering directory '/home/ratse-run/rats-search/node_modules/utf-8-validate/build' CC(target) Release/obj.target/validation/src/validation.o SOLINK_MODULE(target) Release/obj.target/validation.node COPY Release/validation.node make: Leaving directory '/home/ratse-run/rats-search/node_modules/utf-8-validate/build'

> electron-chromedriver@3.0.0 install /home/ratse-run/rats-search/node_modules/electron-chromedriver > node ./download-chromedriver.js

> electron@3.0.10 postinstall /home/ratse-run/rats-search/node_modules/electron > node install.js

npm WARN lifecycle rats-search@1.0.0~postinstall: cannot run in wd rats-search@1.0.0 electron-builder install-app-deps (wd=/home/ratse-run/rats-search) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform forfsevents@1.2.4:wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})

added 1472 packages from 1330 contributors and audited 11347 packages in 295.573s found 1 low severity vulnerability runnpm audit fixto fix them, ornpm auditfor details

npm run buildweb

> rats-search@1.0.0 buildweb /home/ratse-run/rats-search > node src/background/webpack.js

succesfully builded web version

npm run server

> rats-search@1.0.0 server /home/ratse-run/rats-search > node src/background/server.js

[system] Rats v1.0.0 [system] Listening web server on 8095 port [system] Platform: linux [system] Arch: arm64 [system] OS Release: 3.16.60+ [system] CPU: unknown [system] CPU Logic cores: 4 [system] Total memory: 1984.32 MB [system] Free memory: 250.07 MB [system] NodeJS: v11.6.0 [sphinx] Sphinx Path: /home/ratse-run/rats-search/imports/arm64/searchd (node:22561) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. [udp-tracker] listening udp tracker respose on 0.0.0.0:4446 [sphinx] writed sphinx config to /home/ratse-run/rats-search [sphinx] db path: /home/ratse-run/rats-search [sphinx] sphinx: [Thu Jan 10 16:43:04.407 2019] [22572] using config file '/home/ratse-run/rats-search/sphinx.conf'...`

[sphinx] sphinx: [Thu Jan 10 16:43:04.441 2019] [22572] WARNING: TCP fast open unavailable (can't read /proc/sys/net/ipv4/tcp_fastopen, unsupported kernel?)

[sphinx] sphinx: listening on 127.0.0.1:9312 listening on 127.0.0.1:9306

[sphinx] sphinx: Manticore 2.8.0 621418b8@190107 dev Copyright (c) 2001-2016, Andrew Aksyonoff Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com) Copyright (c) 2017-2018, Manticore Software LTD (http://manticoresearch.com)

precaching index 'torrents'

[sphinx] sphinx: precaching index 'files'

[sphinx] sphinx: precaching index 'version'

[sphinx] sphinx: precaching index 'store'

[sphinx] sphinx: precaching index 'feed'

[sphinx] sphinx: prereading 5 indexes accepting connections prereaded 5 indexes in 0.000 sec

[sphinx] catched sphinx start [patcher] new db, set version to last version 7 [patcher] db version 7 [patcher] db patch done [sql] using alternative pool mechanism [p2p] generate peerId [p2p] ignore local address 10.66.0.104 [p2p] listen p2p on 4445 port [store] connect p2p store... [store] store db index 0 [tracker] loaded strategie 1337x.js [tracker] loaded strategie nyaa.js [tracker] loaded strategie rutor.js [tracker] loaded strategie rutracker.js [replication] p2p replication server enabled [replication] replication client is enabled [feed] lodead feed [downloader] restore downloading sessions [downloader] no download sessions - ignore [spider] Listen DHT protocol on 0.0.0.0:4445 [stun] p2p stun ignore my address [IP Address Removed] [ssh] tcp p2p port is unreachable - try ssh tunnel events.js:173 throw er; // Unhandled 'error' event ^

Error: spawn imports/arm64/plink ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:246:19) at onErrorNT (internal/child_process.js:421:16) at process.internalTickCallback (internal/process/next_tick.js:72:19) Emitted 'error' event at: at Process.ChildProcess._handle.onexit (internal/child_process.js:252:12) at onErrorNT (internal/child_process.js:421:16) at process.internalTickCallback (internal/process/next_tick.js:72:19) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! rats-search@1.0.0 server: node src/background/server.js`` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the rats-search@1.0.0 server script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.`

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-01-10T07_43_06_282Z-debug.log

cat /root/.npm/_logs/2019-01-10T07_43_06_282Z-debug.log

0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'server' ] 2 info using npm@6.5.0-next.0 3 info using node@v11.6.0 4 verbose run-script [ 'preserver', 'server', 'postserver' ] 5 info lifecycle rats-search@1.0.0~preserver: rats-search@1.0.0 6 info lifecycle rats-search@1.0.0~server: rats-search@1.0.0 7 verbose lifecycle rats-search@1.0.0~server: unsafe-perm in lifecycle true 8 verbose lifecycle rats-search@1.0.0~server: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ratse-run/rats-search/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 verbose lifecycle rats-search@1.0.0~server: CWD: /home/ratse-run/rats-search 10 silly lifecycle rats-search@1.0.0~server: Args: [ '-c', 'node src/background/server.js' ] 11 silly lifecycle rats-search@1.0.0~server: Returned: code: 1 signal: null 12 info lifecycle rats-search@1.0.0~server: Failed to exec server script 13 verbose stack Error: rats-search@1.0.0 server:node src/background/server.js `13 verbose stack Exit status 1` `13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)` `13 verbose stack at EventEmitter.emit (events.js:188:13)` `13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)` `13 verbose stack at ChildProcess.emit (events.js:188:13)` `13 verbose stack at maybeClose (internal/child_process.js:978:16)` `13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)` `14 verbose pkgid rats-search@1.0.0` `15 verbose cwd /home/ratse-run/rats-search` `16 verbose Linux 3.16.60+` `17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "server"` `18 verbose node v11.6.0` `19 verbose npm v6.5.0-next.0` `20 error code ELIFECYCLE` `21 error errno 1` `22 error rats-search@1.0.0 server: `node src/background/server.js 22 error Exit status 1 23 error Failed at the rats-search@1.0.0 server script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

Hope this helps with ARM testing!

DEgITx commented 5 years ago

test now again :)