netifi-proteus / proteus-java

Proteus Java Client
https://www.netifi.com
Apache License 2.0
42 stars 3 forks source link

feat: nodes with null ip addresses are filtered out #37

Closed flyinprogrammer closed 5 years ago

flyinprogrammer commented 5 years ago

this current form doesn't work and returns:

Feb 05 19:38:36 ip-10-6-0-17 broker-server[2213]: 2019-02-05 19:38:36,762 DEBUG i.n.p.d.EC2TagsDiscoveryStrategy [single-1] using tag name netifi:application and tag value acme-broker-v1
Feb 05 19:38:37 ip-10-6-0-17 broker-server[2213]: 2019-02-05 19:38:37,851 DEBUG i.n.p.d.EC2TagsDiscoveryStrategy [sdk-async-response-0-0] instance i-0b5d6aa1b322968e8 had a null private ip, so we won't use it for discovery
Feb 05 19:38:37 ip-10-6-0-17 broker-server[2213]: 2019-02-05 19:38:37,853 DEBUG i.n.p.d.EC2TagsDiscoveryStrategy [sdk-async-response-0-0] found instance i-0630d92e3b2a78737 with private ip 10.6.0.39 and port 7001
Feb 05 19:38:37 ip-10-6-0-17 broker-server[2213]: 2019-02-05 19:38:37,854 DEBUG i.n.p.d.EC2TagsDiscoveryStrategy [sdk-async-response-0-0] instance i-0f8e2b7a47c33bad5 had a null private ip, so we won't use it for discovery
Feb 05 19:38:37 ip-10-6-0-17 broker-server[2213]: 2019-02-05 19:38:37,855 DEBUG i.n.p.d.EC2TagsDiscoveryStrategy [sdk-async-response-0-0] found instance i-01f4b5b4de5f6525a with private ip 10.6.0.17 and port 7001
Feb 05 19:38:37 ip-10-6-0-17 broker-server[2213]: 2019-02-05 19:38:37,855 DEBUG i.n.p.d.EC2TagsDiscoveryStrategy [sdk-async-response-0-0] instance i-01ce3ebc7213d5a41 had a null private ip, so we won't use it for discovery
Feb 05 19:38:37 ip-10-6-0-17 broker-server[2213]: 2019-02-05 19:38:37,855 DEBUG i.n.p.d.EC2TagsDiscoveryStrategy [sdk-async-response-0-0] found instance i-0d13955b4960a1ca2 with private ip 10.6.0.52 and port 7001
Feb 05 19:38:37 ip-10-6-0-17 broker-server[2213]: 2019-02-05 19:38:37,856 DEBUG i.n.p.d.EC2TagsDiscoveryStrategy [sdk-async-response-0-0] returning these nodes [null]

and then an infinite stream of:

Feb 05 19:45:42 ip-10-6-0-17 broker-server[2213]: 2019-02-05 19:45:42,225 DEBUG i.n.p.d.EC2TagsDiscoveryStrategy [parallel-2] using tag name netifi:application and tag value acme-broker-v1
Feb 05 19:45:42 ip-10-6-0-17 broker-server[2213]: 2019-02-05 19:45:42,338 DEBUG i.n.p.d.EC2TagsDiscoveryStrategy [sdk-async-response-0-29] instance i-0b5d6aa1b322968e8 had a null private ip, so we won't use it for discovery
Feb 05 19:45:42 ip-10-6-0-17 broker-server[2213]: 2019-02-05 19:45:42,338 DEBUG i.n.p.d.EC2TagsDiscoveryStrategy [sdk-async-response-0-29] found instance i-0630d92e3b2a78737 with private ip 10.6.0.39 and port 7001
Feb 05 19:45:42 ip-10-6-0-17 broker-server[2213]: 2019-02-05 19:45:42,338 DEBUG i.n.p.d.EC2TagsDiscoveryStrategy [sdk-async-response-0-29] instance i-0f8e2b7a47c33bad5 had a null private ip, so we won't use it for discovery
Feb 05 19:45:42 ip-10-6-0-17 broker-server[2213]: 2019-02-05 19:45:42,338 DEBUG i.n.p.d.EC2TagsDiscoveryStrategy [sdk-async-response-0-29] found instance i-01f4b5b4de5f6525a with private ip 10.6.0.17 and port 7001
Feb 05 19:45:42 ip-10-6-0-17 broker-server[2213]: 2019-02-05 19:45:42,338 DEBUG i.n.p.d.EC2TagsDiscoveryStrategy [sdk-async-response-0-29] instance i-01ce3ebc7213d5a41 had a null private ip, so we won't use it for discovery
Feb 05 19:45:42 ip-10-6-0-17 broker-server[2213]: 2019-02-05 19:45:42,338 DEBUG i.n.p.d.EC2TagsDiscoveryStrategy [sdk-async-response-0-29] found instance i-0d13955b4960a1ca2 with private ip 10.6.0.52 and port 7001
Feb 05 19:45:42 ip-10-6-0-17 broker-server[2213]: 2019-02-05 19:45:42,348 DEBUG i.n.p.d.EC2TagsDiscoveryStrategy [sdk-async-response-0-29] returning these nodes []
flyinprogrammer commented 5 years ago
i.n.p.d.EC2TagsDiscoveryStrategy [single-1] using tag name netifi:application and tag value acme-broker-v1
i.n.p.d.EC2TagsDiscoveryStrategy [sdk-async-response-0-0] found instance i-0ae90f9088c64bf43 with private ip 10.6.0.36 and port 7001
i.n.p.d.EC2TagsDiscoveryStrategy [sdk-async-response-0-0] found instance i-0ef7b4da9faebbe5a with private ip 10.6.0.11 and port 7001
i.n.p.d.EC2TagsDiscoveryStrategy [sdk-async-response-0-0] found instance i-09fa33aaad18df7c8 with private ip 10.6.0.41 and port 7001
i.n.p.d.EC2TagsDiscoveryStrategy [sdk-async-response-0-0] returning these nodes [10.6.0.36:7001, 10.6.0.11:7001, 10.6.0.41:7001]
i.n.p.b.a.ClusterSocketAcceptor [sdk-async-response-0-0] creating broker-to-broker connection to 10.6.0.36:7001
i.n.p.b.a.ClusterSocketAcceptor [sdk-async-response-0-0] creating broker-to-broker connection to 10.6.0.11:7001

seemed to work this morning without issue