如何處理CloudFoundry應用部署時遇到的254錯誤

i042416發表於2018-05-30

使用SAP雲平臺的CloudFoundry部署應用:


如何處理CloudFoundry應用部署時遇到的254錯誤

在cockpit遇到錯誤資訊:instance: a0abe2b5-7623-4cf1-4c65-0c79, index: 0, exit_description: APP/PROC/WEB: Exited with status 254, reason: CRASHED


如何處理CloudFoundry應用部署時遇到的254錯誤
如何處理CloudFoundry應用部署時遇到的254錯誤

使用命令檢視部署日誌:
cf logs connectvity-demo-approuter --recent

2018-05-30T11:33:30.95+0800 [CELL/0] OUT Starting health monitoring of container
2018-05-30T11:33:31.68+0800 [APP/PROC/WEB/0] ERR npm ERR! Linux 4.4.0-119-generic
2018-05-30T11:33:31.68+0800 [APP/PROC/WEB/0] ERR npm ERR! argv "/home/vcap/deps/0/node/bin/node" "/home/vcap/deps/0/bin/npm" "start"
2018-05-30T11:33:31.68+0800 [APP/PROC/WEB/0] ERR npm ERR! node v6.13.1
2018-05-30T11:33:31.68+0800 [APP/PROC/WEB/0] ERR npm ERR! npm v3.10.10
2018-05-30T11:33:31.68+0800 [APP/PROC/WEB/0] ERR npm ERR! path /home/vcap/app/package.json
2018-05-30T11:33:31.68+0800 [APP/PROC/WEB/0] ERR npm ERR! code ENOENT
2018-05-30T11:33:31.68+0800 [APP/PROC/WEB/0] ERR npm ERR! errno -2
2018-05-30T11:33:31.68+0800 [APP/PROC/WEB/0] ERR npm ERR! syscall open
2018-05-30T11:33:31.68+0800 [APP/PROC/WEB/0] ERR npm ERR! enoent ENOENT: no such file or directory, open '/home/vcap/app/package.json'
2018-05-30T11:33:31.68+0800 [APP/PROC/WEB/0] ERR npm ERR! enoent ENOENT: no such file or directory, open '/home/vcap/app/package.json'
2018-05-30T11:33:31.68+0800 [APP/PROC/WEB/0] ERR npm ERR! enoent This is most likely not a problem with npm itself
2018-05-30T11:33:31.68+0800 [APP/PROC/WEB/0] ERR npm ERR! enoent and is related to npm not being able to find a file.
2018-05-30T11:33:31.68+0800 [APP/PROC/WEB/0] ERR npm ERR! enoent
2018-05-30T11:33:31.69+0800 [APP/PROC/WEB/0] ERR npm ERR! Please include the following file with any support request:
發現原因是build時找不到package.json. 但我確認我部署的zip檔案裡存在package.json

解決方案

使用CLI進行部署:

cf push -f ./approuter-manifest.yml
問題解決:


如何處理CloudFoundry應用部署時遇到的254錯誤
如何處理CloudFoundry應用部署時遇到的254錯誤

要獲取更多Jerry的原創技術文章,請關注公眾號"汪子熙"或者掃描下面二維碼:

如何處理CloudFoundry應用部署時遇到的254錯誤
如何處理CloudFoundry應用部署時遇到的254錯誤

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2155371/,如需轉載,請註明出處,否則將追究法律責任。

相關文章