Problem in deploying Swagger Editor to Pivatol Cloud Foundry (PCF)

154 views
Skip to first unread message

chen....@gmail.com

unread,
Jul 20, 2017, 1:12:33 PM7/20/17
to Swagger
Hi all,
I tried to deploy Swagger Editor to PCF by using push command of cf CLI like:
C:\>cf push SwaggerEditor -p C:\PCF\Swagger\swagger-editor-new -m 1G
In the folder C:\PCF\Swagger\swagger-editor-new, it contains all files and folders unzipped from swagger-editor.zip(v2.10.4) downloaded from Swagger web site.
It shows the following message in CLI:
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 crashed
FAILED
Error restarting application: Start unsuccessful
TIP: use 'cf logs SwaggerEditor --recent' for more information

Actually I can see SwaggerEditor application was created on PCF with status "Crash". It shows following errors in the log: 

2017-07-20T12:54:49.257-04:00 [CELL/0] [OUT] Creating container
2017-07-20T12:54:49.513-04:00 [CELL/0] [OUT] Successfully created container
2017-07-20T12:54:52.639-04:00 [CELL/0] [OUT] Starting health monitoring of container
2017-07-20T12:54:53.191-04:00 [APP/PROC/WEB/0] [OUT] > swagger...@2.10.4 start /home/vcap/app
2017-07-20T12:54:53.192-04:00 [APP/PROC/WEB/0] [OUT] > node server.js
2017-07-20T12:54:53.238-04:00 [APP/PROC/WEB/0] [ERR] module.js:472
2017-07-20T12:54:53.238-04:00 [APP/PROC/WEB/0] [ERR] throw err;
2017-07-20T12:54:53.238-04:00 [APP/PROC/WEB/0] [ERR] Error: Cannot find module '/home/vcap/app/server.js'
2017-07-20T12:54:53.238-04:00 [APP/PROC/WEB/0] [ERR] ^
2017-07-20T12:54:53.238-04:00 [APP/PROC/WEB/0] [ERR] at startup (bootstrap_node.js:151:9)
2017-07-20T12:54:53.238-04:00 [APP/PROC/WEB/0] [ERR] at bootstrap_node.js:542:3
2017-07-20T12:54:53.238-04:00 [APP/PROC/WEB/0] [ERR] at Function.Module._resolveFilename (module.js:470:15)
2017-07-20T12:54:53.238-04:00 [APP/PROC/WEB/0] [ERR] at Function.Module._load (module.js:418:25)
2017-07-20T12:54:53.238-04:00 [APP/PROC/WEB/0] [ERR] at Module.runMain (module.js:605:10)
2017-07-20T12:54:53.238-04:00 [APP/PROC/WEB/0] [ERR] at run (bootstrap_node.js:427:7)
2017-07-20T12:54:53.244-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! Linux 4.4.0-81-generic
2017-07-20T12:54:53.244-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! code ELIFECYCLE
2017-07-20T12:54:53.244-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! argv "/home/vcap/app/.cloudfoundry/0/node/bin/node" "/home/vcap/app/.cloudfoundry/0/bin/npm" "start"
2017-07-20T12:54:53.244-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! node v7.10.0
2017-07-20T12:54:53.244-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! npm v4.2.0
2017-07-20T12:54:53.244-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! Failed at the swagger...@2.10.4 start script 'node server.js'.
2017-07-20T12:54:53.244-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! Make sure you have the latest version of node.js and npm installed.
2017-07-20T12:54:53.244-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! errno 1
2017-07-20T12:54:53.244-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! swagger...@2.10.4 start: `node server.js`
2017-07-20T12:54:53.244-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! Exit status 1
2017-07-20T12:54:53.244-04:00 [APP/PROC/WEB/0] [ERR] npm ERR!
2017-07-20T12:54:53.244-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! If you do, this is most likely a problem with the swagger-editor package,
2017-07-20T12:54:53.246-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! You can get information on how to open an issue for this project with:
2017-07-20T12:54:53.246-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! not with npm itself.
2017-07-20T12:54:53.246-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! Tell the author that this fails on your system:
2017-07-20T12:54:53.246-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! node server.js
2017-07-20T12:54:53.246-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! There is likely additional logging output above.
2017-07-20T12:54:53.246-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! npm bugs swagger-editor
2017-07-20T12:54:53.246-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! Or if that isn't available, you can get their info via:
2017-07-20T12:54:53.246-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! npm owner ls swagger-editor
2017-07-20T12:54:53.263-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! /home/vcap/app/.npm/_logs/2017-07-20T16_54_53_254Z-debug.log
2017-07-20T12:54:53.263-04:00 [APP/PROC/WEB/0] [ERR] npm ERR! Please include the following file with any support request:
2017-07-20T12:54:53.270-04:00 [APP/PROC/WEB/0] [OUT] Exit status 1
2017-07-20T12:54:53.283-04:00 [CELL/0] [OUT] Exit status 0
2017-07-20T12:54:53.287-04:00 [CELL/0] [OUT] Destroying container
2017-07-20T12:54:53.294-04:00 [API/0] [OUT] Process has crashed with type: "web"
2017-07-20T12:54:53.303-04:00 [API/0] [OUT] App instance exited with guid e9390ad7-45fb-4bfe-97c6-6d7b5e4f0480 payload: {"instance"=>"", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"2 error(s) occurred:\n\n* 2 error(s) occurred:\n\n* Exited with status 1\n* cancelled\n* cancelled", "crash_count"=>6, "crash_timestamp"=>1500569693283167478, "version"=>"cbb6c879-3534-43aa-a2dd-9fd52609628c"}
2017-07-20T12:54:53.864-04:00 [CELL/0] [OUT] Successfully destroyed container

I almost have no clue about what was happening. Does anyone have an experience in doing that? Thanks for your help in advance.

-Jason 

Reply all
Reply to author
Forward
0 new messages