Re: Failed to login to Cloud Foundry after upgrading from cfv212 to cfv218


Amit Kumar Gupta
 

It depends on which features you want to leverage. For simplicity, I
recommend either deploying all the jobs in the standard way, or trying
non-standard things like not deploying Consul if you wish, and then
checking whether the resulting installation meets your needs.

The routing API and gorouter expect to be able to discover UAA via Consul,
but if you're not using routing API features, you may not need to have
consul colocated with UAA.

On Fri, Mar 18, 2016 at 12:57 AM, 王小锋 <zzuwxf(a)gmail.com> wrote:

Thanks for your help, Amit

I double checked my deployment, I did not include "route_registrar" in the
template. I modified the manifest as below, is it correct now? thanks.

BTW, if I did not use diego yet, do I need to add "consul_agent" into the
deployment manifest? thanks.

- instances: 1
name: uaa_z1
networks:
- name: cf1
persistent_disk: 100240
properties:
metron_agent:
zone: z1
deployment: cfv212
route_registrar:
routes:
- name: uaa
port: 8080
uris:
- uaa.example.com
- '*.uaa.example.com'
- login.example.com
- '*.login.example.com'
router:
servers:
z1:
- 10.10.16.15
networks:
apps: cf1
resource_pool: large_z1
templates:
- name: uaa
release: cf
- name: metron_agent
release: cf
* - name: route_registrar*
* release: cf*
update: {}

2016-03-18 15:38 GMT+08:00 Amit Gupta <agupta(a)pivotal.io>:

You do not have the route registrar colocated with the uaa.

On Fri, Mar 18, 2016 at 12:28 AM, 王小锋 <zzuwxf(a)gmail.com> wrote:

Hi, Amit

My manifest snippet is as below, anything wrong? thanks.

- instances: 1
name: uaa_z1
networks:
- name: cf1
persistent_disk: 100240
properties:
metron_agent:
zone: z1
deployment: cfv212
route_registrar:
routes:
- name: uaa
port: 8080
uris:
- uaa.example.com
- '*.uaa.example.com'
- login.example.com
- '*.login.example.com'
router:
servers:
z1:
- 10.10.16.15
networks:
apps: cf1
resource_pool: large_z1
templates:
- name: uaa
release: cf
- name: metron_agent
release: cf
update: {}

2016-03-18 14:21 GMT+08:00 Amit Gupta <agupta(a)pivotal.io>:

Did you also configure route_registrar correctly? You need to tell it
which routes to register on behalf of the UAA. That information was also
in the release notes. You should not add the --register-with-router flag,
in general you should not need to hack any source code in a running
installation.

On Thu, Mar 17, 2016 at 11:06 PM, 王小锋 <zzuwxf(a)gmail.com> wrote:

Yes,

I added route_registrar and colocated it with cloud_controller_ng, uaa,
hm9000, and loggregator_trafficcontroller jobs.

I login to uaa VM and compare uaa_cf-registrar_ctl located under /var/vcap/jobs/uaa/bin,
and found that " --register-with-router \" was missed. After added
this line back to uaa_cf-registrar_ctl and restarted uaa using
monit, I am able to login to cf.

Not sure why "--register-with-router " was removed after cf 218 was
deployed using bosh. Any hints?

2016-03-18 13:26 GMT+08:00 Amit Gupta <agupta(a)pivotal.io>:

The UAA component should serve the login.example.com route. Did you
check out the release notes for 218? The first bullet in the important
section mentions how to configure and colocate the route registrar with the
UAA so that it gets the login route.

On Thu, Mar 17, 2016 at 8:33 PM, 王小锋 <zzuwxf(a)gmail.com> wrote:

Hi, there

I am using bosh to upgrade Cloud Foundry from cfv212 to cfv218.
The bosh deployment was successful, but when I try to login to cf, I met
the following error:

the detailed error info is as below, " login.exmaple.com " returns
404 error.

Could this be caused by "login" template removed from the
deployment? how to debug for this kind of error? your help is greatly
appreciated, thanks!

ip-10-10-0-118:~/micro$ cf login

VERSION:
6.12.1-56792aa

API endpoint: https://api.example.com

REQUEST: [2016-03-18T03:16:54Z]
GET /v2/info HTTP/1.1
Host: api.example.com
Accept: application/json
Content-Type: application/json
User-Agent: go-cli 6.12.1-56792aa / linux



RESPONSE: [2016-03-18T03:16:55Z]
HTTP/1.1 200 OK
Content-Length: 496
Connection: keep-alive
Content-Type: application/json;charset=utf-8
Date: Fri, 18 Mar 2016 03:16:59 GMT
Server: nginx
X-Cf-Requestid: 5036d843-0d67-45fa-6f82-ee7eda8825db
X-Content-Type-Options: nosniff
X-Vcap-Request-Id:
6169465d-a01e-4187-4863-d814e1d9131e::a42227d6-9e5e-4411-92e0-48d1dfa75019

{"name":"vcap","build":"2222","support":"
http://support.cloudfoundry.com","version":2,"description":"Cloud
Foundry sponsored by Pivotal","authorization_endpoint":"
http://login.example.com","token_endpoint":"https://uaa.example.com
","min_cli_version":null,"min_recommended_cli_version":null,"api_version":"2.36.0","app_ssh_endpoint":"
ssh.example.com:2222
","app_ssh_host_key_fingerprint":null,"logging_endpoint":"wss://
loggregator.example.com:4443","doppler_logging_endpoint":"wss://
doppler.example.com:443"}

REQUEST: [2016-03-18T03:16:55Z]
GET /login HTTP/1.1
Host: login.example.com
Accept: application/json
Content-Type: application/json
User-Agent: go-cli 6.12.1-56792aa / linux



RESPONSE: [2016-03-18T03:16:55Z]
HTTP/1.1 404 Not Found
Content-Length: 67
Connection: keep-alive
Content-Type: text/plain; charset=utf-8
Date: Fri, 18 Mar 2016 03:17:03 GMT
X-Cf-Requestid: 74e7c059-2735-4553-5d74-6c85d3a6c626
X-Cf-Routererror: unknown_route

404 Not Found: Requested route ('login.example.com') does not exist.

FAILED
Server error, status code: 404, error code: , message:
FAILED
Server error, status code: 404, error code: , message:

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.