Member since
03-14-2016
4721
Posts
1111
Kudos Received
874
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 2730 | 04-27-2020 03:48 AM | |
| 5288 | 04-26-2020 06:18 PM | |
| 4458 | 04-26-2020 06:05 PM | |
| 3584 | 04-13-2020 08:53 PM | |
| 5386 | 03-31-2020 02:10 AM |
03-05-2018
09:02 PM
1 Kudo
@Hpc Good to know that correcting the /etc/hosts entry resolved the issue. Regarding your later query "in the "/etc/hosts" file of each host machine, shall I
only set the hostname of the machine running the ambari-server service,
or shall I also write the hostname of the all hosts?" >>>> Every Node (host) which is part of the cluster need to resolved the hostname of ambari server which is needed for Ambari Server a nd Ambari Agent communication,Also other components as well needs to know the hostname of other clusternodes. For example the NameNode host should be able to resolve the hostnames of DataNodes , Similarly the ResourceManager should be able to resolve the hostname of all the NodeManager hosts ...etc Similarly the ambari service checks runs on different hosts ... So basically you should have the same every node of your cluster to be able to resolve each other. .
... View more
03-05-2018
12:52 AM
@Hpc If you can not upgrade your ambari binaries to atleast 2.5 then you can try the workaround as mentioned in : https://issues.apache.org/jira/browse/AMBARI-19246 Which says just move the [ server_url = config.get_api_url(server_hostname) ] line outside the try block. See: https://reviews.apache.org/r/54890/diff/1#index_header You can make this change on all the ambari agent machines by editing the file: "/usr/lib/python2.6/site-packages/ambari_agent/main.py" for server_hostname in server_hostnames:
server_url = config.get_api_url(server_hostname)
try:
server_ip = socket.gethostbyname(server_hostname)
logger.info('Connecting to Ambari server at %s (%s)', server_url, server_ip) .
... View more
03-05-2018
12:11 AM
@Hpc A similar issue is reported here: https://issues.apache.org/jira/browse/AMBARI-19246 So if you keep seeing this issue then explore an option to upgrade your ambari.
... View more
03-04-2018
11:33 PM
@Hpc We see the error in determining the "server_url" UnboundLocalError: local variable 'server_url' referenced before assignment ==================== In general this error can occur if the ambari agent process is somehow not able to determine the ambari server Host & Port information. So please check if the ambari Hostname is resolvable from the Agent machine? Like looking at the "/etc/hosts" file on agent to see if Ambari Server IP and Hostname is mapped properly and reachable? We can also try connecting to Ambari Server host using telnet to see hostname and port resolution: (From agent machine w can run) Try using ambari server hostname (FQDN) and IP address both. # telnet $AMBARI_SERVER_HOSTNAME 8080
(OR)
# nc -v $AMBARI_SERVER_HOSTNAME 8080 . We see that the problem is because of the above error. Ambari Agent is not able to determine the ambari-server hostname (URL). This can happen if the "/etc/ambari-agent/conf/ambari-agent.ini" file might have an invalid ambari server hostname. By any chance do you see that the timestamp of this file "/etc/ambari-agent/conf/ambari-agent.ini" is changed? Or some user (or any automated script) has mistakenly removed the "hostname" and ports from this file? . Looks like you might be using Ambari 2.4.2 (or 2.4.x) as we see the code here: https://github.com/apache/ambari/blob/release-2.4.2/ambari-agent/src/main/python/ambari_agent/main.py#L345-L355 for server_hostname in server_hostnames:
try:
server_ip = socket.gethostbyname(server_hostname)
server_url = config.get_api_url(server_hostname)
logger.info('Connecting to Ambari server at %s (%s)', server_url, server_ip)
except socket.error:
logger.warn("Unable to determine the IP address of the Ambari server '%s'", server_hostname)
# Wait until MAX_RETRIES to see if server is reachable
netutil = NetUtil(config, heartbeat_stop_callback)
(retries, connected, stopped) = netutil.try_to_connect(server_url, MAX_RETRIES, logger) Ambari Agent determines the "server_url" as following: https://github.com/apache/ambari/blob/release-2.4.2/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py#L249-L252 def get_api_url(self, server_hostname):
return "%s://%s:%s" % (self.CONNECTION_PROTOCOL,
server_hostname,
self.get('server', 'url_port')) . So please check the "/etc/ambari-server/conf/ambari.properties" file as well to check if by any chance the "client.port" or "api.ssl" etc are changed recently? .
... View more
03-04-2018
10:36 PM
@Timur Kobilov I see that there are some minor difference between the "start_sandbox-hdp.sh" script in previous and current version. Can you please try using the Difference in old "start_sandbox-hdp.sh": https://github.com/hortonworks/data-tutorials/commit/f88da0da324e252996cf3201fc9b038e9564a665#diff-4d9083672ddd74136a08fe9af9b483fb Can you please try using the following Script "start_sandbox-hdp.sh" instead and see if it works: https://raw.githubusercontent.com/hortonworks/data-tutorials/f88da0da324e252996cf3201fc9b038e9564a665/tutorials/hdp/sandbox-deployment-and-install-guide/assets/start_sandbox-hdp.sh .
... View more
03-04-2018
07:13 AM
1 Kudo
@Leonardo Apolonio We see the error as conflict between packages: file /usr/lib/python2.6/site-packages from install of ambari-agent-2.6.1.0-143.x86_64 conflicts with file from package ambari-server-2.6.1.0-0.x86_64 . This error indicates that you have AmbariServer package of version 2.6.1.0.0 but trying to install Ambari-Agent of version 2.6.1.0-143 (slightly higher). Which is causing the conflict. . Please check if you have duplicate ambari repos like (2.6.1.0-143 as well as 2.6.1.0.0 both) on the same host? In that case remove the Old unwanted ambari repo from the mentioned dir and then perform a yum clean. # grep baseurl /etc/yum.repos.d/* | grep ambari So can you please try this: # yum clean all . Then retry the agent installation or try the "yum upgrade ambari-server" first and then upgrade the agent. # sudo yum upgrade ambari-server
# sudo yum upgrade ambari-agent .
... View more
03-02-2018
11:52 PM
@Biliyaminu Umar Looks like the query asked originally as part of this thread is already answered hence it will be great if you can mark this thread as "Answered" by clicking "Accept" button on the correct answer. That way other HCC users can quickly browse the answered solutions.
... View more
03-02-2018
11:50 PM
@Biliyaminu Umar But if you will have a defined the startTime and endTime for the metrics that you wanted to retrieve then the output should be in the EPOCH time sorted order something like following: Example:
http://*********//ws/v1/timeline/metrics?metricNames=jvm.JvmMetrics.GcCount._max&hostname=&appId=jobhistoryserver&instanceId=&startTime=1520020359&endTime=1520029247 Then the output will be sorted by time (Epoch time) as following: {
"metrics": [
{
"timestamp": 1520020500000,
"metadata": {
},
"metricname": "jvm.JvmMetrics.GcCount._max",
"appid": "jobhistoryserver",
"starttime": 1520020500000,
"metrics": {
"1520020500000": 28,
"1520020800000": 28,
"1520021100000": 29,
"1520021400000": 29,
"1520021700000": 29,
"1520022000000": 29,
"1520022300000": 29,
"1520022600000": 29,
"1520022900000": 29,
"1520023200000": 30,
"1520023500000": 30,
"1520023800000": 30,
"1520024100000": 30,
"1520024400000": 30,
"1520024700000": 30,
"1520025000000": 30,
"1520025300000": 31,
"1520025600000": 31,
"1520025900000": 31,
"1520026200000": 31,
"1520026500000": 31,
"1520026800000": 31,
"1520027100000": 31,
"1520027400000": 32,
"1520027700000": 32,
"1520028000000": 32,
"1520028300000": 32,
"1520028600000": 32,
"1520028900000": 32,
"1520029200000": 32.333333333333336
}
}
]
} .
... View more
03-02-2018
11:42 PM
@Biliyaminu Umar As there are multiple metricsNames there is no common way to sort them out in meaningful/useful form so they are random.
... View more
03-01-2018
08:32 AM
@Keshav Piplani SOLR installation instructions and version details you can find here: https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.3/bk_solr-search-installation/content/ch_hdp-search-install-ambari.html https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.3/bk_solr-search-installation/content/ch02s02s01.html
... View more