You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by dm...@apache.org on 2016/03/28 12:32:57 UTC
[1/2] ambari git commit: AMBARI-15597. After enabling SSL for
Resource Manager,
getting a constant Ambari Alert: Connection failed to
https://0.0.0.0:8044/ws/v1/node/info (No JSON object could be decoded)
(dlysnichenko)
Repository: ambari
Updated Branches:
refs/heads/branch-2.2 54e08eda9 -> af47269e9
refs/heads/trunk c9f4bcc6c -> d0672c2ba
AMBARI-15597. After enabling SSL for Resource Manager, getting a constant Ambari Alert: Connection failed to https://0.0.0.0:8044/ws/v1/node/info (No JSON object could be decoded) (dlysnichenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d0672c2b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d0672c2b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d0672c2b
Branch: refs/heads/trunk
Commit: d0672c2ba8d1f8a15ae58c6af62f62f7edc47466
Parents: c9f4bcc
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Mon Mar 28 13:32:00 2016 +0300
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Mon Mar 28 13:32:00 2016 +0300
----------------------------------------------------------------------
.../package/alerts/alert_nodemanager_health.py | 32 +++++++++++---------
1 file changed, 17 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/d0672c2b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/alerts/alert_nodemanager_health.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/alerts/alert_nodemanager_health.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/alerts/alert_nodemanager_health.py
index 2105bed..d7159e4 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/alerts/alert_nodemanager_health.py
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/alerts/alert_nodemanager_health.py
@@ -81,6 +81,9 @@ def execute(configurations={}, parameters={}, host_name=None):
if configurations is None:
return (result_code, ['There were no configurations supplied to the script.'])
+ if host_name is None:
+ host_name = socket.getfqdn()
+
scheme = 'http'
http_uri = None
https_uri = None
@@ -123,32 +126,31 @@ def execute(configurations={}, parameters={}, host_name=None):
# determine the right URI and whether to use SSL
- uri = http_uri
+ host_port = http_uri
if http_policy == 'HTTPS_ONLY':
scheme = 'https'
if https_uri is not None:
- uri = https_uri
+ host_port = https_uri
label = ''
url_response = None
node_healthy = 'false'
total_time = 0
+ # replace hostname on host fqdn to make it work on all environments
+ if host_port is not None:
+ if ":" in host_port:
+ uri_host, uri_port = host_port.split(':')
+ host_port = '{0}:{1}'.format(host_name, uri_port)
+ else:
+ host_port = host_name
+
# some yarn-site structures don't have the web ui address
- if uri is None:
- if host_name is None:
- host_name = socket.getfqdn()
-
- uri = '{0}:{1}'.format(host_name, NODEMANAGER_DEFAULT_PORT)
-
- if OSCheck.is_windows_family():
- uri_host, uri_port = uri.split(':')
- # on windows 0.0.0.0 is invalid address to connect but on linux it resolved to 127.0.0.1
- uri_host = resolve_address(uri_host)
- uri = '{0}:{1}'.format(uri_host, uri_port)
-
- query = "{0}://{1}/ws/v1/node/info".format(scheme,uri)
+ if host_port is None:
+ host_port = '{0}:{1}'.format(host_name, NODEMANAGER_DEFAULT_PORT)
+
+ query = "{0}://{1}/ws/v1/node/info".format(scheme, host_port)
try:
if kerberos_principal is not None and kerberos_keytab is not None and security_enabled:
[2/2] ambari git commit: AMBARI-15597. After enabling SSL for
Resource Manager,
getting a constant Ambari Alert: Connection failed to
https://0.0.0.0:8044/ws/v1/node/info (No JSON object could be decoded)
(dlysnichenko)
Posted by dm...@apache.org.
AMBARI-15597. After enabling SSL for Resource Manager, getting a constant Ambari Alert: Connection failed to https://0.0.0.0:8044/ws/v1/node/info (No JSON object could be decoded) (dlysnichenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/af47269e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/af47269e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/af47269e
Branch: refs/heads/branch-2.2
Commit: af47269e9ccb2922bac1a9c7839e7478b6381109
Parents: 54e08ed
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Mon Mar 28 13:32:00 2016 +0300
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Mon Mar 28 13:33:04 2016 +0300
----------------------------------------------------------------------
.../package/alerts/alert_nodemanager_health.py | 32 +++++++++++---------
1 file changed, 17 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/af47269e/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/alerts/alert_nodemanager_health.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/alerts/alert_nodemanager_health.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/alerts/alert_nodemanager_health.py
index 2105bed..d7159e4 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/alerts/alert_nodemanager_health.py
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/alerts/alert_nodemanager_health.py
@@ -81,6 +81,9 @@ def execute(configurations={}, parameters={}, host_name=None):
if configurations is None:
return (result_code, ['There were no configurations supplied to the script.'])
+ if host_name is None:
+ host_name = socket.getfqdn()
+
scheme = 'http'
http_uri = None
https_uri = None
@@ -123,32 +126,31 @@ def execute(configurations={}, parameters={}, host_name=None):
# determine the right URI and whether to use SSL
- uri = http_uri
+ host_port = http_uri
if http_policy == 'HTTPS_ONLY':
scheme = 'https'
if https_uri is not None:
- uri = https_uri
+ host_port = https_uri
label = ''
url_response = None
node_healthy = 'false'
total_time = 0
+ # replace hostname on host fqdn to make it work on all environments
+ if host_port is not None:
+ if ":" in host_port:
+ uri_host, uri_port = host_port.split(':')
+ host_port = '{0}:{1}'.format(host_name, uri_port)
+ else:
+ host_port = host_name
+
# some yarn-site structures don't have the web ui address
- if uri is None:
- if host_name is None:
- host_name = socket.getfqdn()
-
- uri = '{0}:{1}'.format(host_name, NODEMANAGER_DEFAULT_PORT)
-
- if OSCheck.is_windows_family():
- uri_host, uri_port = uri.split(':')
- # on windows 0.0.0.0 is invalid address to connect but on linux it resolved to 127.0.0.1
- uri_host = resolve_address(uri_host)
- uri = '{0}:{1}'.format(uri_host, uri_port)
-
- query = "{0}://{1}/ws/v1/node/info".format(scheme,uri)
+ if host_port is None:
+ host_port = '{0}:{1}'.format(host_name, NODEMANAGER_DEFAULT_PORT)
+
+ query = "{0}://{1}/ws/v1/node/info".format(scheme, host_port)
try:
if kerberos_principal is not None and kerberos_keytab is not None and security_enabled: