Hello David,

It's really solve my problem ;)

Thanks

Ricardo Reis

Em sexta-feira, 6 de fevereiro de 2015 08:52:03 UTC-2, David Pilato 
escreveu:
>
> What we do this in AWS plugin:
>
> - get the IP address from AWS API (which obviously does know anything 
> about the port used)
> address = instance.getPrivateIpAddress();
>
> - transform this String to a TransportAddress which will basically be 
> IP:9300:
> TransportAddress[] addresses 
> = transportService.addressesFromString(address);
>
> - try to join IP:9300 which obviously answers but this is not the one you 
> are expecting.
>
> I wonder if setting transport.tcp.port: 9302 could help here.
> By default this value is 9300-9399.
>
>
> -- 
> *David Pilato* | *Technical Advocate* | *Elasticsearch.com 
> <http://Elasticsearch.com>*
> @dadoonet <https://twitter.com/dadoonet> | @elasticsearchfr 
> <https://twitter.com/elasticsearchfr> | @scrutmydocs 
> <https://twitter.com/scrutmydocs>
>
>
>  
> Le 6 févr. 2015 à 01:23, Ricardo Alves dos Reis <ricard...@gmail.com 
> <javascript:>> a écrit :
>
> Hello folks,
>
>
> First of all, I'd like to explain my current necessity to bring this 
> future trend out, some projects in my company have bean developed to use a 
> lot of micro-services, unfortunately, is not uncommon that the mean of cpu 
> usage in our cloud servers (AWS) are sustained in a lower degrees.
>
>
> To provisioning these resources easily all the components are executed in 
> a docker containers and these stacks were represented as yaml file (
> http://www.fig.sh). In a group of servers I've more than one 
> Elasticsearch clusters, containerized to use EC2 discovery and with a 
> transport.publish_port configured to avoid collision, however, only the 
> first cluster in default transport port have a correct cluster formation.
>
>
> My guess is the transport.publish_post is not used as pointer to 
> discovery.zen.unicast to avoid unused transport port.. 
>
>
> Thanks for any kind of help.
>
>
> #docker #aws #discovery
>
>
> fig.yml
>
>
> esemail:
>
> image: XXX/elasticsearch:latest
>
> volumes:
>
> - /dev/log:/dev/log
>
> - /data0/email:/data/0
>
> - /data1/email:/data/1
>
> ports:
>
> - "9202:9200"
>
> - "9302:9300"
>
> environment:
>
> TRANSPORT_PUBLISH_PORT: 9302
>
> NETWORK_PUBLISH_HOST: _ec2_
>
> CLUSTER_ROUTING_ALLOCATION_SAME_SHARD_HOST: "true"
>
> ES_ROOT_LOG_LEVEL: INFO
>
> ES_DISCOVERY_LOG_LEVEL: TRACE
>
> ES_LOG_DIR: /var/log/elasticsearch
>
> ES_HEAP_SIZE: 1g
>
> ES_DIRECT_SIZE: 256m
>
> ES_JAVA_OPTS: "-server -XX:+UseCompressedOops -XX:+DoEscapeAnalysis 
> -XX:+AlwaysPreTouch -verbose:gc -Xloggc:/var/log/elasticsearch/gc.log 
> -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=512K"
>
> MAX_OPEN_FILES: 65535
>
> MAX_MAP_COUNT: 262144
>
> CLUSTER_NAME: email-es
>
> NODE_MASTER: "true"
>
> NODE_DATA: "true"
>
> PATH_DATA: /data/0/datasearch0,/data/1/datasearch0
>
> BOOTSTRAP_MLOCKALL: "false"
>
> DISCOVERY_ZEN_MCAST: "false"
>
> DISCOVERY_ZEN_REJOIN_ON_MASTER_GONE: "false"
>
> DISCOVERY_ZEN_MINIMUM_MASTER_NODES: 2
>
> DISCOVERY_TYPE: ec2
>
> DISCOVERY_EC2_ANY_GROUP: "false"
>
> DISCOVERY_EC2_GROUPS: db-prod-es-mail
>
> DISCOVERY_EC2_AVAILABILITY_ZONES: us-east-1a,us-east-1b,us-east-1d
>
> DISCOVERY_EC2_HOST_TYPE: private_ip
>
> DISCOVERY_EC2_PING_TIMEOUT: 1m
>
> GATEWAY_RECOVER_AFTER_NODES: 2
>
> GATEWAY_RECOVER_AFTER_TIME: 2m
>
> GATEWAY_EXPECTED_NODES: 3
>
> AWS_ELB_NAME: ESEmailBionexo
>
> AWS_ACCESS_KEY_ID: XXXXX
>
> AWS_SECRET_ACCESS_KEY: XXXX 
>
> AWS_DEFAULT_REGION: us-east-1
>
> THREAD_POOL_SEARCH: 2000
>
> THREAD_POOL_INDEX: 2000
>
> THREAD_POOL_BULK: 2000
>
>
> [ec2-user@ip-172-16-255-20 ~]$ sudo docker ps |grep elastic
>
> d1b9ebf8c605 bionexo/elasticsearch:2015020502 "/bin/sh -c /bionexo 3 hours 
> ago Up 3 hours 0.0.0.0:9202->9200/tcp, 0.0.0.0:9302->9300/tcp 
> elasticsearch_esemail_1 
>
> 088da31f943b bionexo/elasticsearch:2015020401 "/bin/sh -c /bionexo 35 
> hours ago Up 35 hours 0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp 
> elasticsearch_eslogger_1 
>
>
> [2015-02-05 20:53:09,834][DEBUG][action.admin.indices.create] 
> [d1b9ebf8c605] no known master node, scheduling a retry
>
> [2015-02-05 20:53:09,853][DEBUG][action.admin.indices.create] 
> [d1b9ebf8c605] observer: timeout notification from cluster service. timeout 
> setting [1m], time since start [1m]
>
> [2015-02-05 20:53:09,854][DEBUG][action.admin.indices.create] 
> [d1b9ebf8c605] observer: timeout notification from cluster service. timeout 
> setting [1m], time since start [1m]
>
> [2015-02-05 20:53:10,637][DEBUG][action.admin.indices.create] 
> [d1b9ebf8c605] no known master node, scheduling a retry
>
> [2015-02-05 20:53:10,637][DEBUG][action.admin.indices.create] 
> [d1b9ebf8c605] no known master node, scheduling a retry
>
> [2015-02-05 20:53:23,833][DEBUG][action.admin.indices.create] 
> [d1b9ebf8c605] no known master node, scheduling a retry
>
> [2015-02-05 20:53:25,837][DEBUG][action.admin.indices.create] 
> [d1b9ebf8c605] observer: timeout notification from cluster service. timeout 
> setting [1m], time since start [1m]
>
> [2015-02-05 20:53:26,618][DEBUG][action.admin.indices.create] 
> [d1b9ebf8c605] no known master node, scheduling a retry
>
> [2015-02-05 20:53:35,724][DEBUG][action.admin.indices.create] 
> [d1b9ebf8c605] observer: timeout notification from cluster service. timeout 
> setting [1m], time since start [1m]
>
> [2015-02-05 20:53:38,034][TRACE][discovery.ec2 ] [d1b9ebf8c605] building 
> dynamic unicast discovery nodes...
>
> [2015-02-05 20:53:38,034][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-713a399d based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: prod_apps,GroupId: sg-620d6b07}, {GroupName: 
> host-healthcheck,GroupId: sg-73df7e17}], does not include all of 
> [db-prod-es-mail]
>
> [2015-02-05 20:53:38,034][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-7bd2f097 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: prod_apps,GroupId: sg-620d6b07}, {GroupName: 
> host-healthcheck,GroupId: sg-73df7e17}], does not include all of 
> [db-prod-es-mail]
>
> [2015-02-05 20:53:38,035][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-0b25abfa based on groups [{GroupName: default,GroupId: 
> sg-62e42407}], does not include all of [db-prod-es-mail]
>
> [2015-02-05 20:53:38,035][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-83c39ca2 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: automation,GroupId: sg-90c510f5}], does not 
> include all of [db-prod-es-mail]
>
> [2015-02-05 20:53:38,035][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-7d49e897 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: db-prod-oracle,GroupId: sg-f972d79c}], does not 
> include all of [db-prod-es-mail]
>
> [2015-02-05 20:53:38,035][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-fb9cc0d7 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: prod_apps,GroupId: sg-620d6b07}], does not 
> include all of [db-prod-es-mail]
>
> [2015-02-05 20:53:38,035][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-a72ef14d based on groups [{GroupName: corporativo,GroupId: 
> sg-8f9c46ea}, {GroupName: default,GroupId: sg-62e42407}], does not include 
> all of [db-prod-es-mail]
>
> [2015-02-05 20:53:38,035][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-54763907 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: prod_apps,GroupId: sg-620d6b07}], does not 
> include all of [db-prod-es-mail]
>
> [2015-02-05 20:53:38,035][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-b98e5e48 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: prod_apps,GroupId: sg-620d6b07}, {GroupName: 
> host-healthcheck,GroupId: sg-73df7e17}], does not include all of 
> [db-prod-es-mail]
>
> [2015-02-05 20:53:38,036][TRACE][discovery.ec2 ] [d1b9ebf8c605] adding 
> i-b0384441, address 172.16.250.83, transport_address inet[/
> 172.16.250.83:9300]
>
> [2015-02-05 20:53:38,036][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-84b324d7 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: demo_apps,GroupId: sg-44c31d21}], does not 
> include all of [db-prod-es-mail]
>
> [2015-02-05 20:53:38,036][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-eb29db01 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: prod_apps,GroupId: sg-620d6b07}], does not 
> include all of [db-prod-es-mail]
>
> [2015-02-05 20:53:38,037][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-6cdd259d based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: prod_apps,GroupId: sg-620d6b07}, {GroupName: 
> host-healthcheck,GroupId: sg-73df7e17}], does not include all of 
> [db-prod-es-mail]
>
> [2015-02-05 20:53:38,037][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-53cabead based on groups [{GroupName: default,GroupId: 
> sg-62e42407}], does not include all of [db-prod-es-mail]
>
> [2015-02-05 20:53:38,037][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-f5f21004 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: prod_apps,GroupId: sg-620d6b07}, {GroupName: 
> host-healthcheck,GroupId: sg-73df7e17}], does not include all of 
> [db-prod-es-mail]
>
> [2015-02-05 20:53:38,037][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-fd21a317 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: prod_apps,GroupId: sg-620d6b07}], does not 
> include all of [db-prod-es-mail]
>
> [2015-02-05 20:53:38,037][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-ebd815bb based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: db-prod-oracle,GroupId: sg-f972d79c}], does not 
> include all of [db-prod-es-mail]
>
> [2015-02-05 20:53:38,037][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-81187b70 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: prod_apps,GroupId: sg-620d6b07}, {GroupName: 
> host-healthcheck,GroupId: sg-73df7e17}], does not include all of 
> [db-prod-es-mail]
>
> [2015-02-05 20:53:38,038][TRACE][discovery.ec2 ] [d1b9ebf8c605] adding 
> i-4d52afb7, address 172.16.255.20, transport_address inet[/
> 172.16.255.20:9300]
>
> [2015-02-05 20:53:38,039][TRACE][discovery.ec2 ] [d1b9ebf8c605] adding 
> i-90f2367f, address 172.16.255.149, transport_address inet[/
> 172.16.255.149:9300]
>
> [2015-02-05 20:53:38,039][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-b25d8e5f based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: db-prod-oracle,GroupId: sg-f972d79c}], does not 
> include all of [db-prod-es-mail]
>
> [2015-02-05 20:53:38,039][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-4517fab4 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: prod_apps,GroupId: sg-620d6b07}, {GroupName: 
> host-healthcheck,GroupId: sg-73df7e17}], does not include all of 
> [db-prod-es-mail]
>
> [2015-02-05 20:53:38,039][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-573bf607 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: vpn,GroupId: sg-4fac3e2a}], does not include all 
> of [db-prod-es-mail]
>
> [2015-02-05 20:53:38,039][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-ca09f627 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: varnish,GroupId: sg-3815eb5c}], does not include 
> all of [db-prod-es-mail]
>
> [2015-02-05 20:53:38,040][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-a2728b53 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: prod_apps,GroupId: sg-620d6b07}, {GroupName: 
> host-healthcheck,GroupId: sg-73df7e17}], does not include all of 
> [db-prod-es-mail]
>
> [2015-02-05 20:53:38,040][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-fb222600 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: prod_apps,GroupId: sg-620d6b07}, {GroupName: 
> host-healthcheck,GroupId: sg-73df7e17}], does not include all of 
> [db-prod-es-mail]
>
> [2015-02-05 20:53:38,040][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-502433bc based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: prod_apps,GroupId: sg-620d6b07}, {GroupName: 
> host-healthcheck,GroupId: sg-73df7e17}], does not include all of 
> [db-prod-es-mail]
>
> [2015-02-05 20:53:38,040][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-2e871305 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}], does not include all of [db-prod-es-mail]
>
> [2015-02-05 20:53:38,040][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-3a7f91c0 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: db-prod-oracle,GroupId: sg-f972d79c}], does not 
> include all of [db-prod-es-mail]
>
> [2015-02-05 20:53:38,040][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-19a469e3 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}, {GroupName: db-prod-oracle,GroupId: sg-f972d79c}], does not 
> include all of [db-prod-es-mail]
>
> [2015-02-05 20:53:38,040][TRACE][discovery.ec2 ] [d1b9ebf8c605] filtering 
> out instance i-e8038e04 based on groups [{GroupName: default,GroupId: 
> sg-62e42407}], does not include all of [db-prod-es-mail]
>
> [2015-02-05 20:53:38,040][DEBUG][discovery.ec2 ] [d1b9ebf8c605] using 
> dynamic discovery nodes 
> [[#cloud-i-b0384441-0][d1b9ebf8c605][inet[/172.16.250.83:9300]], 
> [#cloud-i-4d52afb7-0][d1b9ebf8c605][inet[/172.16.255.20:9300]], 
> [#cloud-i-90f2367f-0][d1b9ebf8c605][inet[/172.16.255.149:9300]]]
>
> [2015-02-05 20:53:38,041][TRACE][discovery.zen.ping.unicast] 
> [d1b9ebf8c605] replacing [#cloud-i-4d52afb7-0][d1b9ebf8c605][inet[/
> 172.16.255.20:9300]] with temp node 
> [#zen_unicast_22_#cloud-i-4d52afb7-0#][d1b9ebf8c605][inet[/
> 172.16.255.20:9300]]
>
> [2015-02-05 20:53:38,042][TRACE][discovery.zen.ping.unicast] 
> [d1b9ebf8c605] [3] connecting (light) to 
> [#zen_unicast_22_#cloud-i-4d52afb7-0#][d1b9ebf8c605][inet[/
> 172.16.255.20:9300]]
>
> [2015-02-05 20:53:38,042][TRACE][discovery.zen.ping.unicast] 
> [d1b9ebf8c605] replacing [#cloud-i-90f2367f-0][d1b9ebf8c605][inet[/
> 172.16.255.149:9300]] with temp node 
> [#zen_unicast_23_#cloud-i-90f2367f-0#][d1b9ebf8c605][inet[/
> 172.16.255.149:9300]]
>
> [2015-02-05 20:53:38,042][TRACE][discovery.zen.ping.unicast] 
> [d1b9ebf8c605] [3] connecting (light) to 
> [#zen_unicast_23_#cloud-i-90f2367f-0#][d1b9ebf8c605][inet[/
> 172.16.255.149:9300]]
>
> [2015-02-05 20:53:38,043][TRACE][discovery.zen.ping.unicast] 
> [d1b9ebf8c605] replacing [#cloud-i-b0384441-0][d1b9ebf8c605][inet[/
> 172.16.250.83:9300]] with temp node 
> [#zen_unicast_24_#cloud-i-b0384441-0#][d1b9ebf8c605][inet[/
> 172.16.250.83:9300]]
>
> [2015-02-05 20:53:38,043][TRACE][discovery.zen.ping.unicast] 
> [d1b9ebf8c605] [3] connected to [#cloud-i-4d52afb7-0][d1b9ebf8c605][inet[/
> 172.16.255.20:9300]]
>
> [2015-02-05 20:53:38,043][TRACE][discovery.zen.ping.unicast] 
> [d1b9ebf8c605] [3] sending to 
> [#zen_unicast_22_#cloud-i-4d52afb7-0#][d1b9ebf8c605][inet[/172.16.255.20:9300]],
>  
> using >=1.4.0 serialization
>
> [2015-02-05 20:53:38,043][TRACE][discovery.zen.ping.unicast] 
> [d1b9ebf8c605] [3] connecting (light) to 
> [#zen_unicast_24_#cloud-i-b0384441-0#][d1b9ebf8c605][inet[/
> 172.16.250.83:9300]]
>
> [2015-02-05 20:53:38,044][TRACE][discovery.zen.ping.unicast] 
> [d1b9ebf8c605] [3] connected to [#cloud-i-90f2367f-0][d1b9ebf8c605][inet[/
> 172.16.255.149:9300]]
>
> [2015-02-05 20:53:38,045][TRACE][discovery.zen.ping.unicast] 
> [d1b9ebf8c605] [3] sending to 
> [#zen_unicast_23_#cloud-i-90f2367f-0#][d1b9ebf8c605][inet[/172.16.255.149:9300]],
>  
> using >=1.4.0 serialization
>
> [2015-02-05 20:53:38,045][TRACE][discovery.zen.ping.unicast] 
> [d1b9ebf8c605] [3] connected to [#cloud-i-b0384441-0][d1b9ebf8c605][inet[/
> 172.16.250.83:9300]]
>
> [2015-02-05 20:53:38,045][TRACE][discovery.zen.ping.unicast] 
> [d1b9ebf8c605] [3] sending to 
> [#zen_unicast_24_#cloud-i-b0384441-0#][d1b9ebf8c605][inet[/172.16.250.83:9300]],
>  
> using >=1.4.0 serialization
>
> [2015-02-05 20:53:38,046][TRACE][discovery.zen.ping.unicast] 
> [d1b9ebf8c605] [3] sending to 
> [d1b9ebf8c605][KT-HWB_xRpWhis_7TceU1A][d1b9ebf8c605][inet[/172.16.255.20:9302]]{master=true}
>
> [2015-02-05 20:53:38,055][TRACE][discovery.zen.ping.unicast] 
> [d1b9ebf8c605] 
>
> ...

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/92322f0d-c420-48f0-baf7-fa69934ef1d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to