accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject accumulo git commit: ACCUMULO-3489 Log a good error message on NoAuthException
Date Fri, 16 Jan 2015 19:38:26 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master 51a78ecd7 -> 5d2f93a24


ACCUMULO-3489 Log a good error message on NoAuthException

If the tserver can't write to ZK, that means it is very likely
that it is using an incorrect configuration.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/5d2f93a2
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5d2f93a2
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5d2f93a2

Branch: refs/heads/master
Commit: 5d2f93a2409176aa872333d465d87e80fbc44701
Parents: 51a78ec
Author: Josh Elser <elserj@apache.org>
Authored: Fri Jan 16 14:35:04 2015 -0500
Committer: Josh Elser <elserj@apache.org>
Committed: Fri Jan 16 14:36:00 2015 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/accumulo/tserver/TabletServer.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/5d2f93a2/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index b08340f..4ac00e9 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@ -2322,7 +2322,14 @@ public class TabletServer extends AccumuloServerContext implements
Runnable {
     try {
       String zPath = ZooUtil.getRoot(getInstance()) + Constants.ZTSERVERS + "/" + getClientAddressString();
 
-      zoo.putPersistentData(zPath, new byte[] {}, NodeExistsPolicy.SKIP);
+      try {
+        zoo.putPersistentData(zPath, new byte[] {}, NodeExistsPolicy.SKIP);
+      } catch (KeeperException e) {
+        if (KeeperException.Code.NOAUTH == e.code()) {
+          log.error("Failed to write to ZooKeeper. Ensure that accumulo-site.xml, specifically
instance.secret, is consistent.");
+        }
+        throw e;
+      }
 
       tabletServerLock = new ZooLock(zPath);
 


Mime
View raw message