之前eggjs2.0出来以后就开始使用eggjs进行后台开发了,由于测试方便,开始时项目部署在阿里云的windows系统下面,使用npm run dev的方式进行启动
但是等到项目开发完毕后,我开始部署到生产环境的Linux系统上面,这时候问题出来了,按照eggjs
官网上面的介绍,生产环境上面的部署使用npm start的方式启动部署,但是启动一直报以下的错误
egg-scripts] Wait Start: 35...
[egg-scripts] 2018-01-23 16:12:03,863 ERROR 3941 [-/127.0.0.1/-/0ms GET /] nodejs.Error: [ClusterClient] leader does not be active in 30000ms on port:45728
[egg-scripts] at Function.waitFor (/root/egg/node_modules/_cluster-client@1.7.1@cluster-client/lib/server.js:239:15)
[egg-scripts] at waitFor.next ()
[egg-scripts] at onFulfilled (/root/egg/node_modules/_co@4.6.0@co/index.js:65:19)
[egg-scripts] at
[egg-scripts] at process._tickCallback (internal/process/next_tick.js:160:7)
[egg-scripts]
[egg-scripts] pid: 3941
[egg-scripts] hostname: iZ2ze76p2wnibfx0j7dslmZ
[egg-scripts]
[egg-scripts] 2018-01-23 16:12:03,863