I don't think that your error is related to CPs stuff. What lib versions do
you use? Can you compare with those of the HBaseHUT pom?

Re 127.0.1.1 vs 127.0.0.1 - what your hosts file looked like before and
now? I think it's just the issue with resolving IP - at one place it
resolves using localhost, at other - your hostname. Since (I suppose) those
two didn't match - you got error.

Alex Baranau
------
Sematext :: http://blog.sematext.com/ :: Solr - Lucene - Hadoop - HBase

On Tue, Apr 17, 2012 at 9:34 AM, Marcin Cylke <mcl.hb...@touk.pl> wrote:

> On 17/04/12 15:15, Alex Baranau wrote:
>
> Hi
>
> > Some sanity checks:
> > 1) make sure you don't have 127.0.1.1 in your /etc/hosts (only 127.0.0.1)
>
> I've removed this entry and it worked right away :) Could You explain
> why it did so big difference?
>
> Now the test from HBaseHUT works fine, but mine code is still failing:
>
> #v+
> 2012-04-17 15:26:27,870 [localhost:2222)] WARN  ClientCnxn
>      :1063 - Session 0x0 for server null, unexpected error, closing
> socket connection and attempting reconnect
> java.net.ConnectException: Connection refused
>        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
>        at
> sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
>        at
>
> org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:286)
>        at
> org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
> 2012-04-17 15:26:27,871 [dler 2 on 35003] INFO  RecoverableZooKeeper
>      :89 - The identifier of this process is 2032@correspondence
> 2012-04-17 15:26:27,973 [dler 2 on 35003] WARN  RecoverableZooKeeper
>      :159 - Possibly transient ZooKeeper exception:
> org.apache.zookeeper.KeeperException$ConnectionLossException:
> KeeperErrorCode = ConnectionLoss for /hbase/master
> 2012-04-17 15:26:27,974 [dler 2 on 35003] INFO  RetryCounter
>      :53 - The 1 times to retry  after sleeping 2000 ms
> 2012-04-17 15:26:28,973 [localhost:2222)] INFO  ClientCnxn
>      :933 - Opening socket connection to server localhost/127.0.0.1:2222
> #v-
>
> My whole test is something like this:
>
> #v+
>  testingUtility.getConfiguration().setStrings(
>           CoprocessorHost.USER_REGION_COPROCESSOR_CONF_KEY,
>           AuxDataCalculator.class.getName());
>  testingUtility.startMiniCluster();
>
> byte[] TABLE = Bytes.toBytes(getClass().getName());
> byte[] A = Bytes.toBytes("A");
> byte[] STATS = Bytes.toBytes("stats");
> byte[] CONTENT = Bytes.toBytes("content");
> byte[][] FAMILIES = new byte[][] { A, STATS, CONTENT } ;
>
> HTable hTable = testingUtility.createTable(TABLE, FAMILIES);
> Put put = new Put(ROW);
> put.add(A, A, A);
>
> hTable.put(put);
>
> Get get = new Get(ROW);
> Result result = hTable.get(get);
> #v-
>
>
> As I don't see any particular differences between Your unit test and
> mine, could You look into this a bit more?
>
> Regards
> Marcin
>

Reply via email to