Подключение и сохранение HBase

Я просто пытался подключиться к HBase, которая является частью Cloudera-VM, используя клиент Java.

(192.168.56.102 - это IP-IP IP VM)

Я использую виртуальную коробку с помощью Network Shower.

Итак, я могу получить доступ к Webui HBASe Master @ http://192.168.56.102:60010/master.jsp

также мой клиент Java (хорошо работал на самом VM), установленном подключение к 192.168. 56.102: 2181

Но когда он звонит GetMaster GetMaster Я получаю Соединение отказано См. Журнал:

11/09/14 11:19:30 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=192.168.56.102:2181 sessionTimeout=180000 watcher=hconnection
11/09/14 11:19:30 INFO zookeeper.ClientCnxn: Opening socket connection to server /192.168.56.102:2181
11/09/14 11:19:30 INFO zookeeper.ClientCnxn: Socket connection established to cloudera-vm/192.168.56.102:2181, initiating session
11/09/14 11:19:30 INFO zookeeper.ClientCnxn: Session establishment complete on server cloudera-vm/192.168.56.102:2181, sessionid = 0x13267157f930009, negotiated timeout = 40000
11/09/14 11:19:32 INFO client.HConnectionManager$HConnectionImplementation: getMaster attempt 0 of 10 failed; retrying after sleep of 1000
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
    at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
    at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:404)
    at org.apache.hadoop.hbase.ipc.HBaseClient$Connection.setupIOstreams(HBaseClient.java:311)
    at org.apache.hadoop.hbase.ipc.HBaseClient.getConnection(HBaseClient.java:865)
    at org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:732)
    at org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:257)
    at $Proxy9.getProtocolVersion(Unknown Source)
    at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:419)
    at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:393)
    at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:444)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:358)
    at org.apache.hadoop.hbase.client.HBaseAdmin.(HBaseAdmin.java:90)
    at org.datanucleus.store.hbase.HBaseUtils$1.run(HBaseUtils.java:432)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.datanucleus.store.hbase.HBaseUtils.createSchemaForClass(HBaseUtils.java:428)
    at org.datanucleus.store.hbase.HBaseMetaDataListener.loaded(HBaseMetaDataListener.java:74)
    at org.datanucleus.store.hbase.HBaseStoreManager.(HBaseStoreManager.java:76)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension(NonManagedPluginRegistry.java:677)
    at org.datanucleus.plugin.PluginManager.createExecutableExtension(PluginManager.java:287)
    at org.datanucleus.NucleusContext.createStoreManagerForProperties(NucleusContext.java:453)
    at org.datanucleus.NucleusContext.initialise(NucleusContext.java:264)
    at org.datanucleus.api.jpa.JPAEntityManagerFactory.initialiseNucleusContext(JPAEntityManagerFactory.java:746)
    at org.datanucleus.api.jpa.JPAEntityManagerFactory.(JPAEntityManagerFactory.java:422)
    at org.datanucleus.api.jpa.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:91)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:150)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:70)
    at de.syrtec.jpa2hbase.start.TestDAO.main(TestDAO.java:13)

HBASE-SATE.XML:


    
        hbase.zookeeper.quorum
        192.168.56.102
    
    
        hbase.zookeeper.property.clientPort
        2181
    
    
        hbase.master
        192.168.56.102:60010
    

Persistence.xml:



    

        
            
            
            
            
            
            
            
        
    

TESTDAO .java:

public class TestDAO {
    public static void main(String[] args) {
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("hbase-addressbook");
        EntityManager em = emf.createEntityManager();
        EntityTransaction tx = null;

        Account a2 = new Account("myPre3", "mySur3", 2, new Login("e", "f"));

        tx = em.getTransaction();
        tx.begin(); 
            em.persist(a2);
        tx.commit();
    }
}

Просто добавление сетевых услуг, работающих на VM (Netstat -ntpl):

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      563/sshd        
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      909/cupsd       
tcp        0      0 0.0.0.0:8088            0.0.0.0:*               LISTEN      2004/python2.6  
tcp        0      0 127.0.0.1:8001          0.0.0.0:*               LISTEN      2345/python2.6  
tcp6       0      0 :::39087                :::*                    LISTEN      1327/java       
tcp6       0      0 :::54162                :::*                    LISTEN      1411/java       
tcp6       0      0 127.0.0.1:8020          :::*                    LISTEN      1411/java       
tcp6       0      0 127.0.0.1:8021          :::*                    LISTEN      1327/java       
tcp6       0      0 :::50070                :::*                    LISTEN      1411/java       
tcp6       0      0 :::22                   :::*                    LISTEN      563/sshd        
tcp6       0      0 ::1:631                 :::*                    LISTEN      909/cupsd       
tcp6       0      0 :::11000                :::*                    LISTEN      2077/java       
tcp6       0      0 :::43738                :::*                    LISTEN      858/java        
tcp6       0      0 :::50010                :::*                    LISTEN      858/java        
tcp6       0      0 :::51258                :::*                    LISTEN      858/java        
tcp6       0      0 :::50075                :::*                    LISTEN      858/java        
tcp6       0      0 :::60030                :::*                    LISTEN      1726/java       
tcp6       0      0 127.0.0.1:44446         :::*                    LISTEN      1642/java       
tcp6       0      0 127.0.1.1:41246         :::*                    LISTEN      1726/java       
tcp6       0      0 :::8002                 :::*                    LISTEN      2009/java       
tcp6       0      0 :::8003                 :::*                    LISTEN      2009/java       
tcp6       0      0 127.0.1.1:58915         :::*                    LISTEN      1726/java       
tcp6       0      0 :::59203                :::*                    LISTEN      1491/java       
tcp6       0      0 :::50020                :::*                    LISTEN      858/java        
tcp6       0      0 127.0.0.1:8005          :::*                    LISTEN      2077/java       
tcp6       0      0 :::2181                 :::*                    LISTEN      1726/java       
tcp6       0      0 :::9290                 :::*                    LISTEN      1327/java       
tcp6       0      0 :::60010                :::*                    LISTEN      1726/java       
tcp6       0      0 :::50090                :::*                    LISTEN      1491/java       
tcp6       0      0 :::10090                :::*                    LISTEN      1411/java       
tcp6       0      0 :::50060                :::*                    LISTEN      1642/java       
tcp6       0      0 :::50030                :::*                    LISTEN      1327/java 

5
задан Dunaril 21 September 2011 в 14:41
поделиться