You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2013/05/14 00:01:58 UTC
svn commit: r1482120 - in /incubator/ambari/trunk: ./
ambari-agent/src/main/python/ambari_agent/
ambari-server/src/main/java/org/apache/ambari/server/agent/
ambari-server/src/main/java/org/apache/ambari/server/agent/rest/
Author: smohanty
Date: Mon May 13 22:01:58 2013
New Revision: 1482120
URL: http://svn.apache.org/r1482120
Log:
AMBARI-2120. Add few logs to allow root-cause the issue where agent seems to unable to communicate with the server. (smohanty)
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/security.py
incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/agent/rest/AgentResource.java
Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1482120&r1=1482119&r2=1482120&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Mon May 13 22:01:58 2013
@@ -842,6 +842,9 @@ Trunk (unreleased changes):
BUG FIXES
+ AMBARI-2120. Add few logs to allow root-cause the issue where agent seems
+ to unable to communicate with the server. (smohanty)
+
AMBARI-2116. Add parameters to improve HIVE performance. (swagle)
AMBARI-2117. Set jobtracker retire interval. (swagle)
Modified: incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/security.py
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/security.py?rev=1482120&r1=1482119&r2=1482120&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/security.py (original)
+++ incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/security.py Mon May 13 22:01:58 2013
@@ -81,7 +81,7 @@ class CachedHTTPSConnection:
self.httpsconn = VerifiedHTTPSConnection(self.server, self.port)
self.httpsconn.connect()
self.connected = True
- # possible exceptions are catched and processed in Controller
+ # possible exceptions are caught and processed in Controller
def forceClear(self):
@@ -96,9 +96,10 @@ class CachedHTTPSConnection:
response = self.httpsconn.getresponse()
readResponse = response.read()
except Exception as ex:
- # This exception is catched later in Controller
+ # This exception is caught later in Controller
logger.debug("Error in sending/receving data from the server " +
traceback.format_exc())
+ logger.info("Encountered communication error. Details: " + repr(ex))
self.connected = False
raise IOError("Error occured during connecting to the server: " + str(ex))
return readResponse
Modified: incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java?rev=1482120&r1=1482119&r2=1482120&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java (original)
+++ incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java Mon May 13 22:01:58 2013
@@ -105,12 +105,10 @@ public class HeartBeatHandler {
return createRegisterCommand();
}
- if (LOG.isDebugEnabled()) {
- LOG.debug("Received heartbeat from host"
- + ", hostname=" + hostname
- + ", currentResponseId=" + currentResponseId
- + ", receivedResponseId=" + heartbeat.getResponseId());
- }
+ LOG.info("Received heartbeat from host"
+ + ", hostname=" + hostname
+ + ", currentResponseId=" + currentResponseId
+ + ", receivedResponseId=" + heartbeat.getResponseId());
if (heartbeat.getResponseId() == currentResponseId - 1) {
LOG.warn("Old responseId received - response was lost - returning cached response");
Modified: incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/agent/rest/AgentResource.java
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/agent/rest/AgentResource.java?rev=1482120&r1=1482119&r2=1482120&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/agent/rest/AgentResource.java (original)
+++ incubator/ambari/trunk/ambari-server/src/main/java/org/apache/ambari/server/agent/rest/AgentResource.java Mon May 13 22:01:58 2013
@@ -106,7 +106,10 @@ public class AgentResource {
HeartBeatResponse heartBeatResponse;
try {
heartBeatResponse = hh.handleHeartBeat(message);
- LOG.debug("Sending heartbeat response " + heartBeatResponse);
+ LOG.info("Sending heartbeat response with response id " + heartBeatResponse.getResponseId());
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Response details " + heartBeatResponse);
+ }
} catch (Exception e) {
LOG.info("Error in HeartBeat", e);
throw new WebApplicationException(500);