You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by ji yan <ya...@gmail.com> on 2013/11/12 09:44:54 UTC

Cannot start zookeeper after deleting transaction logs and snapshots

I have made a mistake, in the ignorance of resetting the state of zookeeper
server, by deleting all the snapshots and transaction logs on the server.
When I start the server, the log complains

[2013-11-12 00:27:11,201] INFO Refusing session request for client /
10.0.1.200:44939 as it has seen zxid 0x79d our last zxid is 0x0 client must
try another server (org.apache.zookeeper.server.NIOServerCnxn)

I understand that this is because the client has kept an offset before and
it sees that the latest offset in the log ( since all has been removed ) is
way lower than it last time saw, so it refused to connect to load stale
data. Can someone tell me how can I get myself unstuck from this situation?
I cannot find the place where the client keeps the zxid offset.

Re: Cannot start zookeeper after deleting transaction logs and snapshots

Posted by German Blanco <ge...@gmail.com>.
Client keeps the last zxid in memory, you just need to restart the client.
By the way, there is a JIRA case on this: ZOOKEEPER-832


On Tue, Nov 12, 2013 at 9:44 AM, ji yan <ya...@gmail.com> wrote:

> I have made a mistake, in the ignorance of resetting the state of zookeeper
> server, by deleting all the snapshots and transaction logs on the server.
> When I start the server, the log complains
>
> [2013-11-12 00:27:11,201] INFO Refusing session request for client /
> 10.0.1.200:44939 as it has seen zxid 0x79d our last zxid is 0x0 client
> must
> try another server (org.apache.zookeeper.server.NIOServerCnxn)
>
> I understand that this is because the client has kept an offset before and
> it sees that the latest offset in the log ( since all has been removed ) is
> way lower than it last time saw, so it refused to connect to load stale
> data. Can someone tell me how can I get myself unstuck from this situation?
> I cannot find the place where the client keeps the zxid offset.
>