I can successfully deploy a Ruby Sinatra app in Bluemix. But when I bind a Cloudant db to Sinatra, download the starter application package to my laptop, make a small change on my laptop and then push the app back to Bluemix, the app consistently crashes. I have tried this several times. This is what the activity log says:
11/2/14
5:09 AM
LennartSinatra17
an instance of the app crashed: failed to accept connections within health check timeout
exit status: 1, CRASHED
BXNUI2034E: Error while getting instances resource. Cloud Foundry issued the following message: "File error: Request failed for app: LennartSinatra17, instance: 0 and path: / as the instance is not found." See the Troubleshooting topics in the IBM Bluemix Documentation to check service status, review troubleshooting information, or for information about getting help.
And this is what happens when I try to start the app:
Starting app LennartSinatra17 in org xxxxx / space dev as xxxxx
m...
OK
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
0 of 1 instances running, 1 down
......
FAILED
Start unsuccessful
TIP: use 'cf logs LennartSinatra17 --recent' for more information
C:\IBM\IBM BlueMix\Lennart BlueMix Apps\LennartSinatra17>cf logs LennartSinatra1
7 --recent
FAILED
websocket.Dial wss://loggregator.ng.bluemix.net:443/dump/?app=ddbcf1b3-78fe-4174
-91ca-57f8ebbe68e4: bad status
Answer by Lennart (45) | Nov 02, 2014 at 12:07 PM
More infotmation on this problem: It also appears when the Sinatra app is not tied to not tied to any service. All one has to to is to push changes to it three to four times and then the app will crash
11/2/14
10:06 AM
MySinatra1
an instance of the app crashed: failed to accept connections within health check timeout
exit status: 1, CRASHED
And I have not changed the YML file that I have downloaded with the quickstart link.
As you figured out, nothing to do with the service binding. Could you try without the the YML as well as tail the logs from another window, when you do the push
Answer by Lennart (45) | Nov 03, 2014 at 09:28 AM
Hi Mario, thanx for your quick response! applications:
Since Sinatra always instantiates correctly, and then crashes after about the third cf push command, the YML file may well be the culprit..
I tried this push command instead of the YML file, but get a syntax error:
cf push -n LennartSinatra18 -d mybluemix.net -p . -i 1 -m 128m Any thoughts on how to code it?
And here is the YML file.
- disk_quota: 1024M
host: LennartSinatra18
name: LennartSinatra18
path: .
domain: mybluemix.net
instances: 1
memory: 128M
Answer by Lennart (45) | Nov 03, 2014 at 09:58 AM
PS: I would like to open a report on the fact that the SInatra buildpack crashes after a certain number of cf pushes with the standard YML file that comes with the project. I have verified this a large number of times during the last three days.
Hopefully the error below will be enough to go on:
C:\IBM\IBM BlueMix\Lennart BlueMix Apps\LennartSinatra18>cf logs LennartSinatra1
8 --recent
FAILED
websocket.Dial wss://loggregator.ng.bluemix.net:443/dump/?app=82b4a0b1-5db2-4c93
-9b72-000cee1f6550: bad status
Answer by Richard Johnson (3602) | Nov 04, 2014 at 10:37 AM
That cf logs output is not healthy. Is your cf up to date? cf -version will tell you the version, and it should be 6.6 or above https://github.com/cloudfoundry/cli is where you can download an updated version.
Hopefully with the extra correct log output you will see more help information about what is going wrong with your app.