Appservice无法启动NPM [英] Appservice Failed to Start NPM

查看:49
本文介绍了Appservice无法启动NPM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用带有angularcli的nodejs并部署在Azure应用服务上。它没有启动,这里是日志


------------

 

2019-02-23T07:23:42.254416263Z> Project@0.0.0 start / home / site / wwwroot
2019-02-23T07:23:42.254426763Z> ng服务
2019-02-23T07:23:42.254434964Z
2019-02-23T07:23:42.809277213Z module.js:550
2019-02-23T07:23:42.809323514Z throw呃;
2019-02-23T07:23:42.809332814Z ^
2019-02-23T07:23:42.809340815Z
2019-02-23T07:23:42.809348615Z 错误:在Function.Module._resolveFilename(module.js)找不到模块'../lib/init'
2019-02-23T07:23:42.809356415Z :548:15)
2019-02-23T07:23:42.809364215Z at Function.Module._load(module.js:475:25)
2019-02-23T07:23:42.809371816Z at Module .require(module.js:597:17)
2019-02-23T07:23:42.809379516Z at require(internal / module.js:11:18)
2019-02-23T07:23: 42.809387316Z at Object。< anonymous style =" box-sizing:border-box;"> (/home/site/wwwroot/node_modules/.bin/ng:25:1)
2019-02-23T07:23:42.809395616Z在Module._compile(module.js:653:30)
2019-02-23T07:23:42.809403117Z在Object.Module._extensions..js(module.js:664:10)
2019-02-23T07:23:42.809410517Z在Module.load(module.js) :566:32)
2019-02-23T07:23:42.809418017Z at tryModuleLoad(module.js:506:12)
2019-02-23T07:23:42.809445018Z at Function.Module._load (module.js:498:3)
2019-02-23T07:23:42.825594085Z npm ERR!代码ELIFECYCLE
2019- 02-23T07:23:42.826892522Z npm ERR! errno 1
2019-02-23T07:23:42.838882369Z npm ERR! athena-web-ui@0.0.0 start:`ng serve`
2019-02-23T07:23:42.839554289Z npm ERR! 退出状态1
2019-02-23T07:23:42.846764197Z npm ERR!
2019-02-23T07:23:42.847473618Z npm ERR!在athena-web-失败ui@0.0.0启动脚本。
2019-02-23T07:23:42.848094836Z npm ERR!这可能不是npm的问题。上面可能有额外的日志记录输出。
2019-02-23T07:23:42.889806942Z
2019-02-23T07:23:42.890674567Z npm ERR!完整的日志这个运行可以在:
2019-02-23T07:23:42.891241184Z npm ERR! /root/.npm/_logs/2019 -02-23T07_23_42_850Z-debug.log
2019-02-23T07:23:45.867988188Z /lib/rc/sh/openrc-run.sh:第279行:无法创建/ sys / fs / cgroup / blkio / tasks:权限被拒绝
2019-02-23T07:23:45.868375899Z /lib/rc/sh/openrc-run.sh:第279行:无法创建/ sys / fs / cgroup / cpu / tasks:权限被拒绝
2019-02-23T07:23:45.868733209Z /lib/rc/sh/openrc-run.sh:第279行:无法创建/ sys / fs / cgroup / cpu,cpuacct / tasks:权限拒绝
2019-02-23T07:23:45.869396428Z /lib/rc/sh/openrc-run.sh:第279行:无法创建/ sys / fs / cgroup / cpuacct / tasks:权限被拒绝
2019-02-23T07:23:45.876137423Z /lib/rc/sh/openrc-run.sh:第279行:无法创建/ sys / fs / cgroup / cpuset / tasks:权限被拒绝
2019 -0 2-23T07:23:45.876158624Z /lib/rc/sh/openrc-run.sh:第279行:无法创建/ sys / fs / cgroup / devices / tasks:权限被拒绝
2019-02-23T07 :23:45.876292328Z /lib/rc/sh/openrc-run.sh:第279行:无法创建/ sys / fs / cgroup / freezer / tasks:权限被拒绝
2019-02-23T07:23: 45.876301028Z /lib/rc/sh/openrc-run.sh:279行:无法创建/ sys / fs / cgroup / hugetlb / tasks:权限被拒绝
2019-02-23T07:23:45.876309128Z / lib / rc / sh / openrc-run.sh:第279行:无法创建/ sys / fs / cgroup / memory / tasks:权限被拒绝
2019-02-23T07:23:45.876316929Z / lib / rc /sh/openrc-run.sh:第279行:无法创建/ sys / fs / cgroup / net_cls / tasks:权限被拒绝
2019-02-23T07:23:45.876324729Z / lib / rc / sh / openrc-run.sh:第279行:无法创建/ sys / fs / cgroup / net_cls,net_prio / tasks:权限被拒绝
2019-02-23T07:23:45.876332729Z / lib / rc / sh / openrc -run.sh:第279行:无法创建/ sys / fs / cgroup / net_prio / tasks:权限被拒绝
2019-02-23T07:23:45.876470733Z / lib / rc / sh / openrc-run .sh:第279行:无法创建/ sys / fs / cgroup / perf_event / tasks:权限被拒绝
2019-02-23T07:23:45.876485433Z /lib/rc/sh/openrc-run.sh:第279行:无法创建/ sys / fs / cgroup / pids / tasks:权限被拒绝
2019-02-23T07:23:45.876493734Z /lib/rc/sh/openrc-run.sh:279行:无法创建/ sys / fs / cgroup / systemd / tasks:权限被拒绝
2019-02-23T07:23:46.578348337Z ssh-keygen:生成新的主机密钥:RSA DSA ECDSA ED25519
2019- 02-23T07:23:48.136952208Z *开始sshd ... [ok]< / anonymous>

< anonymous style =" box-sizing:border-box;"> - ------------< / anonymous>

 2019-02-23 07:23:37.613  ERROR   -  用于站点雅典娜测试的容器athena-testing_0未在预期时限内启动。经过时间= 230.2757954秒

解决方案

你究竟准备如何配置应用程序?请提供有关该应用程序配置的更多详细信息?


确保您使用的是相应的应用版本。
您可以在Azure门户中的"应用程序设置"
刀片下包含  WEBSITE_NODE_DEFAULT_VERSION作为您想要的应用程序设置值
的关键和版本的node.js。


您可以配置平台在重新启动容器之前等待的时间。为此,请设置  WEBSITES_CONTAINER_START_TIME_LIMIT   app
设置为您想要的值。默认值为230秒,最大值为1800秒。


请查看本文档中提到的设置和配置
我的节点应用程序没有
启动
,请告诉我们如何进一步调查。


Hi,

I am using nodejs with angularcli and deployed on the Azure app service. Its failing to start and here are the logs

------------



2019-02-23T07:23:42.254416263Z > Project@0.0.0 start /home/site/wwwroot 2019-02-23T07:23:42.254426763Z > ng serve 2019-02-23T07:23:42.254434964Z 2019-02-23T07:23:42.809277213Z module.js:550 2019-02-23T07:23:42.809323514Z throw err; 2019-02-23T07:23:42.809332814Z ^ 2019-02-23T07:23:42.809340815Z 2019-02-23T07:23:42.809348615Z Error: Cannot find module '../lib/init' 2019-02-23T07:23:42.809356415Z at Function.Module._resolveFilename (module.js:548:15) 2019-02-23T07:23:42.809364215Z at Function.Module._load (module.js:475:25) 2019-02-23T07:23:42.809371816Z at Module.require (module.js:597:17) 2019-02-23T07:23:42.809379516Z at require (internal/module.js:11:18) 2019-02-23T07:23:42.809387316Z at Object.<anonymous style="box-sizing:border-box;"> (/home/site/wwwroot/node_modules/.bin/ng:25:1) 2019-02-23T07:23:42.809395616Z at Module._compile (module.js:653:30) 2019-02-23T07:23:42.809403117Z at Object.Module._extensions..js (module.js:664:10) 2019-02-23T07:23:42.809410517Z at Module.load (module.js:566:32) 2019-02-23T07:23:42.809418017Z at tryModuleLoad (module.js:506:12) 2019-02-23T07:23:42.809445018Z at Function.Module._load (module.js:498:3) 2019-02-23T07:23:42.825594085Z npm ERR! code ELIFECYCLE 2019-02-23T07:23:42.826892522Z npm ERR! errno 1 2019-02-23T07:23:42.838882369Z npm ERR! athena-web-ui@0.0.0 start: `ng serve` 2019-02-23T07:23:42.839554289Z npm ERR! Exit status 1 2019-02-23T07:23:42.846764197Z npm ERR! 2019-02-23T07:23:42.847473618Z npm ERR! Failed at the athena-web-ui@0.0.0 start script. 2019-02-23T07:23:42.848094836Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2019-02-23T07:23:42.889806942Z 2019-02-23T07:23:42.890674567Z npm ERR! A complete log of this run can be found in: 2019-02-23T07:23:42.891241184Z npm ERR! /root/.npm/_logs/2019-02-23T07_23_42_850Z-debug.log 2019-02-23T07:23:45.867988188Z /lib/rc/sh/openrc-run.sh: line 279: can't create /sys/fs/cgroup/blkio/tasks: Permission denied 2019-02-23T07:23:45.868375899Z /lib/rc/sh/openrc-run.sh: line 279: can't create /sys/fs/cgroup/cpu/tasks: Permission denied 2019-02-23T07:23:45.868733209Z /lib/rc/sh/openrc-run.sh: line 279: can't create /sys/fs/cgroup/cpu,cpuacct/tasks: Permission denied 2019-02-23T07:23:45.869396428Z /lib/rc/sh/openrc-run.sh: line 279: can't create /sys/fs/cgroup/cpuacct/tasks: Permission denied 2019-02-23T07:23:45.876137423Z /lib/rc/sh/openrc-run.sh: line 279: can't create /sys/fs/cgroup/cpuset/tasks: Permission denied 2019-02-23T07:23:45.876158624Z /lib/rc/sh/openrc-run.sh: line 279: can't create /sys/fs/cgroup/devices/tasks: Permission denied 2019-02-23T07:23:45.876292328Z /lib/rc/sh/openrc-run.sh: line 279: can't create /sys/fs/cgroup/freezer/tasks: Permission denied 2019-02-23T07:23:45.876301028Z /lib/rc/sh/openrc-run.sh: line 279: can't create /sys/fs/cgroup/hugetlb/tasks: Permission denied 2019-02-23T07:23:45.876309128Z /lib/rc/sh/openrc-run.sh: line 279: can't create /sys/fs/cgroup/memory/tasks: Permission denied 2019-02-23T07:23:45.876316929Z /lib/rc/sh/openrc-run.sh: line 279: can't create /sys/fs/cgroup/net_cls/tasks: Permission denied 2019-02-23T07:23:45.876324729Z /lib/rc/sh/openrc-run.sh: line 279: can't create /sys/fs/cgroup/net_cls,net_prio/tasks: Permission denied 2019-02-23T07:23:45.876332729Z /lib/rc/sh/openrc-run.sh: line 279: can't create /sys/fs/cgroup/net_prio/tasks: Permission denied 2019-02-23T07:23:45.876470733Z /lib/rc/sh/openrc-run.sh: line 279: can't create /sys/fs/cgroup/perf_event/tasks: Permission denied 2019-02-23T07:23:45.876485433Z /lib/rc/sh/openrc-run.sh: line 279: can't create /sys/fs/cgroup/pids/tasks: Permission denied 2019-02-23T07:23:45.876493734Z /lib/rc/sh/openrc-run.sh: line 279: can't create /sys/fs/cgroup/systemd/tasks: Permission denied 2019-02-23T07:23:46.578348337Z ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519 2019-02-23T07:23:48.136952208Z * Starting sshd ... [ ok ]</anonymous>

<anonymous style="box-sizing:border-box;">--------------</anonymous>

2019-02-23 07:23:37.613 ERROR - Container athena-testing_0 for site athena-testing did not start within expected time limit. Elapsed time = 230.2757954 sec

解决方案

How exactly are you attempting to provision the app? Could you please provide more details about the app's configuration?

Ensure that you are using the appropriate app version. You can include WEBSITE_NODE_DEFAULT_VERSION as key and version of node.js you want as value in app settings under ‘Application settings’ blade in the Azure Portal.

You can configure the amount of time the platform will wait before it restarts your container. To do so, set the WEBSITES_CONTAINER_START_TIME_LIMIT app setting to the value you want. The default value is 230 seconds, and the maximum value is 1800 seconds.

Kindly review the setting and configuration as mentioned in this document section My node application does not start, and let us know how that goes for further investigation.


这篇关于Appservice无法启动NPM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆