Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Can't change Ambari metrics collector port

Highlighted

Can't change Ambari metrics collector port

New Contributor

Question around Ambari metrics and changing the port number. I have a Ambari 2.1.2 + HDP 2.3.4.0-3485 and have Ambari Metrics 0.1.0 installed. The current port number for the Metrics Collector is set to 8188 and I need to change it to 6188. From what I can tell 6188 is the default port but for some reason my Collector is on a different port and it will not change when modifying the advanced ams-site.xml => timeline.metrics.service.webapp.address value and restarting affected services. When modifying this value all the metrics monitors on all hosts switch to the new port(correctly) but start failing because the collector didn’t switch. Is there a better way to get the collector to switch to a different port or maybe a bug with the version’s I’m using?

* Currently there is nothing listening on port 6188 on this host.

* Centos 6.6

5 REPLIES 5
Highlighted

Re: Can't change Ambari metrics collector port

New Contributor

Hi,

I'm changing the port through the Ambari UI and then going through the process of updating stale configs and restarting services.

Poking around I can see the 8188 port in a couple config files. I have also tried changing these values to use the port 6188 and then manually restarting the ambari-metrics-collector but the collector service doesn't seem to use any of these configs. One thing I noticed was that in the ambari-metrics-collector conf the ams-site.xml file was empty and I'm pretty sure this is wrong.

[root@had104 etc]# find . -exec grep -il -s 8188 {} \; 
./hadoop/2.3.4.0-3485/0/yarn-site.xml 
./hadoop/2.3.4.0-3485/0/hadoop-metrics2.properties 
./ambari-metrics-monitor/conf/metric_monitor.ini 
./ams-hbase/conf/hadoop-metrics2-hbase.properties
[root@had104 etc]# ambari-metrics-collector status
AMS is running as process 22354.
[root@had104 etc]# cat /etc/ambari-metrics-collector/conf/ams-site.xml 
<?xml version="1.0"?>


<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->


<configuration>


  <!-- Site specific AMBARI_METRICS configuration properties -->


</configuration>





Highlighted

Re: Can't change Ambari metrics collector port

Expert Contributor

The metrics collector port is default configured as 6188. The file in the rpm could be empty but Ambari generate the file with all the required settings.

Did you look at the task log for the Metrics Collector start operation? You can do this by clicking on the background ops icon at the top of the page. In the task log please search for ams-site, it should look like below:

2016-04-12 18:54:47,086 - XmlConfig['ams-site.xml'] {'owner': 'ams', 'group': 'hadoop', 'conf_dir': '/etc/ambari-metrics-collector/conf', 'configuration_attributes': {}, 'configurations': ...}
2016-04-12 18:54:47,099 - Generating config: /etc/ambari-metrics-collector/conf/ams-site.xml
2016-04-12 18:54:47,099 - File['/etc/ambari-metrics-collector/conf/ams-site.xml'] {'owner': 'ams', 'content': InlineTemplate(...), 'group': 'hadoop', 'mode': None, 'encoding': 'UTF-8'}
2016-04-12 18:54:47,137 - XmlConfig['hbase-site.xml'] {'owner': 'ams', 'group': 'hadoop', 'conf_dir': '/etc/ambari-metrics-collector/conf', 'configuration_attributes': {}, 'configurat
Highlighted

Re: Can't change Ambari metrics collector port

New Contributor
2016-05-03 13:54:10,716 - XmlConfig['ams-site.xml'] {'owner': 'ams', 'group': 'hadoop', 'conf_dir': '/etc/ambari-metrics-collector/conf', 'configuration_attributes': {}, 'configurations': ...}
2016-05-03 13:54:10,727 - Generating config: /etc/ambari-metrics-collector/conf/ams-site.xml
2016-05-03 13:54:10,728 - File['/etc/ambari-metrics-collector/conf/ams-site.xml'] {'owner': 'ams', 'content': InlineTemplate(...), 'group': 'hadoop', 'mode': None, 'encoding': 'UTF-8'}

I did a restart for the ambari-metrics-collector service and in the task logs I see these entries that match yours. One host 4 which has the ambari-metrics-collector service the /etc/ambari-metrics/collector/conf directory has the ams-site.xml file but it is still empty.

Highlighted

Re: Can't change Ambari metrics collector port

Expert Contributor

Do you have any other components on the same host as the Metrics Collector? If yes do you see config changes that you make for that component get reflected to the files on disk? Example: If there is a Nodemanager running on the same host and if you change "yarn.nodemanager.disk-health-checker.min-free-space-per-disk-mb" through Ambari and restart the NM, do you see the change reflected in /etc/hadoop/conf/yarn-site ?

Highlighted

Re: Can't change Ambari metrics collector port

New Contributor

Currently that host has several services on it and Client services:

* knox gateway

* Resource Manager

* Accumulo TServer

* Flume

* RegionServer

* NFSGateway

* Node Manager

* Supervisor

I made a config change to yarn in the ambari ui, i turned yarn.timeline-service.enabled from true to false then did a restart of the services and saw the yarn-site.xml file for that host get updated correctly with the new value. This appears to be an issues with only Metrics and other services seem to work correctly, as far as I can tell.

Don't have an account?
Coming from Hortonworks? Activate your account here