[ 
https://issues.apache.org/jira/browse/METRON-384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15436880#comment-15436880
 ] 

ASF GitHub Bot commented on METRON-384:
---------------------------------------

Github user 2xyo commented on the issue:

    https://github.com/apache/incubator-metron/pull/221
  
    So, you would recommend something like this:
    
    New  `elasticsearch.yml`:
    ```
      - { regexp: '^# *network\.host:', line: 'network.host: 
{{elasticsearch_network_interface  }}' }
    ```
    
    New  `full-dev-platform/group_vars/all`, `multinode-vagrant/group_vars/all`:
    ```
    elasticsearch_network_interface: _eth1:ipv4_
    ```
    And new  `metron_example/group_vars/all `, `amazon-ec2/conf/defaults.yml`:
    ```
    elasticsearch_network_interface: _eth0:ipv4_
    ```
    
    But, in this case, elasticsearch will not listening to localhost by default 
(and that's why I opened this issue). IMHO, the default value should be instead:
    ```
    elasticsearch_network_interface: ["_eth1:ipv4_","_local:ipv4_"]
    ```



>  Deployment fails at task "Wait for Elasticsearch Host to Start"
> ----------------------------------------------------------------
>
>                 Key: METRON-384
>                 URL: https://issues.apache.org/jira/browse/METRON-384
>             Project: Metron
>          Issue Type: Bug
>         Environment: $ git rev-parse HEAD
> 225a490cf4a475e728bf9129ea3e662b543f5cc4
>            Reporter: Yohann
>              Labels: deployment
>
> The deployments fails at task "metron_elasticsearch_templates : Wait for 
> Elasticsearch Host to Start" even if elasticsearch is up and running.
> {code}
> TASK [metron_elasticsearch_templates : Wait for Elasticsearch Host to Start] 
> ***
> fatal: [node1]: FAILED! => {"changed": false, "elapsed": 300, "failed": true, 
> "msg": "Timeout when waiting for node1:9200"}
> {code}
> On metron  node: 
> {code}
> [root@node1 ~]# lsof -P -n -iTCP -sTCP:LISTEN | grep elasticsearch
> java      12684 elasticsearch  117u  IPv6 181670      0t0  TCP 
> 192.168.1.13:9300 (LISTEN)
> java      12684 elasticsearch  146u  IPv6 181879      0t0  TCP 
> 192.168.1.13:9200 (LISTEN)
> {code}
> Elasticsearch listens on the IP address of the interface while the name 
> "node1" only resolves to 127.0.0.1. 
> Resolution: listen to IP address of the interface and to 127.0.0.1:
> {code}
> diff --git a/metron-deployment/roles/elasticsearch/tasks/elasticsearch.yml 
> b/metron-deployment/roles/elasticsearch/tasks/elasticsearch.yml
> index b5df7b9..92ef9c5 100644
> --- a/metron-deployment/roles/elasticsearch/tasks/elasticsearch.yml
> +++ b/metron-deployment/roles/elasticsearch/tasks/elasticsearch.yml
> @@ -66,8 +66,8 @@
>      state=present
>    with_items:
>      - { regexp: '^# *cluster\.name:', line: 'cluster.name: metron' }
> -    - { regexp: '^# *network\.host:', line: 'network.host: _{{
> -    elasticsearch_network_interface  }}:ipv4_' }
> +    - { regexp: '^# *network\.host:', line: 'network.host: ["_{{
> +    elasticsearch_network_interface  }}:ipv4_","_local:ipv4_"]' }
>      - { regexp: '^# *discovery\.zen\.ping\.unicast\.hosts:',
>      line: 'discovery.zen.ping.unicast.hosts: [ {{ es_hosts }} ]'}
>      - { regexp: '^# *path\.data', line: 'path.data: {{     
> elasticsearch_data_dir }}' }
> {code}
> Result:
> {code}
> [root@node1 ~]# lsof -P -n -iTCP -sTCP:LISTEN | grep elasticsearch
> java      19741 elasticsearch  117u  IPv6 202309      0t0  TCP 127.0.0.1:9300 
> (LISTEN)
> java      19741 elasticsearch  119u  IPv6 202312      0t0  TCP 
> 192.168.1.13:9300 (LISTEN)
> java      19741 elasticsearch  147u  IPv6 202382      0t0  TCP 127.0.0.1:9200 
> (LISTEN)
> java      19741 elasticsearch  148u  IPv6 202383      0t0  TCP 
> 192.168.1.13:9200 (LISTEN)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to