Member since 
    
	
		
		
		07-03-2023
	
	
	
	
	
	
	
	
	
	
	
	
	
	
			
      
                1
            
            
                Post
            
        
                0
            
            
                Kudos Received
            
        
                0
            
            
                Solutions
            
        
			
    
	
		
		
		07-03-2023
	
		
		08:27 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
		
	
				
		
			
					
				
		
	
		
					
							 hi team,     I'm trying to establish connection to cloudera-hbase using hbase-client library. I'm not able to establish the connection and getting the following error.   exception:   org.apache.hadoop.hbase.MasterNotRunningException: org.apache.hadoop.hbase.MasterNotRunningException: org.apache.hadoop.hbase.ipc.CallTimeoutException: Call to address=ip-172-1-4-7.ap-south-1.compute.internal:16000 failed on local exception: org.apache.hadoop.hbase.ipc.CallTimeoutException: Call[id=0,methodName=IsMasterRunning], waitTime=60215ms, rpcTimeout=60000ms     at org.apache.hadoop.hbase.client.ConnectionImplementation.isMasterRunning(ConnectionImplementation.java:723)     at org.apache.hadoop.hbase.client.HBaseAdmin.available(HBaseAdmin.java:2367)     at org.example.HBaseKerberos.main(HBaseKerberos.java:45)    Caused by: org.apache.hadoop.hbase.MasterNotRunningException: org.apache.hadoop.hbase.ipc.CallTimeoutException: Call to address=ip-172-1-4-7.ap-south-1.compute.internal:16000 failed on local exception: org.apache.hadoop.hbase.ipc.CallTimeoutException: Call[id=0,methodName=IsMasterRunning], waitTime=60215ms, rpcTimeout=60000ms     at org.apache.hadoop.hbase.client.ConnectionImplementation$MasterServiceStubMaker.makeStub(ConnectionImplementation.java:1359)     at org.apache.hadoop.hbase.client.ConnectionImplementation.getKeepAliveMasterService(ConnectionImplementation.java:1425)     at org.apache.hadoop.hbase.client.ConnectionImplementation.isMasterRunning(ConnectionImplementation.java:721)     ... 2 more    Caused by: org.apache.hadoop.hbase.ipc.CallTimeoutException: Call to address=ip-172-1-4-7.ap-south-1.compute.internal:16000 failed on local exception: org.apache.hadoop.hbase.ipc.CallTimeoutException: Call[id=0,methodName=IsMasterRunning], waitTime=60215ms, rpcTimeout=60000ms     at org.apache.hadoop.hbase.ipc.IPCUtil.wrapException(IPCUtil.java:222)     at org.apache.hadoop.hbase.ipc.AbstractRpcClient.onCallFinished(AbstractRpcClient.java:392)     at org.apache.hadoop.hbase.ipc.AbstractRpcClient.access$100(AbstractRpcClient.java:92)     at org.apache.hadoop.hbase.ipc.AbstractRpcClient$3.run(AbstractRpcClient.java:426)     at org.apache.hadoop.hbase.ipc.AbstractRpcClient$3.run(AbstractRpcClient.java:421)     at org.apache.hadoop.hbase.ipc.Call.setTimeout(Call.java:107)     at org.apache.hadoop.hbase.ipc.RpcConnection$1.run(RpcConnection.java:134)     at org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer$HashedWheelTimeout.run(HashedWheelTimer.java:715)     at org.apache.hbase.thirdparty.io.netty.util.concurrent.ImmediateExecutor.execute(ImmediateExecutor.java:34)     at org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:703)     at org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:790)     at org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:503)     at java.lang.Thread.run(Thread.java:750)    Caused by: org.apache.hadoop.hbase.ipc.CallTimeoutException: Call[id=0,methodName=IsMasterRunning], waitTime=60215ms, rpcTimeout=60000ms     at org.apache.hadoop.hbase.ipc.RpcConnection$1.run(RpcConnection.java:135)     ... 6 more  code :   public class HBaseKerberos{        public static void main(String[] args) throws IOException {            Scanner scanner = new Scanner(System.in);            try {                System.setProperty("sun.security.jgss.debug", "true");                System.setProperty("sun.security.krb5.debug", "true");                System.setProperty("sun.security.jgss.debug", "true");                System.setProperty("javax.security.auth.useSubjectCredsOnly","false");                System.setProperty("java.security.debug", "logincontext,policy,scl,gssloginconfig");                Configuration config = HBaseConfiguration.create();                config.addResource("/home/hduser/core-site.xml");                config.addResource("/home/hduser/hbase-site.xml");                config.addResource("/home/hduser/hdfs-site.xml");                config.set("hadoop.security.authentication", "kerberos");                config.set("hbase.zookeper.quorum", "ip-172-1-4-7.ap-south-1.compute.internal");                config.set("hbase.zookeeper.property.clientPort", "2181");                config.set("hbase.security.authentication","kerberos");                System.setProperty("java.security.krb5.conf","/etc/krb5.conf");              UserGroupInformation.setConfiguration(config);                UserGroupInformation.loginUserFromKeytab("hduser@EXAMPLE.COM","/home/hduser/kerbhduser.keytab");                           HBaseAdmin.available(config);                System.out.println("enter total record count");                int count = scanner.nextInt();                System.out.println("enter the batch size");                int batchSize = scanner.nextInt();                System.out.println("enter the delay for each batch");                int delayInterval = scanner.nextInt();                      // Create connection to HBase                Connection connection = ConnectionFactory.createConnection(config);                System.out.println("enter the table name");                String  tableNameInput = scanner.next();                System.out.println("enter the start positon");                int startPos = scanner.nextInt();                TableName table1 = TableName.valueOf(tableNameInput);                String family1 = "customer";                String family2 = "order";                Admin admin = connection.getAdmin();                Table hTable = ConnectionFactory.createConnection().getTable(table1);                HTableDescriptor desc = new HTableDescriptor(table1);                desc.addFamily(new HColumnDescriptor(family1));                desc.addFamily(new HColumnDescriptor(family2));                if(!admin.tableExists(table1)) {                    admin.createTable(desc);                }                  }     I have downloaded the hbase-site.xml , core-site.xml and hdfs-site.xml from Cloudera's hbase master role.    Kindly help in this regard. 
						
					
					... View more
				
			
			
			
			
			
			
			
			
			
		
		
			
				
						
							Labels: