watson-developer-cloud / discovery-nodejs

This is a deprecated Watson Discovery Service Demo. A link to the newly supported demo is below
https://www.ibm.com/demos/live/watson-discovery/self-service
MIT License
76 stars 178 forks source link

can't deploy app to cloud #111

Closed maigonzalezh closed 5 years ago

maigonzalezh commented 6 years ago

Hi!

At the time of doing the deployment, i have this error:

0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 crashed
FAILED
Error restarting application: Start unsuccessful

The application log error shows the following:

2018-08-30T16:23:33.02-0300 [APP/PROC/WEB/0] OUT > @ibm-watson/discovery-nodejs@1.0.0 start /home/vcap/app 2018-08-30T16:23:33.02-0300 [APP/PROC/WEB/0] OUT > node scripts/start.js 2018-08-30T16:23:33.71-0300 [APP/PROC/WEB/0] OUT Server running on port: 8080 2018-08-30T16:23:34.19-0300 [CELL/0] OUT Container became healthy 2018-08-30T16:23:36.39-0300 [APP/PROC/WEB/0] OUT Something is already running on port 8080. 2018-08-30T16:23:36.49-0300 [APP/PROC/WEB/0] OUT Exit status 0

germanattanasio commented 6 years ago

Did you specify a PORT = 8080 I don't think the IBM Cloud is assigning that port to your app.

maigonzalezh commented 6 years ago

No, i didnt specify that port (setted as default). Note that when the program runs locally, it assign PORT=5000.

germanattanasio commented 5 years ago

Did you run npm install build to generate the public folder?

germanattanasio commented 5 years ago

this was fixed in #115. Make sure that the start command is node server.js and that you build the public package by running npm run build before pushing the app to the IBM Cloud