You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Pavel Ilyushko <pa...@gmail.com> on 2014/02/07 09:48:27 UTC
30 sec delay when installing features using file: or http:
protocols
Hello,
I'm a new user of Karaf and recently I've upgraded from Karaf 2.2.8 to 3.0.0
(running with JDK jdk1.7.0_17 on Windows).
I've noticed that in the new Karaf there's a ~ 30 seconds delay (timeout)
when installing features using file: or http: protocol, even though using
mvn: protocol works fast.
To make a clean test, I've unzipped Karaf 3.0.0 and then added the following
feature repo:
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="test">
<feature name="testFeature" version="1.0.0">
<bundle>mvn:org.apache.servicemix.nmr/org.apache.servicemix.nmr.api/1.0.0-m2</bundle>
</feature>
</features>
installing the feature using mvn: protocol is fast.
however, both:
file:/d:/temp/org.apache.servicemix.nmr.api-1.0.0-m2.jar
and
http://repo1.maven.org/maven2/org/apache/servicemix/nmr/org.apache.servicemix.nmr.api/1.0.0-m2/org.apache.servicemix.nmr.api-1.0.0-m2.jar
take the feature at least 30 seconds to install.
I've had a look at the BundleManager class'
(https://apache.googlesource.com/karaf/+/trunk/features/core/src/main/java/org/apache/karaf/features/internal/BundleManager.java),
private void waitForUrlHandler(String protocol) method, and saw a wait call
there:
urlHandlerTracker.waitForService(30000);
This could be the reason of the delay for the file: and http: protocols.
Is there a way to avoid this delay (as with the mvn: protocol)? We're using
the install feature functionality in our application on a regular basis, so
having this timeout can seriously hinder overall performance.
This was not an issue with the older Karaf 2.2.8.
Thanks for you help!
--
View this message in context: http://karaf.922171.n3.nabble.com/30-sec-delay-when-installing-features-using-file-or-http-protocols-tp4031572.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: 30 sec delay when installing features using file: or http:
protocols
Posted by Pavel Ilyushko <pa...@gmail.com>.
Hello Jean-Baptiste,
Did you have any chance to look at the problem described (and reproduce it)?
Any idea about when it will be fixed?
Thanks!
Pavel
--
View this message in context: http://karaf.922171.n3.nabble.com/30-sec-delay-when-installing-features-using-file-or-http-protocols-tp4031572p4032037.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: 30 sec delay when installing features using file: or http: protocols
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Pavel,
I bet it's due to the pax-url-aether: it waits the mvn resolution
timeout (even if it's not a mvn URL) before "falling" back to http or
file URL.
Let me check if we can improve that.
Regards
JB
On 02/07/2014 09:48 AM, Pavel Ilyushko wrote:
> Hello,
>
> I'm a new user of Karaf and recently I've upgraded from Karaf 2.2.8 to 3.0.0
> (running with JDK jdk1.7.0_17 on Windows).
>
> I've noticed that in the new Karaf there's a ~ 30 seconds delay (timeout)
> when installing features using file: or http: protocol, even though using
> mvn: protocol works fast.
>
> To make a clean test, I've unzipped Karaf 3.0.0 and then added the following
> feature repo:
>
> <features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="test">
> <feature name="testFeature" version="1.0.0">
>
> <bundle>mvn:org.apache.servicemix.nmr/org.apache.servicemix.nmr.api/1.0.0-m2</bundle>
> </feature>
> </features>
>
> installing the feature using mvn: protocol is fast.
>
> however, both:
>
> file:/d:/temp/org.apache.servicemix.nmr.api-1.0.0-m2.jar
>
> and
>
> http://repo1.maven.org/maven2/org/apache/servicemix/nmr/org.apache.servicemix.nmr.api/1.0.0-m2/org.apache.servicemix.nmr.api-1.0.0-m2.jar
>
> take the feature at least 30 seconds to install.
>
> I've had a look at the BundleManager class'
> (https://apache.googlesource.com/karaf/+/trunk/features/core/src/main/java/org/apache/karaf/features/internal/BundleManager.java),
>
> private void waitForUrlHandler(String protocol) method, and saw a wait call
> there:
>
> urlHandlerTracker.waitForService(30000);
>
> This could be the reason of the delay for the file: and http: protocols.
>
> Is there a way to avoid this delay (as with the mvn: protocol)? We're using
> the install feature functionality in our application on a regular basis, so
> having this timeout can seriously hinder overall performance.
>
> This was not an issue with the older Karaf 2.2.8.
>
> Thanks for you help!
>
>
>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/30-sec-delay-when-installing-features-using-file-or-http-protocols-tp4031572.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