cloudfoundry / diego-release

BOSH Release for Diego
Apache License 2.0
201 stars 212 forks source link

Deploy application on CloudFoundry Error! #341

Closed ngocvanho closed 7 years ago

ngocvanho commented 7 years ago

Hi All, I have deployed cloudfoundry use bosh-lite on local environment. The deployment already successfully. But, when i push app, the error display: FAILED Error restarting application: Server error, status code: 500, error code: 170011, message: Stager error: Failed to open TCP connection to stager.service.cf.internal:8888 (getaddrinfo: Name or service not known).

I have seem issues about this problem and have followed but still can not fix. Please help me fix it if you known.

Stemcell +---------------------------------------------+---------------+----------+--------------------------------------+ | Name | OS | Version | CID | +---------------------------------------------+---------------+----------+--------------------------------------+ | bosh-warden-boshlite-ubuntu-trusty-go_agent | ubuntu-trusty | 3421.11* | 5307d948-a756-44b9-4c11-b937a670f8a2 | +---------------------------------------------+---------------+----------+--------------------------------------+

Release +------+------------+-------------+ | Name | Versions | Commit Hash | +------+------------+-------------+ | cf | 269+dev.1* | b31611aa | +------+------------+-------------+

bosh vms RSA 1024 bit CA certificates are loaded due to old openssl compatibility Acting as user 'admin' on 'Bosh Lite Director' Deployment 'cf-warden'

Director task 8

Task 8 done

+---------------------------------------------------------------------------+---------+-----+-----------+--------------+ | VM | State | AZ | VM Type | IPs | +---------------------------------------------------------------------------+---------+-----+-----------+--------------+ | api_z1/0 (f160ec0c-5734-4b83-abcd-68fd0680d027) | running | n/a | large_z1 | 10.244.0.138 | | blobstore_z1/0 (fe2267a8-0a0f-4edd-af73-0d67d67560a3) | running | n/a | medium_z1 | 10.244.0.130 | | consul_z1/0 (0543360b-25c1-4592-b291-2bbf828753b1) | running | n/a | small_z1 | 10.244.0.54 | | doppler_z1/0 (f1dd47b9-a278-41d2-980a-3db38dd4d7d4) | running | n/a | medium_z1 | 10.244.0.142 | | etcd_z1/0 (472e87ac-d0af-4c96-8746-4466617449de) | running | n/a | large_z1 | 10.244.0.42 | | ha_proxy_z1/0 (b5ea3795-4070-4a54-a54c-5f67cfb4b14c) | running | n/a | router_z1 | 10.244.0.34 | | loggregator_trafficcontroller_z1/0 (0ce57d5f-9cc2-4829-9251-3983724f89da) | running | n/a | small_z1 | 10.244.0.146 | | nats_z1/0 (97db8647-8384-477c-84ed-66d39b58822f) | running | n/a | medium_z1 | 10.244.0.6 | | postgres_z1/0 (786737de-80bf-4010-9c03-558463227ba0) | running | n/a | medium_z1 | 10.244.0.30 | | router_z1/0 (9b980a97-e3fa-4684-b0c6-968f7eebddc6) | running | n/a | router_z1 | 10.244.0.22 | | uaa_z1/0 (9d014b96-2465-4113-8934-7637b9d5f15e) | running | n/a | medium_z1 | 10.244.0.134 | +---------------------------------------------------------------------------+---------+-----+-----------+--------------+

VMs total: 11

Thanks, Van

cf-gitbot commented 7 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/149994259

The labels on this github issue will be updated when the story is started.

emalm commented 7 years ago

Hi, @ngocvanho, if you're getting started out with Cloud Foundry on BOSH-Lite, I recommend you try deploying CF with cf-deployment instead of with the manifest-generation system that's currently split across cf-release and diego-release, as it's much easier and requires only a single manifest.

Anyway, the issue you have here is that you've deployed the manifest from cf-release, but not the one for Diego that provides the container runtime system. If you do want to proceed with the older manifest-generation system, https://github.com/cloudfoundry/diego-release/tree/develop/examples/bosh-lite has complete instructions to create a Diego deployment that integrates with the CF deployment.

Best, Eric

ngocvanho commented 7 years ago

Hi, @ematpl Thanks for your response. I have deleted old environment and try to deploy following https://github.com/cloudfoundry/diego-release/tree/develop/examples/bosh-lite, but when i run command deploy as below: cd ~/workspace/cf-release bosh deployment bosh-lite/deployments/cf.yml bosh -n create release --force && bosh -n upload release && bosh -n deploy error display Failed: 'consul_z1/0 (81c07aab-08cd-45a9-80d9-fb66bf7d5a00)' is not running after update. Review logs for failed jobs: consul_agent. If you known this issue, please help me resolve it.

Thanks, Van

software-engineer-mj commented 7 years ago

Hello @ngocvanho

I had the same issue when I deployed cf yesterday. It turns out that the consul certificates have been expired. The good new is that there will be an update soon. Here is the link. I hope this would be helpful!

Link: https://github.com/cloudfoundry/cf-release/pull/1229

ngocvanho commented 7 years ago

Hi @ematpl, @kmj940101, Thanks for your response. Can you help me path to see log consul_agent. I was find on /var/vcap but i could not find log about consul_agent.

When i run bosh instance --ps, result as below:

+----------------------------------------------------------------------------+---------+-----+-----------+--------------+ | Instance | State | AZ | VM Type | IPs | +----------------------------------------------------------------------------+---------+-----+-----------+--------------+ | api_z1/0 (92b9ef0e-e7ca-4a87-a1f4-9f009eff6f17) | running | n/a | large_z1 | 10.244.0.138 | +----------------------------------------------------------------------------+---------+-----+-----------+--------------+ | blobstore_z1/0 (785b9ce9-4e29-4254-8e50-628c8686b8bc) | running | n/a | medium_z1 | 10.244.0.130 | +----------------------------------------------------------------------------+---------+-----+-----------+--------------+ | consul_z1/0 (75193b18-a859-4166-b5c9-804e9a17d854) | failing | n/a | small_z1 | 10.244.0.54 | | consul_agent | unknown | | | | | metron_agent | running | | | | +----------------------------------------------------------------------------+---------+-----+-----------+--------------+ | doppler_z1/0 (e87646f8-65f4-468c-ae1b-7c65fa023deb) | running | n/a | medium_z1 | 10.244.0.142 | +----------------------------------------------------------------------------+---------+-----+-----------+--------------+ | etcd_z1/0 (5d5dc7a9-f8e5-4fc0-95f5-d247828bb1ac) | running | n/a | large_z1 | 10.244.0.42 | +----------------------------------------------------------------------------+---------+-----+-----------+--------------+ | ha_proxy_z1/0 (ce22e9d5-9d16-4ddc-a07f-1680b27a3bed) | running | n/a | router_z1 | 10.244.0.34 | +----------------------------------------------------------------------------+---------+-----+-----------+--------------+ | loggregator_trafficcontroller_z1/0 (fa30830c-74dd-4d31-89b2-91145ae0f04a) | running | n/a | small_z1 | 10.244.0.146 | +----------------------------------------------------------------------------+---------+-----+-----------+--------------+ | nats_z1/0 (5526af49-3bd4-4c27-9de9-bf9314fdcf40) | running | n/a | medium_z1 | 10.244.0.6 | +----------------------------------------------------------------------------+---------+-----+-----------+--------------+ | postgres_z1/0 (13b4c209-dc47-47bc-99a7-8a583b780d06) | running | n/a | medium_z1 | 10.244.0.30 | +----------------------------------------------------------------------------+---------+-----+-----------+--------------+ | router_z1/0 (327f615e-cd3d-4165-998a-6ee9d94608d0) | running | n/a | router_z1 | 10.244.0.22 | +----------------------------------------------------------------------------+---------+-----+-----------+--------------+ | uaa_z1/0 (0f1010b9-7918-4727-9aa7-d185f280258d)* | running | n/a | medium_z1 | 10.244.0.134 | +----------------------------------------------------------------------------+---------+-----+-----------+--------------+

Thanks, Van

emalm commented 7 years ago

Hi, @ngocvanho,

BOSH jobs conventionally place their logs under /var/vcap/sys/log. In the case of the consul agent job, they will be located under /var/vcap/sys/log/consul_agent. You can also use bosh logs to retrieve all the job logs from one or more instances in the deployment.

Also, again, I'd strongly recommend using cf-deployment to deploy CF to your BOSH-Lite instance.

Best, Eric

software-engineer-mj commented 7 years ago

Hi, @ngocvanho I heard the CF team will try to ship CF 271 soon with the appropriate fix. In the meantime you can use the release-candidate branch which has updated consul certificates.

Commit Link: https://github.com/cloudfoundry/cf-release/commit/4d42ddd044dc24f8ae676561a85e85d445a1f51c

screen shot 2017-08-18 at 1 02 50 am

If you are deploying CF using BOSH v1, follow these steps.

Minjeong@Minjeongs-MacBook-Air:~/workspace/cloud-foundry/cf-release$ git branch -a
* master
  remotes/origin/134203563-wip-cc-job-does-not-recieve-traffic-when-cc-down
  remotes/origin/HEAD -> origin/master
  remotes/origin/develop
  remotes/origin/master
  remotes/origin/migrate-to-scalablesyslog
  remotes/origin/release-candidate
  remotes/origin/release-elect

Minjeong@Minjeongs-MacBook-Air:~/workspace/cloud-foundry/cf-release$ git checkout release-candidate
Branch release-candidate set up to track remote branch release-candidate from origin.
Switched to a new branch 'release-candidate'

Minjeong@Minjeongs-MacBook-Air:~/workspace/cloud-foundry/cf-release$ git branch
  master
* release-candidate

Minjeong@Minjeongs-MacBook-Air:~/workspace/cloud-foundry/cf-release$ ./scripts/update

Minjeong@Minjeongs-MacBook-Air:~/workspace/cloud-foundry/cf-release$ ./scripts/generate-bosh-lite-dev-manifest

Minjeong@Minjeongs-MacBook-Air:~/workspace/cloud-foundry/cf-release$ bosh create release --force && bosh upload release && bosh -n deploy
emalm commented 7 years ago

Sounds like you've managed to get past this issue from commentary on #346, @ngocvanho, so I'll close out this issue now.