Megavolt1000 Posted March 9, 2021 Share Posted March 9, 2021 Всем доброго времени суток! Keenetic Extra (прошивка 3.5.6) + свежеустановленная OPKG (node, node-red), zRam=128Mb, SWAP=1.5Gb Не получается установить тяжелый пакет firebase, который в зависимостях у node-red-contribute-alice. Установка заканчивается сообщением "Killed..." Первая попытка установки (чистый кэш npm): Скрытый текст ~ # npm install firebase --loglevel verbose npm info it worked if it ends with ok npm verb cli [ npm verb cli '/opt/bin/node', npm verb cli '/opt/bin/npm', npm verb cli 'install', npm verb cli 'firebase', npm verb cli '--loglevel', npm verb cli 'verbose' npm verb cli ] npm info using npm@6.14.8 npm info using node@v12.19.0 npm verb config Skipping project config: /opt/root/.npmrc. (matches userconfig) npm verb npm-session 9976124988c0445b npm http fetch GET 200 https://registry.npmjs.org/firebase 5993ms npm http fetch GET 200 https://registry.npmjs.org/firebase/-/firebase-8.2.10.tgz 11027ms npm timing stage:loadCurrentTree Completed in 20354ms npm timing stage:loadIdealTree:cloneCurrentTree Completed in 12ms npm timing stage:loadIdealTree:loadShrinkwrap Completed in 46ms npm http fetch GET 200 https://registry.npmjs.org/@firebase%2fpolyfill 139647ms npm http fetch GET 200 https://registry.npmjs.org/@firebase%2fapp-types 141314ms npm http fetch GET 200 https://registry.npmjs.org/@firebase%2fdatabase 141680ms Killed Следующая попытка установки (часть пакетов уже в кэше) Скрытый текст ~ # npm install firebase --loglevel verbose npm info it worked if it ends with ok npm verb cli [ npm verb cli '/opt/bin/node', npm verb cli '/opt/bin/npm', npm verb cli 'install', npm verb cli 'firebase', npm verb cli '--loglevel', npm verb cli 'verbose' npm verb cli ] npm info using npm@6.14.8 npm info using node@v12.19.0 npm verb config Skipping project config: /opt/root/.npmrc. (matches userconfig) npm verb npm-session 9890f2e7ef2b27d9 npm http fetch GET 304 https://registry.npmjs.org/firebase 7128ms (from cache) npm timing stage:loadCurrentTree Completed in 10069ms npm timing stage:loadIdealTree:cloneCurrentTree Completed in 16ms npm timing stage:loadIdealTree:loadShrinkwrap Completed in 100ms npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fapp-types 38895ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fpolyfill 39563ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2finstallations 41016ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fauth 44061ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fapp 51715ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fmessaging 65407ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fstorage 82739ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2ffunctions 152923ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fdatabase 204696ms (from cache) npm http fetch GET 200 https://registry.npmjs.org/@firebase%2fperformance 364032ms npm http fetch GET 200 https://registry.npmjs.org/@firebase%2fremote-config 375082ms npm http fetch GET 200 https://registry.npmjs.org/@firebase%2fanalytics 605445ms Killed.............] - fetchMetadata: http fetch GET 200 https://registry.npmjs.org/@firebase%2fanalytics 605445ms ~ # Всё идёт долго, загрузка процессора под 100%. Скрытый текст Такое впечатление, что система устает ждать и прибивает установщик. Когда не было zRam и свопа, убийством заканчивалась каждая попытка установки, как только кончалась память. Прошу совета, как поправить ситуацию? Quote Link to comment Share on other sites More sharing options...
Megavolt1000 Posted March 9, 2021 Author Share Posted March 9, 2021 Обратил внимание, что время жизни установщика похоже на +/- 600 секунд Скрытый текст ~ # npm install firebase --loglevel verbose npm info it worked if it ends with ok npm verb cli [ npm verb cli '/opt/bin/node', npm verb cli '/opt/bin/npm', npm verb cli 'install', npm verb cli 'firebase', npm verb cli '--loglevel', npm verb cli 'verbose' npm verb cli ] npm info using npm@6.14.8 npm info using node@v12.19.0 npm verb config Skipping project config: /opt/root/.npmrc. (matches userconfig) npm verb npm-session 4bc5766c790c8eb2 npm http fetch GET 304 https://registry.npmjs.org/firebase 7928ms (from cache) npm timing stage:loadCurrentTree Completed in 11144ms npm timing stage:loadIdealTree:cloneCurrentTree Completed in 7ms npm timing stage:loadIdealTree:loadShrinkwrap Completed in 47ms npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fapp-types 37767ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fpolyfill 39222ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2finstallations 41434ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fauth 43400ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fapp 52208ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fstorage 56149ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fmessaging 65055ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2ffunctions 66929ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fdatabase 111458ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2ffirestore 176383ms (from cache) npm http fetch GET 200 https://registry.npmjs.org/@firebase/functions/-/functions-0.6.2.tgz 88600ms attempt #2 npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fremote-config 215150ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fanalytics 226180ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fperformance 326621ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2futil 419104ms (from cache) npm timing stage:rollbackFailedOptional Completed in 3302ms npm timing stage:runTopLevelLifecycles Completed in 595012ms npm verb type system npm verb stack FetchError: request to https://registry.npmjs.org/@firebase/database/-/database-0.9.4.tgz failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org npm verb stack at ClientRequest.<anonymous> (/opt/lib/node_modules/npm/node_modules/node-fetch-npm/src/index.js:68:14) npm verb stack at ClientRequest.emit (events.js:314:20) npm verb stack at TLSSocket.socketErrorListener (_http_client.js:428:9) npm verb stack at TLSSocket.emit (events.js:314:20) npm verb stack at emitErrorNT (internal/streams/destroy.js:92:8) npm verb stack at emitErrorAndCloseNT (internal/streams/destroy.js:60:3) npm verb stack at processTicksAndRejections (internal/process/task_queues.js:84:21) npm verb cwd /opt/root npm verb Linux 4.9-ndm-4 npm verb argv "/opt/bin/node" "/opt/bin/npm" "install" "firebase" "--loglevel" "verbose" npm verb node v12.19.0 npm verb npm v6.14.8 npm ERR! code EAI_AGAIN npm ERR! errno EAI_AGAIN npm ERR! request to https://registry.npmjs.org/@firebase/database/-/database-0.9.4.tgz failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org npm verb exit [ 1, true ] npm timing npm Completed in 618657ms npm ERR! A complete log of this run can be found in: npm ERR! /opt/root/.npm/_logs/2021-03-09T19_32_42_540Z-debug.log ~ # npm install firebase --loglevel verbose npm info it worked if it ends with ok npm verb cli [ npm verb cli '/opt/bin/node', npm verb cli '/opt/bin/npm', npm verb cli 'install', npm verb cli 'firebase', npm verb cli '--loglevel', npm verb cli 'verbose' npm verb cli ] npm info using npm@6.14.8 npm info using node@v12.19.0 npm verb config Skipping project config: /opt/root/.npmrc. (matches userconfig) npm verb npm-session c7e563664dbb5eca npm http fetch GET 304 https://registry.npmjs.org/firebase 7219ms (from cache) npm timing stage:loadCurrentTree Completed in 10176ms npm timing stage:loadIdealTree:cloneCurrentTree Completed in 7ms npm timing stage:loadIdealTree:loadShrinkwrap Completed in 46ms npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fapp-types 36301ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fpolyfill 37559ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2finstallations 39055ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fauth 43809ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fapp 48260ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fstorage 51680ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fmessaging 57454ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2ffunctions 61233ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fdatabase 99435ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2ffirestore 151074ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fremote-config 171764ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fanalytics 181501ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2fperformance 276528ms (from cache) npm http fetch GET 304 https://registry.npmjs.org/@firebase%2futil 326343ms (from cache) npm timing stage:rollbackFailedOptional Completed in 12543ms npm timing stage:runTopLevelLifecycles Completed in 538157ms npm verb type system npm verb stack FetchError: request to https://registry.npmjs.org/@firebase/database/-/database-0.9.4.tgz failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org npm verb stack at ClientRequest.<anonymous> (/opt/lib/node_modules/npm/node_modules/node-fetch-npm/src/index.js:68:14) npm verb stack at ClientRequest.emit (events.js:314:20) npm verb stack at TLSSocket.socketErrorListener (_http_client.js:428:9) npm verb stack at TLSSocket.emit (events.js:314:20) npm verb stack at emitErrorNT (internal/streams/destroy.js:92:8) npm verb stack at emitErrorAndCloseNT (internal/streams/destroy.js:60:3) npm verb stack at processTicksAndRejections (internal/process/task_queues.js:84:21) npm verb cwd /opt/root npm verb Linux 4.9-ndm-4 npm verb argv "/opt/bin/node" "/opt/bin/npm" "install" "firebase" "--loglevel" "verbose" npm verb node v12.19.0 npm verb npm v6.14.8 npm ERR! code EAI_AGAIN npm ERR! errno EAI_AGAIN npm ERR! request to https://registry.npmjs.org/@firebase/database/-/database-0.9.4.tgz failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org npm verb exit [ 1, true ] npm timing npm Completed in 619629ms npm ERR! A complete log of this run can be found in: npm ERR! /opt/root/.npm/_logs/2021-03-09T19_43_52_969Z-debug.log ~ # Quote Link to comment Share on other sites More sharing options...
Megavolt1000 Posted March 10, 2021 Author Share Posted March 10, 2021 Проблема решилась после отключения ZRAM (swap остался, без него не хватает памяти). Загрузка процессора снизилась с постоянных 100% до плавающих 10-100%, видимо, какие-то вачдоги/таймеры стали успевать перевзводиться, и убийства прекратились. Ставилось минут 15. Для node-red важна его личная папка node_modules. Установка в /opt/root/.node-red/ (командой npm install без доп. ключей) не помогает - red не видит плагина. Установка из-под gui node-red прошла успешно, плагин сразу обнаружился. Устанавливать глобально (-g) не пробовал. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.