From dev-return-16779-apmail-ranger-dev-archive=ranger.apache.org@ranger.apache.org Tue Feb 27 12:09:13 2018 Return-Path: X-Original-To: apmail-ranger-dev-archive@www.apache.org Delivered-To: apmail-ranger-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F24A510347 for ; Tue, 27 Feb 2018 12:09:12 +0000 (UTC) Received: (qmail 15711 invoked by uid 500); 27 Feb 2018 12:09:12 -0000 Delivered-To: apmail-ranger-dev-archive@ranger.apache.org Received: (qmail 15657 invoked by uid 500); 27 Feb 2018 12:09:12 -0000 Mailing-List: contact dev-help@ranger.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ranger.apache.org Delivered-To: mailing list dev@ranger.apache.org Received: (qmail 15635 invoked by uid 99); 27 Feb 2018 12:09:12 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Feb 2018 12:09:12 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 01168C61F3 for ; Tue, 27 Feb 2018 12:09:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.979 X-Spam-Level: ** X-Spam-Status: No, score=2.979 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=2, KAM_INFOUSMEBIZ=0.75, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id PvEiNSKbMre5 for ; Tue, 27 Feb 2018 12:09:08 +0000 (UTC) Received: from mail-qt0-f177.google.com (mail-qt0-f177.google.com [209.85.216.177]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id A7C325F254 for ; Tue, 27 Feb 2018 12:09:07 +0000 (UTC) Received: by mail-qt0-f177.google.com with SMTP id l25so12925894qtj.1 for ; Tue, 27 Feb 2018 04:09:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=bYKyzNZiufEZ5LciJXmBdNVHV/qrEEuNcJ6Oo+vGyMo=; b=h+h3lAJ9R35J765LAPNq2ekRt+FS/4ImZRhvAp5tYBNoFG7zF2kf92oYXwXr7jp8bV 1DgjUGCOp4yjmrcL+3iGM9fLwaada4cwzKLiwPlk/R92BfS1Wd4kCthRTi/LcYfZhEy7 //lmw6UnIbyR7TJskprO9yYv2SSNMnCJDoTCbkIvd8jIulqVJVtNA7etnR+4IPKtMlT2 B1NX2NZcDOEmXE1l7qYBi7Ufk324D7X1gF/SIfVwhu0bkx2LcryXqVreteG5mAguaddS CNIYfshj1vXK7ED+GIxVqJQZ1kFNg6DGMKtHHh6igzViG6rGYGp1ouEtXiYd+cvcJW0+ 4YSQ== X-Gm-Message-State: APf1xPBkmu0gN+K4ETTss5hF2mMY9/xeKqwuKSVKzl6n607pOLOIOfqG NxhLRclkP4BkFAv4r31vuGLDEeMqs5bXZGM/zOXKbw== X-Google-Smtp-Source: AG47ELsOKMkY0/Z492qp7z6pmseyjDQR89YYdDdqIbDGMkIKSqHoHlUJ2Cz9G00gvHayQxlR3vi+Tl2g5vmxejwKVzI= X-Received: by 10.237.41.129 with SMTP id o1mr23140205qtd.2.1519733346336; Tue, 27 Feb 2018 04:09:06 -0800 (PST) MIME-Version: 1.0 References: <539CF295-0844-4FEE-8B91-30DA6A91538F@gmail.com> In-Reply-To: From: Nigel Jones Date: Tue, 27 Feb 2018 12:08:54 +0000 Message-ID: Subject: Re: servicedef validation - implClass To: dev@ranger.apache.org Content-Type: multipart/mixed; boundary="001a114d580c448fbc0566307ee9" --001a114d580c448fbc0566307ee9 Content-Type: multipart/alternative; boundary="001a114d580c448fb90566307ee7" --001a114d580c448fb90566307ee7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Having tried this against master (for about a week ago) I am still getting the same issue deploying the plugin on a base ranger install (it works ok in HDP) The exception trace in the log included as an attachment My ews/lib directory does include ranger-plugins-common-1.0.0-SNAPSHOT.jar and is readable by the user ranger is started with It is also available within ews/webapp/WEB-INF/lib Currently my implClass is blank Any ideas? On Sat, 3 Feb 2018 at 00:37 Ramesh Mani wrote: > Nigel, > > Could you please provide the exception stack that is printed along with > error message you are showing. Please check in xa_portal.log ( Ranger log= ). > > Also check in Ranger class path ranger-plugins-common*jar is there. Check > in {install.dir}/ranger-admin/ews/lib and > {install.dir}/ranger-admin/ews/webapp/WEB-INF/lib and it has the necessar= y > permission for the process user who start ranger admin. > > As you notice it should have used the base implementation when you leave > implClass blank / or not in the service def. > > Regards, > Ramesh > > > On 2/2/18, 6:24 AM, "Nigel Jones" wrote: > > >We're currently writing a Ranger plugin for an open source virtual > >database driver known as =C5=92GaianDB=C2=B9. > > > >We have the basics of a plugin working, but today a colleague tried to > >setup our plugin, and on their ranger install they could not create an > >instance of our ranger service, hitting the error > > > >"Gaian failed to find service class > >org.apache.ranger.services.gaiandb.RangerServiceGaian. Resource lookup > >will not be available. Please make sure plugin jar is in the correct > >place.=C2=B2 > > > >I had expected this to be a warning (fair enough), but it actually > >prevents the UI from saving the service instance, and so Gaian related > >policies cannot be created. > > > >They got this on I think a) an old 0.6.x build, and 0.7.1. > >Meanwhile I had been using a HDP 2.6.3 setup, which comes with 0.7.0 and > >with the same service definition did NOT of course hit this error. > > > >We haven=C2=B9t actually deployed any plugin code to the ranger server (= yet) > >since we have not implemented the resource lookup capability. We had > >though specified an implClass in the servicedef. It=C2=B9s a later task = :-) > > > >Looking at the ranger code in ServiceMgr.java it seems as if an empty > >string should cause ranger to use a default class. We tried this, as wel= l > >as specifying the org.apache.ranger.plugin.service.RangerDefaultService > >class, but had the same error in both cases. I was though looking at cod= e > >in master and see there have been a few changes > > > >Any suggestions as to how to persuade 0.7.0 to load the servicedef (othe= r > >than implement the class required, albeit a no-op one=C5=A0?), or an > >explanation as to why we might see different behaviour? > > > >I=C2=B9m setting up a ranger install off master to debug/check latest co= de=C5=A0. > > > >For info the servicedef begins: > >{ > > "id":99, > > "name": "gaian", > > "implClass": "org.apache.ranger.services.gaiandb.RangerServiceGaian", > > "label": "Gaian", > > "description": "Gaian", > > "options": { > > "enableDenyAndExceptionsInPolicies": "true" > > }, > > "guid": "86d10748-e4fc-442b-8991-f6a727054ece", > > > > "resources": [ > >The full version can be found in > >https://issues.apache.org/jira/browse/RANGER-1699 > > - see the latest > >attachment. Not as a patch as currently getting things working in a diff= . > >Build tree > > > >If it seems like a bug (rather than a newbie error or specific to hdp) > >let me know and I=C2=B9ll open a jira! > > > >Many thanks > >Nigel. > > > > > > > > --001a114d580c448fb90566307ee7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Having tried this against master (for about a week ago) I = am still getting the same issue deploying the plugin on a base ranger insta= ll (it works ok in HDP)

The exception trace in the log i= ncluded as an attachment

My ews/lib directory does= include
ranger-plugins-common-1.0.0-SNAPSHOT.jar
<= br>
and is readable by the user ranger is started with
=
It is also available within ews/webapp/WEB-INF/lib

Currently my implClass is blank=C2=A0

<= div>Any ideas?
On Sat,= 3 Feb 2018 at 00:37 Ramesh Mani <rmani@hortonworks.com> wrote:
Nigel,

Could you please provide the exception stack that is printed along with
error message you are showing. Please check in xa_portal.log ( Ranger log).=

Also check in Ranger class path ranger-plugins-common*jar is there. Check in {install.dir}/ranger-admin/ews/lib and
{install.dir}/ranger-admin/ews/webapp/WEB-INF/lib and it has the necessary<= br> permission for the process user who start ranger admin.

As you notice it should have used the base implementation when you leave implClass blank / or not in the service def.

Regards,
Ramesh


On 2/2/18, 6:24 AM, "Nigel Jones" <nigel.l.jones@gmail.com> wrote:
>We're currently writing a Ranger plugin for an open source virtual<= br> >database driver known as =C5=92GaianDB=C2=B9.
>
>We have the basics of a plugin working, but today a colleague tried to<= br> >setup our plugin, and on their ranger install they could not create an<= br> >instance of our ranger service, hitting the error
>
>"Gaian failed to find service class
>org.apache.ranger.services.gaiandb.RangerServiceGaian. Resource lookup<= br> >will not be available. Please make sure plugin jar is in the correct >place.=C2=B2
>
>I had expected this to be a warning (fair enough), but it actually
>prevents the UI from saving the service instance, and so Gaian related<= br> >policies cannot be created.
>
>They got this on I think a) an old 0.6.x build, and 0.7.1.
>Meanwhile I had been using a HDP 2.6.3 setup, which comes with 0.7.0 an= d
>with the same service definition did NOT of course hit this error.
>
>We haven=C2=B9t actually deployed any plugin code to the ranger server = (yet)
>since we have not implemented the resource lookup capability. We had >though specified an implClass in the servicedef. It=C2=B9s a later task= :-)
>
>Looking at the ranger code in ServiceMgr.java it seems as if an empty >string should cause ranger to use a default class. We tried this, as we= ll
>as specifying the org.apache.ranger.plugin.service.RangerDefaultService=
>class, but had the same error in both cases. I was though looking at co= de
>in master and see there have been a few changes
>
>Any suggestions as to how to persuade 0.7.0 to load the servicedef (oth= er
>than implement the class required, albeit a no-op one=C5=A0?), or an >explanation as to why we might see different behaviour?
>
>I=C2=B9m setting up a ranger install off master to debug/check latest c= ode=C5=A0.
>
>For info the servicedef begins:
>{
>=C2=A0 "id":99,
>=C2=A0 "name": "gaian",
>=C2=A0 "implClass": "org.apache.ranger.services.gaiandb.= RangerServiceGaian",
>=C2=A0 "label": "Gaian",
>=C2=A0 "description": "Gaian",
>=C2=A0 "options": {
>=C2=A0 =C2=A0 "enableDenyAndExceptionsInPolicies": "true= "
>=C2=A0 },
>=C2=A0 =C2=A0 "guid": "86d10748-e4fc-442b-8991-f6a727054= ece",
>
>=C2=A0 "resources": [
>The full version can be found in
>https://issues.apache.org/jira/browse/RANGER-16= 99
><https://issues.apache.org/jira/browse/RAN= GER-1699> - see the latest
>attachment. Not as a patch as currently getting things working in a dif= f.
>Build tree
>
>If it seems like a bug (rather than a newbie error or specific to hdp)<= br> >let me know and I=C2=B9ll open a jira!
>
>Many thanks
>Nigel.
>
>
>

--001a114d580c448fb90566307ee7-- --001a114d580c448fbc0566307ee9--