[
https://issues.apache.org/jira/browse/METRON-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16288468#comment-16288468
]
ASF GitHub Bot commented on METRON-1348:
----------------------------------------
Github user nickwallen commented on a diff in the pull request:
https://github.com/apache/metron/pull/864#discussion_r156526514
--- Diff:
metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/params/status_params.py
---
@@ -80,10 +81,14 @@
# REST
metron_rest_port =
config['configurations']['metron-rest-env']['metron_rest_port']
-# UI
-metron_management_ui_port =
config['configurations']['metron-management-ui-env']['metron_management_ui_port']
+# Alerts UI
+metron_alerts_ui_host = default("/clusterHostInfo/metron_alerts_ui_hosts",
[hostname])[0]
--- End diff --
I needed to somehow find the hosts running each service and I knew it was
contained in this `clusterHostInfo` configuration. But it was really difficult
to uncover what values Ambari keeps in this `clusterHostInfo` configuration. I
have not been able to find any documentation on this.
I actually had to add some debug statement to a live instance of Ambari to
find out what values are stored here and how they are named. Fun, fun.
For the record, here is what is stored in `clusterHostInfo` when spinning
up the current state of Full Dev.
```
{
'snamenode_host':[
'node1'
],
'metron_alerts_ui_hosts':[
'node1'
],
'nm_hosts':[
'node1'
],
'drpc_server_hosts':[
'node1'
],
'ambari_server_use_ssl':[
'false'
],
'all_ping_ports':[
'8670'
],
'all_hosts':[
'node1'
],
'rm_host':[
'node1'
],
'kafka_broker_hosts':[
'node1'
],
'slave_hosts':[
'node1'
],
'metron_profiler_hosts':[
'node1'
],
'storm_ui_server_hosts':[
'node1'
],
'all_racks':[
'/default-rack'
],
'all_ipv4_ips':[
'127.0.0.1'
],
'app_timeline_server_hosts':[
'node1'
],
'hs_host':[
'node1'
],
'ambari_server_port':[
'8080'
],
'metron_rest_hosts':[
'node1'
],
'metron_management_ui_hosts':[
'node1'
],
'es_master_hosts':[
'node1'
],
'metron_parsers_hosts':[
'node1'
],
'kibana_master_hosts':[
'node1'
],
'metron_enrichment_master_hosts':[
'node1'
],
'hbase_rs_hosts':[
'node1'
],
'namenode_host':[
'node1'
],
'nimbus_hosts':[
'node1'
],
'hbase_master_hosts':[
'node1'
],
'metron_indexing_hosts':[
'node1'
],
'ambari_server_host':[
'node1'
],
'zookeeper_hosts':[
'node1'
],
'supervisor_hosts':[
'node1'
]
}
```
> Metron Service Checks Use Wrong Hostname
> ----------------------------------------
>
> Key: METRON-1348
> URL: https://issues.apache.org/jira/browse/METRON-1348
> Project: Metron
> Issue Type: Bug
> Reporter: Nick Allen
> Assignee: Nick Allen
>
> The Metron service check can often use the incorrect hostname when checking
> the Alerts UI, Management UI, and REST services.
> Ambari can run the service check on any node in the cluster, not just the
> node the service is actually running on. The service check code currently
> uses the hostname on which the service check is running. If the service is
> not actually installed on that host, the service check will incorrectly fail.
> The service check code should be updated to find the hostname where the
> service is installed and use that hostname.
> For example, here is a log of a service check that is looking on the wrong
> host for the Metron REST service.
> {code}
> 2017-12-08 17:11:30,433 - Checking connectivity to REST application
> 2017-12-08 17:11:30,434 - Checking HTTP connectivity;
> host=hcpua-10.openstacklocal, port=8082, user=metron cmd=curl -sS --max-time
> 3 hcpua-10.openstacklocal:8082
> 2017-12-08 17:11:30,434 - Execute['curl -sS --max-time 3
> hcpua-10.openstacklocal:8082'] {'logoutput': False, 'tries': 3, 'user':
> 'metron', 'try_sleep': 5}
> 2017-12-08 17:11:30,471 - Retrying after 5 seconds. Reason: Execution of
> 'curl -sS --max-time 3 hcpua-10.openstacklocal:8082' returned 7. curl: (7)
> Failed to connect to hcpua-10.openstacklocal port 8082: Connection refused
> 2017-12-08 17:11:35,519 - Retrying after 5 seconds. Reason: Execution of
> 'curl -sS --max-time 3 hcpua-10.openstacklocal:8082' returned 7. curl: (7)
> Failed to connect to hcpua-10.openstacklocal port 8082: Connection refused
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)