Here is stacktrace:

11/03/11 08:56:44 WARN zookeeper.ClientCnxn: Exception closing session
0x12ea29ecc580005 to sun.nio.ch.SelectionKeyImpl@1175422
java.io.IOException: Read error rc = -1 java.nio.DirectByteBuffer[pos=0
lim=4 cap=4]
        at
org.apache.zookeeper.ClientCnxn$SendThread.doIO(ClientCnxn.java:701)
        at
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:945)
11/03/11 08:56:45 INFO zookeeper.ClientCnxn: Attempting connection to server
/10.30.12.182:2181
11/03/11 08:56:45 WARN zookeeper.ClientCnxn: Exception closing session
0x12ea29ecc580005 to sun.nio.ch.SelectionKeyImpl@1b1fbf4
java.net.ConnectException: Connection refused
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:592)
        at
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:933)
11/03/11 08:56:45 WARN zookeeper.ClientCnxn: Ignoring exception during
shutdown input
java.nio.channels.ClosedChannelException
        at
sun.nio.ch.SocketChannelImpl.shutdownInput(SocketChannelImpl.java:656)
        at sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:378)
        at
org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:999)
        at
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:970)
11/03/11 08:56:45 WARN zookeeper.ClientCnxn: Ignoring exception during
shutdown output
java.nio.channels.ClosedChannelException
        at
sun.nio.ch.SocketChannelImpl.shutdownOutput(SocketChannelImpl.java:667)
        at sun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:386)
        at
org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1004)
        at
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:970)
11/03/11 08:56:47 INFO zookeeper.ClientCnxn: Attempting connection to server
/10.30.12.182:2181
11/03/11 08:56:47 WARN zookeeper.ClientCnxn: Exception closing session
0x12ea29ecc580005 to sun.nio.ch.SelectionKeyImpl@6fa9fc
java.net.ConnectException: Connection refused
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:592)
        at
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:933)
11/03/11 08:56:47 WARN zookeeper.ClientCnxn: Ignoring exception during
shutdown input
java.nio.channels.ClosedChannelException
        at
sun.nio.ch.SocketChannelImpl.shutdownInput(SocketChannelImpl.java:656)
        at sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:378)
        at
org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:999)
        at
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:970)
11/03/11 08:56:47 WARN zookeeper.ClientCnxn: Ignoring exception during
shutdown output
java.nio.channels.ClosedChannelException
        at
sun.nio.ch.SocketChannelImpl.shutdownOutput(SocketChannelImpl.java:667)
        at sun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:386)
        at
org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1004)
        at
org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:970)


On Thu, Mar 10, 2011 at 9:02 PM, BlueDavy Lin <[email protected]> wrote:

> When u new Get(row) first,HBase client cache the connection to the
> appropriate region server,after u restart HBase(I think u run
> standalone?),when u do Get(row) again,HBase client still use the
> cached connection to do this,so throw the Exception.
>
> But it seems should not throws the exception a lot of times,can u post
> the exception stack?
>
> 2011/3/10 King JKing <[email protected]>:
> > Dear all,
> >
> > When I stop and start HBase server, HTable
> (org.apache.hadoop.hbase.client)
> > throw exception.
> > Here is my code test:
> >            HTable ht = new HTable(config, "T1");
> >            byte[] row = Bytes.toBytes(1);
> >
> >            Get get = new Get(row);
> >            Result result = ht.get(get);
> >
> > System.out.println(Bytes.toString(result.getValue("F1".getBytes(),
> > "C1".getBytes())));
> >
> >            try {
> >                Thread.sleep(60000);
> >            } catch (InterruptedException ex) {
> >                ex.printStackTrace();
> >            }
> >
> >            get = new Get(row);
> >            result = ht.get(get);
> >
> > System.out.println(Bytes.toString(result.getValue("F1".getBytes(),
> > "C1".getBytes())));
> >
> > First I start HBase and run my code. After that I stop and start HBase.
> And
> > exception "Exception closing session to sun.nio.ch.SelectionKeyImpl"
> throws
> > a lot of times.
> >
> > Could you help me to fix this problem?
> > Thank a lot for support.
> >
>
>
>
> --
> =============================
> |     BlueDavy                                      |
> |     http://www.bluedavy.com                |
> =============================
>

Reply via email to