allomov
5/7/2014 - 3:01 PM

cf-apps

ubuntu@lomov-local-machine-4:/var/lib/cloudfoundry/cfnats$ bundle exec nats-sub ">" -s nats://yHXHbm2:MrF8p4T@10.0.3.101:4222
Listening on [>]
[#1] Received on [router.register] : '{"host":"10.0.3.82","port":8080,"uris":["loggregator.10.0.3.136.xip.io"]}'
[#2] Received on [router.register] : '{"host":"10.0.3.231","port":9022,"uris":["api.10.0.3.136.xip.io"],"tags":{"component":"CloudController"},"index":1,"private_instance_id":null}'
[#3] Received on [router.register] : '{"host":"10.0.3.236","port":8080,"uris":["uaa.10.0.3.136.xip.io"],"tags":{"component":"uaa"},"index":1,"private_instance_id":"cbb4329d-361a-4b40-94cd-80d002914ed9"}'
[#4] Received on [dea.advertise] : '{"id":"0-864cd91a5e9746d9ad1d8ab8acb42d15","stacks":["lucid64"],"available_memory":3072,"available_disk":2048,"app_id_to_count":{},"placement_properties":{"zone":"CRAZY_TOWN"}}'
[#5] Received on [staging.advertise] : '{"id":"0-864cd91a5e9746d9ad1d8ab8acb42d15","stacks":["lucid64"],"available_memory":3072}'
[#6] Received on [router.register] : '{"host":"192.168.122.57","port":8077,"uris":["0ebf41fb7a2e4888ac8739d21a283bac.10.0.3.136.xip.io"],"tags":{"component":"directory-server-0"}}'
[#7] Received on [router.register] : '{"host":"10.0.3.82","port":8080,"uris":["loggregator.10.0.3.136.xip.io"]}'
[#8] Received on [staging.stop] : '{"app_id":"e18d4333-cc5a-4aec-96f7-6a5ac94a703f"}'
[#9] Received on [staging.0-864cd91a5e9746d9ad1d8ab8acb42d15.start] : '{"app_id":"e18d4333-cc5a-4aec-96f7-6a5ac94a703f","task_id":"1a74fae1ee04422eb26993bf2c91ba0b","properties":{"services":[],"resources":{"memory":1024,"disk":1024,"fds":16384},"environment":[],"meta":{"console":false}},"download_uri":"http://user:Password@10.0.3.231:9022/staging/apps/e18d4333-cc5a-4aec-96f7-6a5ac94a703f","upload_uri":"http://user:Password@10.0.3.231:9022/staging/droplets/e18d4333-cc5a-4aec-96f7-6a5ac94a703f/upload","buildpack_cache_download_uri":null,"buildpack_cache_upload_uri":"http://user:Password@10.0.3.231:9022/staging/buildpack_cache/e18d4333-cc5a-4aec-96f7-6a5ac94a703f/upload","start_message":{"droplet":"e18d4333-cc5a-4aec-96f7-6a5ac94a703f","name":"a","uris":["a.10.0.3.136.xip.io"],"prod":false,"sha1":null,"executableFile":"deprecated","executableUri":null,"version":"bc544965-b10a-44b2-b8ba-0783db77e086","services":[],"limits":{"mem":1024,"disk":1024,"fds":16384},"cc_partition":"default","env":[],"console":false,"debug":null,"start_command":null,"health_check_timeout":null,"index":0},"admin_buildpacks":[]}'
[#10] Received on [router.register] : '{"host":"10.0.3.231","port":9022,"uris":["api.10.0.3.136.xip.io"],"tags":{"component":"CloudController"},"index":1,"private_instance_id":null}'
[#11] Received on [_INBOX.f43fdbf8fb84440d28588f7162] : '{"task_id":"1a74fae1ee04422eb26993bf2c91ba0b","task_streaming_log_url":"http://0ebf41fb7a2e4888ac8739d21a283bac.10.0.3.136.xip.io/staging_tasks/1a74fae1ee04422eb26993bf2c91ba0b/file_path?hmac=b5311177b722ad5de68469291c9c6aa95281471ebff7ce84ed88775e1483f43b3c407f2de626b0f4eb28c7e4308eb966d9ae7a1122029f6f37cbb4e3eff9eff1&path=%2Ftmp%2Fstaged%2Flogs%2Fstaging_task.log&timestamp=1399476684","detected_buildpack":null,"error":null,"droplet_sha1":null}'
[#12] Received on [router.register] : '{"host":"10.0.3.236","port":8080,"uris":["uaa.10.0.3.136.xip.io"],"tags":{"component":"uaa"},"index":1,"private_instance_id":"cbb4329d-361a-4b40-94cd-80d002914ed9"}'
[#13] Received on [dea.advertise] : '{"id":"0-864cd91a5e9746d9ad1d8ab8acb42d15","stacks":["lucid64"],"available_memory":2048,"available_disk":0,"app_id_to_count":{},"placement_properties":{"zone":"CRAZY_TOWN"}}'
[#14] Received on [staging.advertise] : '{"id":"0-864cd91a5e9746d9ad1d8ab8acb42d15","stacks":["lucid64"],"available_memory":2048}'
[#15] Received on [router.register] : '{"host":"192.168.122.57","port":8077,"uris":["0ebf41fb7a2e4888ac8739d21a283bac.10.0.3.136.xip.io"],"tags":{"component":"directory-server-0"}}'
[#16] Received on [router.register] : '{"host":"10.0.3.82","port":8080,"uris":["loggregator.10.0.3.136.xip.io"]}'
[#17] Received on [router.register] : '{"host":"10.0.3.231","port":9022,"uris":["api.10.0.3.136.xip.io"],"tags":{"component":"CloudController"},"index":1,"private_instance_id":null}'
[#18] Received on [router.register] : '{"host":"10.0.3.236","port":8080,"uris":["uaa.10.0.3.136.xip.io"],"tags":{"component":"uaa"},"index":1,"private_instance_id":"cbb4329d-361a-4b40-94cd-80d002914ed9"}'
[#19] Received on [dea.advertise] : '{"id":"0-864cd91a5e9746d9ad1d8ab8acb42d15","stacks":["lucid64"],"available_memory":2048,"available_disk":0,"app_id_to_count":{},"placement_properties":{"zone":"CRAZY_TOWN"}}'
[#20] Received on [staging.advertise] : '{"id":"0-864cd91a5e9746d9ad1d8ab8acb42d15","stacks":["lucid64"],"available_memory":2048}'
[#21] Received on [router.register] : '{"host":"192.168.122.57","port":8077,"uris":["0ebf41fb7a2e4888ac8739d21a283bac.10.0.3.136.xip.io"],"tags":{"component":"directory-server-0"}}'
[#22] Received on [router.register] : '{"host":"10.0.3.82","port":8080,"uris":["loggregator.10.0.3.136.xip.io"]}'
[#23] Received on [router.register] : '{"host":"10.0.3.231","port":9022,"uris":["api.10.0.3.136.xip.io"],"tags":{"component":"CloudController"},"index":1,"private_instance_id":null}'
[#24] Received on [router.register] : '{"host":"10.0.3.236","port":8080,"uris":["uaa.10.0.3.136.xip.io"],"tags":{"component":"uaa"},"index":1,"private_instance_id":"cbb4329d-361a-4b40-94cd-80d002914ed9"}'
[#25] Received on [dea.advertise] : '{"id":"0-864cd91a5e9746d9ad1d8ab8acb42d15","stacks":["lucid64"],"available_memory":2048,"available_disk":0,"app_id_to_count":{},"placement_properties":{"zone":"CRAZY_TOWN"}}'
→ cf logs a
Connected, tailing logs for app a in org my-org / space my-space as admin...

2014-05-07T17:47:30.34+0300 [App/0]   OUT 
2014-05-07T17:47:30.34+0300 [App/0]   ERR [2014-05-07 14:47:30] INFO  WEBrick 1.3.1
2014-05-07T17:47:30.34+0300 [App/0]   ERR [2014-05-07 14:47:30] INFO  ruby 1.9.3 (2012-11-10) [x86_64-linux]
2014-05-07T17:47:30.34+0300 [App/0]   ERR [2014-05-07 14:47:30] INFO  WEBrick::HTTPServer#start: pid=28 port=61001



2014-05-07T17:51:13.12+0300 [App/0]   ERR [2014-05-07 14:51:13] ERROR SignalException: SIGTERM
2014-05-07T17:51:13.12+0300 [App/0]   ERR 	/home/vcap/app/vendor/ruby-1.9.3/lib/ruby/1.9.1/webrick/server.rb:98:in `select'


2014-05-07T17:59:28.19+0300 [App/0]   OUT 
2014-05-07T17:59:28.19+0300 [App/0]   ERR [2014-05-07 14:59:27] INFO  WEBrick 1.3.1
2014-05-07T17:59:28.19+0300 [App/0]   ERR [2014-05-07 14:59:27] INFO  ruby 1.9.3 (2012-11-10) [x86_64-linux]
2014-05-07T17:59:28.19+0300 [App/0]   ERR [2014-05-07 14:59:27] INFO  WEBrick::HTTPServer#start: pid=28 port=61003
2014-05-07T17:59:31.45+0300 [App/0]   ERR [2014-05-07 14:59:31] ERROR SignalException: SIGTERM
2014-05-07T17:59:31.45+0300 [App/0]   ERR 	/home/vcap/app/vendor/ruby-1.9.3/lib/ruby/1.9.1/webrick/server.rb:98:in `select'
ubuntu@ubuntu:~$ initctl list | grep cf
cf-dir-server start/running, process 28037
cf-warden start/running, process 28042
cf-dea start/running, process 28052
cf-dea-logging-agent start/running, process 28099
→ cf push a -i 1 -p ~/sinatra-test-app
Creating app a in org my-org / space my-space as admin...
OK

Creating route a.10.0.3.101.xip.io...
OK

Binding a.10.0.3.101.xip.io to a...
OK

Uploading a...
Uploading app files from: /home/lomov/sinatra-test-app
Uploading 1K, 4 files
OK

Starting app a in org my-org / space my-space as admin...
OK

1 of 1 instances running

App started

Showing health and status for app a in org my-org / space my-space as admin...
OK

requested state: started
instances: 0/1
usage: 1G x 1 instances
urls: a.10.0.3.101.xip.io

     state     since                    cpu    memory        disk   
#0   running   2014-05-09 12:21:57 AM   0.0%   18.6M of 1G   51.5M of 1G   
→ cf apps
Getting apps in org my-org / space my-space as admin...
OK

name   requested state   instances   memory   disk   urls   
a      started           0/1         1G       1G     a.10.0.3.101.xip.io