SUSE / scf

SUSE Cloud Foundry
Other
77 stars 41 forks source link

How to config UAA-HOST? tcp-router connect to uaa fail. #1721

Closed geekyzk closed 6 years ago

geekyzk commented 6 years ago

Hi team: My config is:

env:
    # Domain for SCF. DNS for *.DOMAIN must point to a kube node's (not master)
    # external ip address.
    DOMAIN: cf-dev.io

    # UAA host/port that SCF will talk to. If you have a custom UAA
    # provide its host and port here. If you are using the UAA that comes
    # with the SCF distribution, simply use the two values below and
    # substitute the cf-dev.io for your DOMAIN used above.
    UAA_HOST: uaa.cf-dev.io
    # UAA_PORT: 2793

kube:
    # The IP address assigned to the kube node pointed to by the domain.
    #### the external_ip setting changed to accept a list of IPs, and was 
    #### renamed to external_ips 
    external_ips:
    - 192.168.7.22
    storage_class:
        # Make sure to change the value in here to whatever storage class you use
        persistent: "persistent"
        shared: "shared"
    auth: rbac

secrets:
    # Password for user 'admin' in the cluster
    CLUSTER_ADMIN_PASSWORD: mypaas

    # Password for SCF to authenticate with UAA
    UAA_ADMIN_CLIENT_SECRET: uaa

When i use to deploy scf , tcp-router and other compoent not work. it status is

NAME                                READY     STATUS      RESTARTS   AGE
api-0                               0/1       Running     1          16m
blobstore-0                         1/1       Running     0          16m
cc-clock-77d84dd98-l6hkd            1/1       Running     0          16m
cc-uploader-57b668788f-6qxhq        1/1       Running     0          16m
cc-worker-74f76c677d-sjpmq          1/1       Running     0          16m
cf-usb-5b969887f9-29q9l             0/1       Running     0          16m
diego-access-5c5cb7b6d7-tdmg2       1/1       Running     0          16m
diego-api-6c8b96c597-sj5zx          1/1       Running     0          16m
diego-brain-6594dfdbc5-5rpkc        1/1       Running     0          16m
diego-cell-0                        0/1       Running     0          16m
diego-locket-6756d56bb6-k8bht       1/1       Running     0          16m
doppler-0                           1/1       Running     0          16m
loggregator-5698c4569f-pm7lt        1/1       Running     0          16m
mysql-0                             1/1       Running     0          16m
mysql-proxy-59b486f8dc-phmp9        1/1       Running     0          16m
nats-0                              1/1       Running     0          16m
nfs-broker-5555d9c585-v292p         1/1       Running     0          16m
post-deployment-setup-1-slgvn       1/1       Running     0          16m
router-5bb54cf844-cvg58             0/1       Running     0          16m
routing-api-0                       0/1       Running     0          16m
secret-generation-1-78wcv           0/1       Completed   0          16m
syslog-adapter-6f5c4d9558-db7ls     1/1       Running     0          16m
syslog-rlp-65f997ccdd-r4nlg         1/1       Running     0          16m
syslog-scheduler-7c7788df59-bxrnf   1/1       Running     0          16m
tcp-router-86cb8cd89f-665l2         0/1       Running     0          16m

router-api exception:

Events:
  Type     Reason          Age                 From                              Message
  ----     ------          ----                ----                              -------
  Normal   Scheduled       33m                 default-scheduler                 Successfully assigned scf/routing-api-0 to geekyzk-virtual-machine
  Normal   SandboxChanged  31m (x6 over 33m)   kubelet, geekyzk-virtual-machine  Pod sandbox changed, it will be killed and re-created.
  Warning  Failed          31m (x8 over 33m)   kubelet, geekyzk-virtual-machine  Error: secrets "secrets-2.8.0-1" not found
  Normal   Pulled          31m (x9 over 33m)   kubelet, geekyzk-virtual-machine  Container image "docker.io/splatform/scf-routing-api:73fa8ca792bb04a69d34be261bd240ce6ef2f705" already present on machine
  Normal   Created         31m                 kubelet, geekyzk-virtual-machine  Created container
  Normal   Started         30m                 kubelet, geekyzk-virtual-machine  Started container
  Warning  Unhealthy       3m (x165 over 30m)  kubelet, geekyzk-virtual-machine  Readiness probe failed: dial tcp 10.244.0.106:3000: connect: connection refused

tcp-router . exception is

Trying: curl --connect-timeout 5 --fail --header Accept: application/json https://scf.uaa.cf-dev.io:2793/info
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:20 --:--:--     0
curl: (28) Resolving timed out after 5512 milliseconds

  FAILED

Waiting 30s ...
Trying: curl --connect-timeout 5 --fail --header Accept: application/json https://scf.uaa.cf-dev.io:2793/info
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:20 --:--:--     0
curl: (28) Resolving timed out after 5514 milliseconds

  FAILED

Waiting 30s ...

I install bind9 dns server ,and config *.cf-dev.io -> 192.168.7.22 , but is also fail, Can you help me?

mook-as commented 6 years ago

Hi there!

When using the vagrant box, we use 192.168.77.77, which is what cf-dev.io (and all of its subdomains) resolve to. If you're using 192.168.7.22 instead, you will need to use a different domain instead (possibly using something like nip.io, or your own domain).

You will need to deploy UAA first before deploying CF.

Please let us know how we can improve the readme to avoid issues like this, thanks!

geekyzk commented 6 years ago

@mook-as Hi,
I deployed a single node cluster and deployed scf using kubeadm in this regard, The node ip is 192.168.7.22。

Uaa has been deployed successfully。

mook-as commented 6 years ago

@geekyzk In that case, please use something like uaa.192.168.7.22.nip.io for your UAA_HOST in your config (and 192.168.7.22.nip.io for your DOMAIN).

If you are doing a deployment outside of vagrant, it is probably better to use a full DNS service (most cloud providers have one, if you're deploying into the cloud; for example, Amazon Route 53 or Azure DNS). The built-in hostname is just meant for vagrant.

As far as I can tell this is currently a configuration problem; please let me know if there's anymore things we can do. Closing for now, but please feel free to continue commenting, and please reopen if there's something concrete we can do on our side.