Return-Path: X-Original-To: apmail-zookeeper-bookkeeper-user-archive@minotaur.apache.org Delivered-To: apmail-zookeeper-bookkeeper-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9FB0099D9 for ; Fri, 11 May 2012 02:40:50 +0000 (UTC) Received: (qmail 66739 invoked by uid 500); 11 May 2012 02:40:50 -0000 Delivered-To: apmail-zookeeper-bookkeeper-user-archive@zookeeper.apache.org Received: (qmail 66697 invoked by uid 500); 11 May 2012 02:40:50 -0000 Mailing-List: contact bookkeeper-user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: bookkeeper-user@zookeeper.apache.org Delivered-To: mailing list bookkeeper-user@zookeeper.apache.org Received: (qmail 66659 invoked by uid 99); 11 May 2012 02:40:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 May 2012 02:40:49 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of guosijie@gmail.com designates 209.85.215.42 as permitted sender) Received: from [209.85.215.42] (HELO mail-lpp01m010-f42.google.com) (209.85.215.42) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 May 2012 02:40:43 +0000 Received: by lagy4 with SMTP id y4so1524421lag.15 for ; Thu, 10 May 2012 19:40:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=3RJsg6SLc5bHCimQiJOoRlX7kZtCMmwtNJcOhK1rQjA=; b=D0GJ9CwVFVoO73ve5btT7J2IQMui4a0t6iAbcJphPhkEVRMFndu47d5a+gFLkejolk 3Z3ORqGBqHR9fPxI0lj0/VkQ+3bFW6hhH9uApkCMV1TIneQmV3bTma746tXnL0qo89cO NtmRRE5PSupuwI2CRIc+o8+ykpjGu0MG1x6mjnQthhHmVOjhQY4/pQk2dIEvD9MihbBb fybIPIyOjE2lIU2gTFtnjSZbSjEeCaCpO8nGU5MrfIDM7fZWlTmEXLUqcC9CkLyUlt8F Dwo7/TVBkhFPduwa03xpHM/VBFKWQSUhovaAyKNZNfw2HmIGvfZTvpZh8/bQUWs0D6tZ 5MNw== MIME-Version: 1.0 Received: by 10.152.105.173 with SMTP id gn13mr6564996lab.20.1336704023044; Thu, 10 May 2012 19:40:23 -0700 (PDT) Received: by 10.112.18.227 with HTTP; Thu, 10 May 2012 19:40:23 -0700 (PDT) In-Reply-To: References: Date: Fri, 11 May 2012 10:40:23 +0800 Message-ID: Subject: Re: error recovering ledger From: Sijie Guo To: bookkeeper-user@zookeeper.apache.org, jnagro@hubspot.com Content-Type: multipart/alternative; boundary=f46d040714c576a26f04bfb9a878 --f46d040714c576a26f04bfb9a878 Content-Type: text/plain; charset=ISO-8859-1 Hello John, from the exception you provided, it seems that an old version bookkeeper client talking to a new version bookie server. After BOOKKEEPER-135 is applied, bookkeeper client needs to provide password to do fencing for recovery, as code: https://github.com/apache/bookkeeper/blob/47244dd77fb291ec95d5da4c96751ea92bc2d516/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieServer.java#L384 from client side, bookkeeper client provides its protocol version and password when readAndFenceLedger https://github.com/apache/bookkeeper/blob/47244dd77fb291ec95d5da4c96751ea92bc2d516/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java#L282 and current protocol version is 2. https://github.com/apache/bookkeeper/blob/47244dd77fb291ec95d5da4c96751ea92bc2d516/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieProtocol.java#L40 so could you provide which version of bookkeeper client & bookie server you used? Thanks, Sijie On Fri, May 11, 2012 at 5:40 AM, John Nagro wrote: > Flavio - > > It appears that the second message is generated based on the version in > the packet header, not the password itself: > > > https://github.com/apache/bookkeeper/blob/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieServer.java#L390 > > Am I missing something? > > Thanks! > > -John > > > On Thu, May 10, 2012 at 5:37 PM, Flavio Junqueira wrote: > >> The second message refers to fencing, so it sounds like you're trying to >> recover the ledger. The fencing mechanism seems to be rejecting your >> request because the password is incorrect. >> >> -Flavio >> >> On May 10, 2012, at 5:16 PM, John Nagro wrote: >> >> Hello - >> >> I've been trying to recover some old ledgers on the server and i thought >> i was having an issue with my supplied passwords, but i suspect it may be >> something else. On the client i see warnings for code 102 (which i know is >> an auth issue), on the server i see these log lines: >> >> 2012-05-10 11:05:01,493 - WARN [NIOServerFactory-3181:BookieServer@383] >> - Ledger 251784 fenced by >> Socket[addr=/***REDACTED***,port=57050,localport=3181] >> 2012-05-10 11:05:01,493 - ERROR [NIOServerFactory-3181:BookieServer@390] >> - Password not provided, Not safe to fence 251784 >> 2012-05-10 11:05:01,493 - ERROR [NIOServerFactory-3181:BookieServer@414] >> - Unauthorized access to ledger 251784 >> >> org.apache.bookkeeper.bookie.BookieException$BookieUnauthorizedAccessException >> at >> org.apache.bookkeeper.bookie.BookieException.create(BookieException.java:46) >> at >> org.apache.bookkeeper.proto.BookieServer.processPacket(BookieServer.java:391) >> at >> org.apache.bookkeeper.proto.NIOServerFactory$Cnxn.readRequest(NIOServerFactory.java:315) >> at >> org.apache.bookkeeper.proto.NIOServerFactory$Cnxn.doIO(NIOServerFactory.java:213) >> at >> org.apache.bookkeeper.proto.NIOServerFactory.run(NIOServerFactory.java:124) >> >> >> Looking at the code, I think these errors come from here: >> >> >> https://github.com/apache/bookkeeper/blob/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieServer.java#L387 >> >> Which looks like it relates to the version number extracted from the >> client packet? >> >> >> https://github.com/apache/bookkeeper/blob/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieServer.java#L389 >> >> Looks like those messages were added on April 2nd: >> >> >> https://github.com/apache/bookkeeper/commit/47244dd77fb291ec95d5da4c96751ea92bc2d516#diff-10 >> >> >> I'm running the latest published 4.1-SNAPSHOT client-side. >> >> Am i experiencing a password issue? Or is it not getting to the point >> where it is checked? Any ideas would be appreciated, thanks! >> >> -John Nagro >> >> >> flavio >> junqueira >> senior research scientist >> >> fpj@yahoo-inc.com >> direct +34 93-183-8828 >> >> avinguda diagonal 177, 8th floor, barcelona, 08018, es >> phone (408) 349 3300 fax (408) 349 3301 >> >> > --f46d040714c576a26f04bfb9a878 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello John,

from the exception you provided, it seems th= at an old version bookkeeper client talking to a new version bookie server.= =A0

After BOOKKEEPER-135 is applied, bookkeeper cl= ient needs to provide password to do fencing for recovery, as code:


from client side, bookkeeper client provides its protoc= ol version and password when readAndFenceLedger

https://github.com/apache/bookkeeper/bl= ob/47244dd77fb291ec95d5da4c96751ea92bc2d516/bookkeeper-server/src/main/java= /org/apache/bookkeeper/proto/PerChannelBookieClient.java#L282

and current protocol version is 2.

=

so could you provide which version of bookkeeper client= & bookie server you used?

Thanks,
S= ijie

On Fri, May 11, 2012 at 5:40 AM, Joh= n Nagro <jnagro@hubspot.com> wrote:
Flavio -

It appears that = the second message is generated based on the version in the packet header, = not the password itself:


Am I missing something?

Thanks= !

-John


On Thu, May 10, 2012 a= t 5:37 PM, Flavio Junqueira <fpj@yahoo-inc.com> wrote:
The seco= nd message refers to fencing, so it sounds like you're trying to recove= r the ledger. The fencing mechanism seems to be rejecting your request beca= use the password is incorrect.

-Flavio

On May 10, 2012, a= t 5:16 PM, John Nagro wrote:

Hello -
I've been trying to recover some old ledgers on the ser= ver and i thought i was having an issue with my supplied passwords, but i s= uspect it may be something else. On the client i see warnings for code 102 = (which i know is an auth issue), on the server i see these log lines:

2012-05-10 11:05:01,493 - WARN =A0[NIOServerFactor= y-3181:BookieServer@383] - Ledger 251784 fenced by Socket[addr=3D/***REDACT= ED***,port=3D57050,localport=3D3181]
2012-05-10 11:05:01,493 - ER= ROR [NIOServerFactory-3181:BookieServer@390] - Password not provided, Not s= afe to fence 251784
2012-05-10 11:05:01,493 - ERROR [NIOServerFactory-3181:BookieServer@41= 4] - Unauthorized access to ledger 251784
org.apache.bookkeeper.b= ookie.BookieException$BookieUnauthorizedAccessException
at org.apache.bookkeeper.bookie.BookieE= xception.create(BookieException.java:46)
at org.apache.bookkeeper.= proto.BookieServer.processPacket(BookieServer.java:391)
at org.apache.bookkeeper.proto.NIOServe= rFactory$Cnxn.readRequest(NIOServerFactory.java:315)
at org.apache.bookkeeper.= proto.NIOServerFactory$Cnxn.doIO(NIOServerFactory.java:213)
at org.apache.bookkeeper.proto.NIOS= erverFactory.run(NIOServerFactory.java:124)


Looking at the code, I think these= errors come from here:


Which looks like it relates to the version number extra= cted from the client packet?=A0


Looks like those messages were added on April 2nd:



I'm running the latest published 4.1= -SNAPSHOT client-side.

Am i experiencing a passwor= d issue? Or is it not getting to the point where it is checked? Any ideas w= ould be appreciated, thanks!

-John Nagro

flavio
junqueira
senior research scientist=
=A0
fpj@yah= oo-inc.com
direct +34 93-183-882= 8
=A0
avin= guda diagonal 177, 8th floor, barcelona, 08018, es
phone (408) 349 3300=A0=A0=A0=A0fax (408) 349 3301



--f46d040714c576a26f04bfb9a878--