Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C58DA200CC6 for ; Tue, 4 Jul 2017 07:47:52 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C4472160BF9; Tue, 4 Jul 2017 05:47:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E3881160BEC for ; Tue, 4 Jul 2017 07:47:51 +0200 (CEST) Received: (qmail 17123 invoked by uid 500); 4 Jul 2017 05:47:51 -0000 Mailing-List: contact user-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@karaf.apache.org Delivered-To: mailing list user@karaf.apache.org Received: (qmail 17113 invoked by uid 99); 4 Jul 2017 05:47:50 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jul 2017 05:47:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 716081A0790 for ; Tue, 4 Jul 2017 05:47:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.593 X-Spam-Level: * X-Spam-Status: No, score=1.593 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, URI_HEX=1.313] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id KmBDYlOnA3Uz for ; Tue, 4 Jul 2017 05:47:46 +0000 (UTC) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 357AC5FDAD for ; Tue, 4 Jul 2017 05:47:46 +0000 (UTC) Received: from mfilter23-d.gandi.net (mfilter23-d.gandi.net [217.70.178.151]) by relay2-d.mail.gandi.net (Postfix) with ESMTP id 8994AC5A61 for ; Tue, 4 Jul 2017 07:47:45 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter23-d.gandi.net Received: from relay2-d.mail.gandi.net ([IPv6:::ffff:217.70.183.194]) by mfilter23-d.gandi.net (mfilter23-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id RcZGeq_AbQYK for ; Tue, 4 Jul 2017 07:47:44 +0200 (CEST) X-Originating-IP: 82.238.224.4 Received: from [192.168.134.109] (bre91-1-82-238-224-4.fbx.proxad.net [82.238.224.4]) (Authenticated sender: jb@nanthrax.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 01054C5A5C for ; Tue, 4 Jul 2017 07:47:43 +0200 (CEST) Subject: Re: Problem using drop-in deploy feature To: user@karaf.apache.org References: <4D81877C-8233-4033-870B-7EEAB0BD95EE@leangen.net> <84265986-4f29-0c00-8b1c-38efaee8af72@nanthrax.net> <76807512-F71C-44AA-841E-85F1C0A3413C@leangen.net> From: =?UTF-8?Q?Jean-Baptiste_Onofr=c3=a9?= Message-ID: Date: Tue, 4 Jul 2017 07:47:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <76807512-F71C-44AA-841E-85F1C0A3413C@leangen.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit archived-at: Tue, 04 Jul 2017 05:47:53 -0000 Hi David, You mean your Bundle Repository is authenticated, right ? The json/xml prefix is when you use resource repository in etc/org.apache.karaf.features.cfg file. Regards JB On 07/04/2017 07:28 AM, David Leangen wrote: > > Hi! > > I worked through the code and noticed that it was just a simple matter of the connection not handing the authentication. I will submit a patch. > > However… > > More troubling is that the OBR directs to resources that also require authentication… and I have no idea how to authenticate those! I think that is why my resolution is failing. > > > Any advice as to how to implement authentication for my repository?? > > > Thanks! > =David > > > >> On Jul 4, 2017, at 5:08 AM, David Leangen wrote: >> >> >> Hi JB, >> >> I tried prefixing with “xml:”, but that did not help. >> >> Could it be that the “user:pass@“ part of the URL is being ignored? >> >> Today, I will try to step through the code to see what is happening. >> >> >> Cheers, >> =David >> >> >>> On Jul 3, 2017, at 8:35 PM, Jean-Baptiste Onofré wrote: >>> >>> The resource repository has to be prefixed by json or xml in the URL. >>> >>> Let me find an example. >>> >>> Regards >>> JB >>> >>> On 07/03/2017 12:14 PM, David Leangen wrote: >>>> Hi! >>>> I am trying to follow Guillaume’s advice from this thread: >>>> http://karaf.922171.n3.nabble.com/Karaf-Feature-vs-OBR-tp4050720p4050762.html >>>> I added a file to the deploy directory with this format: >>>> >>>> [url to the OBR repo] >>>> >>>> [the requirement] >>>> >>>> >>>> However, I keep getting a 401 from the repository server for the resource-repository. >>>> When I curl using exactly the same URL, I get the contents of the OBR index file with no problem whatsoever. >>>> Any idea what this may be so? I see nothing in the logs other than this (URL edited): >>>>> 2017-07-03T04:56:09,062 | ERROR | FelixDispatchQueue | FeatureDeploymentListener | 24 - org.apache.karaf.deployer.features - 4.1.1 | Unable to install features >>>>> java.lang.RuntimeException: java.io.IOException: Unexpected http response loading https://user:pass@example.com/obr/index.xml : 401 Unauthorized >>>>> at org.apache.karaf.features.internal.repository.UrlLoader.checkAndLoadCache(UrlLoader.java:101) ~[?:?] >>>>> at org.apache.karaf.features.internal.repository.XmlRepository.checkAndLoadReferrals(XmlRepository.java:156) ~[?:?] >>>>> at org.apache.karaf.features.internal.repository.XmlRepository.checkAndLoadCache(XmlRepository.java:118) ~[?:?] >>>>> at org.apache.karaf.features.internal.repository.XmlRepository.getResources(XmlRepository.java:62) ~[?:?] >>>>> at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:482) ~[?:?] >>>>> at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:372) ~[?:?] >>>>> at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:187) ~[?:?] >>>>> at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:285) ~[?:?] >>>>> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1170) ~[?:?] >>>>> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$0(FeaturesServiceImpl.java:1069) ~[?:?] >>>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?] >>>>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?] >>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?] >>>>> at java.lang.Thread.run(Thread.java:748) [?:?] >>>>> Caused by: java.io.IOException: Unexpected http response loading https://user:pass@example.com/obr/index.xml : 401 Unauthorized >>>>> at org.apache.karaf.features.internal.repository.UrlLoader.checkAndLoadCache(UrlLoader.java:71) ~[?:?] >>>>> ... 13 more >>>> Cheers, >>>> =David >>> >>> -- >>> Jean-Baptiste Onofré >>> jbonofre@apache.org >>> http://blog.nanthrax.net >>> Talend - http://www.talend.com >> > -- Jean-Baptiste Onofré jbonofre@apache.org http://blog.nanthrax.net Talend - http://www.talend.com