收藏
回答

云托管部署eggjs服务,运行npm run start不停重复启动?最后部署失败

走到这一步了之后,不停的重复启动,请问大神知道是什么原因吗?


-----------服务lefan-node-service部署lefan-node-service-004-----------
2022-04-17 00:00:54 create_eks_virtual_service : succ, 
2022-04-17 00:00:54 check_eks_virtual_service : succ, Readiness probe failed: dial tcp 10.0.192.4:80: connect: connection refused, [pod]:[Successfully assigned default/lefan-node-service-004-7697c69558-pd5bp to eklet-subnet-jws7nh7j; 
Starting pod sandbox eks-bju1u7x7; 
Sync endpoints; 
Pulling image "ccr.ccs.tencentyun.com/tcb_prd/initsidecar:2.0.0"; 
Successfully pulled image "ccr.ccs.tencentyun.com/tcb_prd/initsidecar:2.0.0" in 2.781056161s; 
Created container init; 
Started container init; 
Pulling image "ccr.ccs.tencentyun.com/tcb-100024839466-osvm/prod-3gen1fswbe8d5098_lefan-node-service:lefan-node-service-004-20220416235904"; 
Successfully pulled image "ccr.ccs.tencentyun.com/tcb-100024839466-osvm/prod-3gen1fswbe8d5098_lefan-node-service:lefan-node-service-004-20220416235904" in 13.85145302s; 
Created container lefan-node-service-004; 
Started container lefan-node-service-004; 
Pulling image "ccr.ccs.tencentyun.com/tcb_prd/openapi-agent:2.1.0"; 
Successfully pulled image "ccr.ccs.tencentyun.com/tcb_prd/openapi-agent:2.1.0" in 2.932170925s; 
Created container side; 
Started container side; 
Readiness probe failed: dial tcp 10.0.192.4:80: connect: connection refused; 
Container image "ccr.ccs.tencentyun.com/tcb-100024839466-osvm/prod-3gen1fswbe8d5098_lefan-node-service:lefan-node-service-004-20220416235904" already present on machine; 
]
***
[egg-scripts] Starting egg application at /usr/src/app
[egg-scripts] Run node --no-deprecation --trace-warnings /usr/src/app/node_modules/egg-scripts/lib/start-cluster {"title":"egg-server-lefan-node-server","baseDir":"/usr/src/app","framework":"/usr/src/app/node_modules/egg"} --title=egg-server-lefan-node-server
[egg-scripts] Save log file to /root/logs
[egg-scripts] Wait Start: 1...
[egg-scripts] Wait Start: 2...
[egg-scripts] Wait Start: 3...
[egg-scripts] Wait Start: 4...
[egg-scripts] Wait Start: 5...
[egg-scripts] Wait Start: 6...
[egg-scripts] Wait Start: 7...
[egg-scripts] Wait Start: 8...
[egg-scripts] Wait Start: 9...
[egg-scripts] Wait Start: 10...
[egg-scripts] egg started on http://127.0.0.1:7001
[egg-scripts] Wait Start: 11...

> lefan-node-server@1.0.0 start /usr/src/app
> egg-scripts start --daemon --title=egg-server-lefan-node-server

[egg-scripts] Starting egg application at /usr/src/app
[egg-scripts] Run node --no-deprecation --trace-warnings /usr/src/app/node_modules/egg-scripts/lib/start-cluster {"title":"egg-server-lefan-node-server","baseDir":"/usr/src/app","framework":"/usr/src/app/node_modules/egg"} --title=egg-server-lefan-node-server
[egg-scripts] Save log file to /root/logs
[egg-scripts] Wait Start: 1...
[egg-scripts] Wait Start: 2...
[egg-scripts] Wait Start: 3...
[egg-scripts] Wait Start: 4...
[egg-scripts] Wait Start: 5...
[egg-scripts] Wait Start: 6...
[egg-scripts] Wait Start: 7...
[egg-scripts] Wait Start: 8...
[egg-scripts] Wait Start: 9...
[egg-scripts] Wait Start: 10...
[egg-scripts] Wait Start: 11...
[egg-scripts] Wait Start: 12...
[egg-scripts] Wait Start: 13...
[egg-scripts] Wait Start: 14...
[egg-scripts] Wait Start: 15...
[egg-scripts] Wait Start: 16...
[egg-scripts] Wait Start: 17...
[egg-scripts] Wait Start: 18...
[egg-scripts] egg started on http://127.0.0.1:7001

> lefan-node-server@1.0.0 start /usr/src/app
> egg-scripts start --daemon --title=egg-server-lefan-node-server

[egg-scripts] Starting egg application at /usr/src/app
[egg-scripts] Run node --no-deprecation --trace-warnings /usr/src/app/node_modules/egg-scripts/lib/start-cluster {"title":"egg-server-lefan-node-server","baseDir":"/usr/src/app","framework":"/usr/src/app/node_modules/egg"} --title=egg-server-lefan-node-server
[egg-scripts] Save log file to /root/logs
[egg-scripts] Wait Start: 1...
[egg-scripts] Wait Start: 2...
[egg-scripts] Wait Start: 3...
[egg-scripts] Wait Start: 4...
[egg-scripts] Wait Start: 5...
[egg-scripts] Wait Start: 6...
[egg-scripts] Wait Start: 7...
[egg-scripts] Wait Start: 8...
[egg-scripts] Wait Start: 9...
[egg-scripts] Wait Start: 10...
[egg-scripts] Wait Start: 11...
[egg-scripts] egg started on http://127.0.0.1:7001

> lefan-node-server@1.0.0 start /usr/src/app
> egg-scripts start --daemon --title=egg-server-lefan-node-server

[egg-scripts] Starting egg application at /usr/src/app
[egg-scripts] Run node --no-deprecation --trace-warnings /usr/src/app/node_modules/egg-scripts/lib/start-cluster {"title":"egg-server-lefan-node-server","baseDir":"/usr/src/app","framework":"/usr/src/app/node_modules/egg"} --title=egg-server-lefan-node-server
[egg-scripts] Save log file to /root/logs
[egg-scripts] Wait Start: 1...
[egg-scripts] Wait Start: 2...
[egg-scripts] Wait Start: 3...
[egg-scripts] Wait Start: 4...
[egg-scripts] Wait Start: 5...
[egg-scripts] Wait Start: 6...
[egg-scripts] Wait Start: 7...
[egg-scripts] Wait Start: 8...
[egg-scripts] Wait Start: 9...
[egg-scripts] Wait Start: 10...
[egg-scripts] Wait Start: 11...
[egg-scripts] Wait Start: 12...
[egg-scripts] egg started on http://127.0.0.1:7001

> lefan-node-server@1.0.0 start /usr/src/app
> egg-scripts start --daemon --title=egg-server-lefan-node-server

[egg-scripts] Starting egg application at /usr/src/app
[egg-scripts] Run node --no-deprecation --trace-warnings /usr/src/app/node_modules/egg-scripts/lib/start-cluster {"title":"egg-server-lefan-node-server","baseDir":"/usr/src/app","framework":"/usr/src/app/node_modules/egg"} --title=egg-server-lefan-node-server
[egg-scripts] Save log file to /root/logs
[egg-scripts] Wait Start: 1...
[egg-scripts] Wait Start: 2...
[egg-scripts] Wait Start: 3...
[egg-scripts] Wait Start: 4...
[egg-scripts] Wait Start: 5...
[egg-scripts] Wait Start: 6...
[egg-scripts] Wait Start: 7...
[egg-scripts] Wait Start: 8...
[egg-scripts] Wait Start: 9...
[egg-scripts] Wait Start: 10...
[egg-scripts] Wait Start: 14...
[egg-scripts] egg started on http://127.0.0.1:7001
回答关注问题邀请回答
收藏

3 个回答

  • oys
    oys
    2022-04-17

    自问自答,需要去掉进程守护参数 --daemon

    更改前:"start": "egg-scripts start --daemon --title=egg-server-lefan-node-server",

    更改后:"start": "egg-scripts start --title=egg-server-lefan-node-server",

    2022-04-17
    有用 2
    回复
  • LLLONG
    LLLONG
    2023-02-16

    哥哥,云托管怎么部署egg项目呀?

    2023-02-16
    有用 1
    回复
  • Africa Tour OnLine
    Africa Tour OnLine
    2022-05-07

    兄台,是否可以分享下云托管部署egg项目的流程和细节

    2022-05-07
    有用
    回复
登录 后发表内容
问题标签