You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by jochenw <jo...@googlemail.com> on 2016/12/08 11:11:12 UTC

Avoird default value for org.ops4j.pax.url.mvn.repositories

Hello,

in my org.ops4j.pax.url.mvn.cfg, I have commented all remote repositories,
since I want Karaf only to search for artifacts in the default repositories:

#org.ops4j.pax.url.mvn.repositories= \
#    http://repo1.maven.org/maven2@id=central, \
...

My custom distribution contains everything I need in karaf/system, and my
own bundles in an additional karaf/myrepo folder, which I have added to the
default repositories.

Since Karaf 4.0.7 (at least there I observed this the first time), sometimes
Karaf tries to load the enterprise xml feature file from repo1.maven.org
anyways, which fails, since the server has no connection to the internet. It
also doesn't try to retrieve that from the local repo after the failure, so
the startup hangs. When I restart Karaf after that, most of the times it
starts correctly, so uses the local defaultRepositories to retrieve the
artifacts from, including all feature xml files.

Has anybody also seen this? Is there a way to grant that Karaf never tries
to retrieve things from the public repos? Up to 4.0.4, I have never seen
this behavior, and I haven't changed org.ops4j.pax.url.mvn.cfg.

Regards,
Jochen

2016-12-07 11:21:35,308 | WARN  | pool-6-thread-1  | AetherBasedResolver             
| 1 - org.ops4j.pax.logging.pax-logging-api - 1.8.5 | Error resolving
artifactorg.apache.karaf.features:enterprise:xml:features:4.0.7:Could not
transfer artifact org.apache.karaf.features:enterprise:xml:features:4.0.7
from/to central (http://repo1.maven.org/maven2/): Connect to
repo1.maven.org:80 [repo1.maven.org/151.101.36.209] failed: Connection timed
out



--
View this message in context: http://karaf.922171.n3.nabble.com/Avoird-default-value-for-org-ops4j-pax-url-mvn-repositories-tp4048924.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Avoird default value for org.ops4j.pax.url.mvn.repositories

Posted by jochenw <jo...@googlemail.com>.
Hello Philipp,

thanks for the hints. You configuration looks slightly different from mine -
while you have set org.ops4j.pax.url.mvn.repositories to the empty string in
your org.ops4j.pax.url.mvn.cfg, I have commented the setting.

Could it be that somewhere in the code, some default setting for
org.ops4j.pax.url.mvn.repositories has been introduced somewhen after Karaf
4.0.4, pointint go repo1.maven.org, which is used when this is not set via
config-admin, and in some rare cases, this is then tried first before
looking into the local repo?

I'll try to also include "org.ops4j.pax.url.mvn.repositories=" in my
org.ops4j.pax.url.mvn.cfg and check whether the problem comes again or not
(not so easy, since as already said, this is not reliably reproducible).

Regards,
Jochen



--
View this message in context: http://karaf.922171.n3.nabble.com/Avoird-default-value-for-org-ops4j-pax-url-mvn-repositories-tp4048924p4048977.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Avoird default value for org.ops4j.pax.url.mvn.repositories

Posted by smigfu <sm...@googlemail.com>.
I had a similar problem (see
http://karaf.922171.n3.nabble.com/Intermittent-error-on-startup-Error-resolving-artifact-td4047587.html).
The enterprise feature was always tried to be resolved (always the one which
was mentioned as first feature), though it was present in the local
repository. It ended up with a different exception in karaf 4.0.5 though.

We got rid of this be setting the pax mav url properties as System
Properties instead of setting them in the "org.ops4j.pax.url.mvn.cfg". The
problem in my case what that the bundle got reloaded upon reading the new
configs and got into a wired state. Maybe this helps to reveal the real
problem.

org.ops4j.pax.url.mvn.cfg
---
org.ops4j.pax.url.mvn.useFallbackRepositories=false
org.ops4j.pax.url.mvn.repositories=


system.properties
---
org.ops4j.pax.url.mvn.useFallbackRepositories=false
org.ops4j.pax.url.mvn.defaultRepositories=\
   
file:${karaf.home}/${karaf.default.repository}@id=system.repository@snapshots,
\
   
file:${karaf.base}/${karaf.default.repository}@id=child.system.repository@snapshots

Cheers,
Philipp




--
View this message in context: http://karaf.922171.n3.nabble.com/Avoird-default-value-for-org-ops4j-pax-url-mvn-repositories-tp4048924p4048968.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Avoird default value for org.ops4j.pax.url.mvn.repositories

Posted by Paul McCulloch <pk...@gmail.com>.
Your mvn.cfg looks the same as mine. I have an unmodified system repo.  I
wonder if I just haven't seen the issue yet.

Paul

On 9 December 2016 at 11:08, jochenw <jo...@googlemail.com>
wrote:

> Hello,
>
> unfortunately, it happens rarely. Not easy to reproduce this. I think that
> I
> saw this when starting Karaf cleanly, i.e. after deleting the data folder.
> I
> have skipped 4.0.6, so cannot tell whether it would also show up there.
>
> Regarding my org.ops4j.pax.url.mvn.cfg: everything is commented except for
> the following:
>
> org.ops4j.pax.url.mvn.useFallbackRepositories=false
> org.ops4j.pax.url.mvn.defaultRepositories=\
>
> file:${karaf.home}/${karaf.default.repository}@id=system.
> repository@snapshots,
> \
>     file:${karaf.data}/kar@id=kar.repository@multi@snapshots, \
>
> file:${karaf.base}/${karaf.default.repository}@id=child.
> system.repository@snapshots,
> \
>     file:${karaf.home}/myrepo@id=my_repository@snapshots
>
> And (but I don't know whether that may be relevant in this context) I have
> changed the enterprise feature xml in my custom distribution: using 2.4.0
> version of the Eclipselink JPA adapter bundle.
>
> I assume that it stumbles over the enterprise feature xml is just due to
> the
> fact that this is the first one in my featuresRepositories setting in
> org.apache.karaf.features.cfg. But also for that, I don't have a proof.
>
> Regards,
> Jochen
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Avoird-default-value-for-org-ops4j-pax-url-mvn-repositories-
> tp4048924p4048955.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

Re: Avoird default value for org.ops4j.pax.url.mvn.repositories

Posted by jochenw <jo...@googlemail.com>.
Hello,

unfortunately, it happens rarely. Not easy to reproduce this. I think that I
saw this when starting Karaf cleanly, i.e. after deleting the data folder. I
have skipped 4.0.6, so cannot tell whether it would also show up there.

Regarding my org.ops4j.pax.url.mvn.cfg: everything is commented except for
the following:

org.ops4j.pax.url.mvn.useFallbackRepositories=false
org.ops4j.pax.url.mvn.defaultRepositories=\
   
file:${karaf.home}/${karaf.default.repository}@id=system.repository@snapshots,
\
    file:${karaf.data}/kar@id=kar.repository@multi@snapshots, \
   
file:${karaf.base}/${karaf.default.repository}@id=child.system.repository@snapshots,
\
    file:${karaf.home}/myrepo@id=my_repository@snapshots

And (but I don't know whether that may be relevant in this context) I have
changed the enterprise feature xml in my custom distribution: using 2.4.0
version of the Eclipselink JPA adapter bundle.

I assume that it stumbles over the enterprise feature xml is just due to the
fact that this is the first one in my featuresRepositories setting in
org.apache.karaf.features.cfg. But also for that, I don't have a proof.

Regards,
Jochen



--
View this message in context: http://karaf.922171.n3.nabble.com/Avoird-default-value-for-org-ops4j-pax-url-mvn-repositories-tp4048924p4048955.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Avoird default value for org.ops4j.pax.url.mvn.repositories

Posted by Paul McCulloch <pk...@gmail.com>.
I've got a similar setup on 4.0.7 without any issues. I'm using a default
distribution with a custom repo containing all my required features (built
with karaf-maven-plugin:features-add-to-repository). I've made the same
changes to comment out org.ops4j.pax.url.mvn.repositories.

On 8 December 2016 at 11:58, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:

> Hi Jochen,
>
> did it work with 4.0.6 (so a regression) ?
> Is the enterprise features XML present in the system folder at the first
> boot ?
>
> If so, I consider this as a blocker (it could be related to the changes we
> did on Pax URL).
>
> Let me try to reproduce.
>
> Thanks for the report !
>
> Regards
> JB
>
>
> On 12/08/2016 12:11 PM, jochenw wrote:
>
>> Hello,
>>
>> in my org.ops4j.pax.url.mvn.cfg, I have commented all remote repositories,
>> since I want Karaf only to search for artifacts in the default
>> repositories:
>>
>> #org.ops4j.pax.url.mvn.repositories= \
>> #    http://repo1.maven.org/maven2@id=central, \
>> ...
>>
>> My custom distribution contains everything I need in karaf/system, and my
>> own bundles in an additional karaf/myrepo folder, which I have added to
>> the
>> default repositories.
>>
>> Since Karaf 4.0.7 (at least there I observed this the first time),
>> sometimes
>> Karaf tries to load the enterprise xml feature file from repo1.maven.org
>> anyways, which fails, since the server has no connection to the internet.
>> It
>> also doesn't try to retrieve that from the local repo after the failure,
>> so
>> the startup hangs. When I restart Karaf after that, most of the times it
>> starts correctly, so uses the local defaultRepositories to retrieve the
>> artifacts from, including all feature xml files.
>>
>> Has anybody also seen this? Is there a way to grant that Karaf never tries
>> to retrieve things from the public repos? Up to 4.0.4, I have never seen
>> this behavior, and I haven't changed org.ops4j.pax.url.mvn.cfg.
>>
>> Regards,
>> Jochen
>>
>> 2016-12-07 11:21:35,308 | WARN  | pool-6-thread-1  | AetherBasedResolver
>> | 1 - org.ops4j.pax.logging.pax-logging-api - 1.8.5 | Error resolving
>> artifactorg.apache.karaf.features:enterprise:xml:features:4.0.7:Could not
>> transfer artifact org.apache.karaf.features:enterprise:xml:features:4.0.7
>> from/to central (http://repo1.maven.org/maven2/): Connect to
>> repo1.maven.org:80 [repo1.maven.org/151.101.36.209] failed: Connection
>> timed
>> out
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.
>> com/Avoird-default-value-for-org-ops4j-pax-url-mvn-repositor
>> ies-tp4048924.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: Avoird default value for org.ops4j.pax.url.mvn.repositories

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Jochen,

did it work with 4.0.6 (so a regression) ?
Is the enterprise features XML present in the system folder at the first 
boot ?

If so, I consider this as a blocker (it could be related to the changes 
we did on Pax URL).

Let me try to reproduce.

Thanks for the report !

Regards
JB

On 12/08/2016 12:11 PM, jochenw wrote:
> Hello,
>
> in my org.ops4j.pax.url.mvn.cfg, I have commented all remote repositories,
> since I want Karaf only to search for artifacts in the default repositories:
>
> #org.ops4j.pax.url.mvn.repositories= \
> #    http://repo1.maven.org/maven2@id=central, \
> ...
>
> My custom distribution contains everything I need in karaf/system, and my
> own bundles in an additional karaf/myrepo folder, which I have added to the
> default repositories.
>
> Since Karaf 4.0.7 (at least there I observed this the first time), sometimes
> Karaf tries to load the enterprise xml feature file from repo1.maven.org
> anyways, which fails, since the server has no connection to the internet. It
> also doesn't try to retrieve that from the local repo after the failure, so
> the startup hangs. When I restart Karaf after that, most of the times it
> starts correctly, so uses the local defaultRepositories to retrieve the
> artifacts from, including all feature xml files.
>
> Has anybody also seen this? Is there a way to grant that Karaf never tries
> to retrieve things from the public repos? Up to 4.0.4, I have never seen
> this behavior, and I haven't changed org.ops4j.pax.url.mvn.cfg.
>
> Regards,
> Jochen
>
> 2016-12-07 11:21:35,308 | WARN  | pool-6-thread-1  | AetherBasedResolver
> | 1 - org.ops4j.pax.logging.pax-logging-api - 1.8.5 | Error resolving
> artifactorg.apache.karaf.features:enterprise:xml:features:4.0.7:Could not
> transfer artifact org.apache.karaf.features:enterprise:xml:features:4.0.7
> from/to central (http://repo1.maven.org/maven2/): Connect to
> repo1.maven.org:80 [repo1.maven.org/151.101.36.209] failed: Connection timed
> out
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Avoird-default-value-for-org-ops4j-pax-url-mvn-repositories-tp4048924.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofr
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com