Re: master api failed to connect to etcd when installing open shift-enterprise 3.11

2019-09-25 Thread Yu Wei
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 
>  wrote:
> 
> 
> Yu Wei  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 
>> 9.30.119.88:2379
> 
> but etcd listens for client request on 9.30.119.88.
> 
> 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 9.3.30.119.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
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev


master api failed to connect to etcd when installing open shift-enterprise 3.11

2019-09-25 Thread Yu Wei
Hi,
I tried to install openshift enterprise 3.11 on one single node with two NICs.
Etcd and master-controller started and master-api failed to start due to 
connection to etcd refused.

Log from master-api container as below,
I0924 22:58:20.297828   1 plugins.go:84] Registered admission plugin 
"NamespaceExists"
I0924 22:58:20.297835   1 plugins.go:84] Registered admission plugin 
"NodeRestriction"
I0924 22:58:20.297844   1 plugins.go:84] Registered admission plugin 
"PersistentVolumeLabel"
I0924 22:58:20.297857   1 plugins.go:84] Registered admission plugin 
"PodNodeSelector"
I0924 22:58:20.297866   1 plugins.go:84] Registered admission plugin 
"PodPreset"
I0924 22:58:20.297875   1 plugins.go:84] Registered admission plugin 
"PodTolerationRestriction"
I0924 22:58:20.297885   1 plugins.go:84] Registered admission plugin 
"ResourceQuota"
I0924 22:58:20.297894   1 plugins.go:84] Registered admission plugin 
"PodSecurityPolicy"
I0924 22:58:20.297901   1 plugins.go:84] Registered admission plugin 
"Priority"
I0924 22:58:20.297908   1 plugins.go:84] Registered admission plugin 
"SecurityContextDeny"
I0924 22:58:20.297927   1 plugins.go:84] Registered admission plugin 
"ServiceAccount"
I0924 22:58:20.297934   1 plugins.go:84] Registered admission plugin 
"DefaultStorageClass"
I0924 22:58:20.297941   1 plugins.go:84] Registered admission plugin 
"PersistentVolumeClaimResize"
I0924 22:58:20.297948   1 plugins.go:84] Registered admission plugin 
"StorageObjectInUseProtection"
F0924 22:58:50.301065   1 start_api.go:68] dial tcp 172.16.211.60:2379: 
connect: connection refused

Log from etcd as below,
019-09-24 20:34:25.292743 I | embed: ClientTLS: cert = /etc/etcd/server.crt, 
key = /etc/etcd/server.key, ca = , trusted-ca = /etc/etcd/ca.crt, 
client-cert-auth = true
2019-09-24 20:34:25.293054 I | etcdserver/membership: added member 
9b85c8d12305d256 [https://9.30.119.88:2380] to cluster 1d7f9f2198813e8c
2019-09-24 20:34:26.272070 I | raft: 9b85c8d12305d256 is starting a new 
election at term 1
2019-09-24 20:34:26.272167 I | raft: 9b85c8d12305d256 became candidate at term 2
2019-09-24 20:34:26.272206 I | raft: 9b85c8d12305d256 received MsgVoteResp from 
9b85c8d12305d256 at term 2
2019-09-24 20:34:26.272226 I | raft: 9b85c8d12305d256 became leader at term 2
2019-09-24 20:34:26.272234 I | raft: raft.node: 9b85c8d12305d256 elected leader 
9b85c8d12305d256 at term 2
2019-09-24 20:34:26.272617 I | etcdserver: published 
{Name:buzz1.fyre.ibm.com 
ClientURLs:[https://9.30.119.88:2379]} to cluster 1d7f9f2198813e8c
2019-09-24 20:34:26.272734 I | etcdserver: setting up the initial cluster 
version to 3.2
2019-09-24 20:34:26.272774 I | embed: ready to serve client requests
2019-09-24 20:34:26.273020 I | embed: serving client requests on 
9.30.119.88:2379
2019-09-24 20:34:26.274011 N | etcdserver/membership: set the initial cluster 
version to 3.2
2019-09-24 20:34:26.274069 I | etcdserver/api: enabled capabilities for version 
3.2

Output from ‘ifconfig -a’ as below,
[root@buzz1 openshift-ansible]# ifconfig -a
docker0: flags=4099  mtu 1500
inet 172.17.0.1  netmask 255.255.0.0  broadcast 0.0.0.0
ether 02:42:d0:74:98:c6  txqueuelen 0  (Ethernet)
RX packets 0  bytes 0 (0.0 B)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 0  bytes 0 (0.0 B)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163  mtu 1500
inet 172.16.211.60  netmask 255.255.0.0  broadcast 172.16.255.255
ether 00:16:3e:01:d3:3c  txqueuelen 1000  (Ethernet)
RX packets 19994481  bytes 2780261854 (2.5 GiB)
RX errors 0  dropped 1  overruns 0  frame 0
TX packets 3220  bytes 285148 (278.4 KiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1: flags=4163  mtu 1500
inet 9.30.119.88  netmask 255.255.252.0  broadcast 9.30.119.255
ether 00:00:09:1e:77:58  txqueuelen 1000  (Ethernet)
RX packets 308744  bytes 319369670 (304.5 MiB)
RX errors 0  dropped 6  overruns 0  frame 0
TX packets 124636  bytes 15097082 (14.3 MiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73  mtu 65536
inet 127.0.0.1  netmask 255.0.0.0
loop  txqueuelen 1000  (Local Loopback)
RX packets 423233  bytes 216825068 (206.7 MiB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 423233  bytes 216825068 (206.7 MiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


Is the issue caused by two NICs?

Thanks,
Jared
___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev