Toni, thanks for your help. Yes, 9.30.x.x is the default route of VM as it’s external IP. And 172.16.x.x is internal IP.
How could I resolve the problem? Is it possible to make master-api and etcd to use same IP address by specifying something in inventory file? > On Sep 25, 2019, at 5:16 PM, Toni Schmidbauer > <toni+openshift-us...@stderr.at> wrote: > > > Yu Wei <yu20...@hotmail.com> writes: >> F0924 22:58:50.301065 1 start_api.go:68] dial tcp 172.16.211.60:2379: >> connect: connection refused > > the api tries to contact etcd on 172.16.211.60:2379 but > >> 2019-09-24 20:34:26.273020 I | embed: serving client requests on >> 126.96.36.199:2379 > > but etcd listens for client request on 188.8.131.52. > > a wild guess is that your hostname resolves to 172.16.x.x but your > default route points to 9.30.x.x. > > for a longer explanation why i think this is the case read on :-) > > the listing address for etcd is configure in /etc/etcd/etcd.conf > (ETCD_LISTEN_CLIENT_URLS). > > etcd.conf gets created by the openshift-ansible role etcd > (/usr/share/ansible/openshift-ansible/roles/etcd/templates/etcd.conf.j2), > it uses etcd_listen_client_urls. > > etcd_listen_client_urls uses etcd_ip which gets set via > openshift.common.ip, that's a custom fact to be found in > openshift_facts.py > (.../roles/openshift_facts/library/openshift_facts.py). > > in get_defaults() ip_addr gets set to the standard ansible fact > ansible_default_ipv4.address, this is then used common.ip. > > so it seems that ansible thinks that 184.108.40.206.88 is your default > interface, i'm not 100% sure, but this might be because your default > route points to this nic (ip route sh). > > the config option for the api to contact etcd is in > /etc/origin/master/master-config.yaml, etcdClientInfo.urls. > openshift-ansible uses openshift_master_etcd_hosts for this, afaik this > is set via the custom fact openshift.common.hostname (once again in > openshift_facts.py) for figuring out the public hostname (it reuses > ansible_nodename and ansible_fqdn). > > hopefully this is not too confusing... > > hth > toni > > _______________________________________________ > users mailing list > us...@lists.openshift.redhat.com > http://lists.openshift.redhat.com/openshiftmm/listinfo/users _______________________________________________ dev mailing list email@example.com http://lists.openshift.redhat.com/openshiftmm/listinfo/dev