Karaf
  1. Karaf
  2. KARAF-996

apache-karaf + http feature spins

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Not a Problem
    • Affects Version/s: 2.2.2, 2.2.3, 2.2.4
    • Fix Version/s: None
    • Component/s: karaf-feature
    • Labels:
      None
    • Environment:

      windows, linux jvm 1.6

      Description

      When use karaf + http feature as a file download server, karaf can easily spin and an CPU can go higher than 100+ depending number of CPU you have.

      Similar issue as been posted at at service mix forum ( http://fusesource.com/forums/message.jspa?messageID=10574 )

      For my case, I am using karaf + http feature just to server as a static maven repository, here are the stop to produce

      1. Install apache-karaf-2.2+

      2. User karaf shell to install http feature

      3. Configure karaf web via etc/org.ops4j.pax.web.cfg

      ##########################################

      1. Configuration file for HTTP access.
        ##########################################

      ##########################################

      1. Basic HTTP access
        ##########################################
        org.osgi.service.http.enabled=true
        org.osgi.service.http.port=8181

      #########################################

      1. Set the location where the repository is located.
        #########################################
        org.ops4j.pax.web.config.file=etc/jetty.xml

      5. Configure etc/jetty.xml

      <?xml version="1.0"?>
      <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//
      DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">

      <Configure id="FileServer" class="org.eclipse.jetty.server.Server">

      <Set name="handler">
      <New class="org.eclipse.jetty.server.handler.HandlerList">
      <Set name="handlers">
      <Array type="org.eclipse.jetty.server.Handler">
      <Item>
      <New class="org.eclipse.jetty.server.handler.ResourceHandler">
      <Set name="directoriesListed">true</Set>
      <Set name="resourceBase"><Property name="jetty.home" default="." />/repo</Set>
      </New>
      </Item>
      <Item>
      <New class="org.eclipse.jetty.server.handler.DefaultHandler">
      </New>
      </Item>
      </Array>
      </Set>
      </New>
      </Set>
      </Configure>

      the spike can occur any time even at idle. More likely to happen when using is as a maven repository ( wget a big file can also trigger it )

        Issue Links

          Activity

          Hide
          Achim Nierbeck added a comment -

          Taken from the last comment this doesn't seem to be a problem "anymore"

          Show
          Achim Nierbeck added a comment - Taken from the last comment this doesn't seem to be a problem "anymore"
          Hide
          Dan Tran added a comment -

          karaf dev should close this issue

          Show
          Dan Tran added a comment - karaf dev should close this issue
          Hide
          Dan Tran added a comment -

          tested karaf 2.2.5-snapshot with http feature acting as maven repository and it survives my multiple concurrent downloads, small and big files.

          so it works.

          Thanks

          Show
          Dan Tran added a comment - tested karaf 2.2.5-snapshot with http feature acting as maven repository and it survives my multiple concurrent downloads, small and big files. so it works. Thanks
          Hide
          Dan Tran added a comment -

          I will try to test 2.2.5-SNAPSHOT today. Thank you for the quick response

          Show
          Dan Tran added a comment - I will try to test 2.2.5-SNAPSHOT today. Thank you for the quick response
          Hide
          Jean-Baptiste Onofré added a comment -

          I didn't reproduce the issue (using the provided test case) on Karaf 2.2.4 on my laptop.

          I make a try on 2.2.5-SNAPSHOT anyway.

          Show
          Jean-Baptiste Onofré added a comment - I didn't reproduce the issue (using the provided test case) on Karaf 2.2.4 on my laptop. I make a try on 2.2.5-SNAPSHOT anyway.
          Hide
          Jean-Baptiste Onofré added a comment -

          Pax Web 1.0.8-SNAPSHOT available. Freeman and I have upgraded Karaf 2.2.x branch with Jetty 7.5.4 and Pax Web 1.0.8-SNAPSHOT.

          If you can make a try, it would much appreciated

          Show
          Jean-Baptiste Onofré added a comment - Pax Web 1.0.8-SNAPSHOT available. Freeman and I have upgraded Karaf 2.2.x branch with Jetty 7.5.4 and Pax Web 1.0.8-SNAPSHOT. If you can make a try, it would much appreciated
          Hide
          Dan Tran added a comment -

          coolest, let me now when the pax web 1.0.8-SNAPSHOT available

          Show
          Dan Tran added a comment - coolest, let me now when the pax web 1.0.8-SNAPSHOT available
          Hide
          Jean-Baptiste Onofré added a comment -

          I will handle the Pax Web stuff (at least as a SNAPSHOT).

          Show
          Jean-Baptiste Onofré added a comment - I will handle the Pax Web stuff (at least as a SNAPSHOT).
          Hide
          Freeman Fang added a comment -

          Hi Dan,

          I generally checkout the source code and build it locally.
          The source is in git now, so just
          git clone git://github.com/ops4j/org.ops4j.pax.web.git
          cd org.ops4j.pax.web
          git co origin/pax-web-1.0.x -b pax-web-1.0.x (checkout the 1.0.x branch)
          mvn clean install
          it take me about 1.5 minutes to finish the build.

          Regards
          Freeman

          Show
          Freeman Fang added a comment - Hi Dan, I generally checkout the source code and build it locally. The source is in git now, so just git clone git://github.com/ops4j/org.ops4j.pax.web.git cd org.ops4j.pax.web git co origin/pax-web-1.0.x -b pax-web-1.0.x (checkout the 1.0.x branch) mvn clean install it take me about 1.5 minutes to finish the build. Regards Freeman
          Hide
          Dan Tran added a comment -

          umm, I dont see 1.0.8-SNAPSHOT showing up at https://oss.sonatype.org/content/repositories/ops4j-snapshots

          Show
          Dan Tran added a comment - umm, I dont see 1.0.8-SNAPSHOT showing up at https://oss.sonatype.org/content/repositories/ops4j-snapshots
          Hide
          Freeman Fang added a comment -

          Hi Dan,

          paxweb 1.0.8-SNAPSHOT should be fine, you can edit system/org/apache/karaf/assemblies/features/standard/2.2.4/standard-2.2.4-features.xml to change jetty and pax-web related bundles version there, and then remove data folder before you restart karaf.

          Regards
          Freeman

          Show
          Freeman Fang added a comment - Hi Dan, paxweb 1.0.8-SNAPSHOT should be fine, you can edit system/org/apache/karaf/assemblies/features/standard/2.2.4/standard-2.2.4-features.xml to change jetty and pax-web related bundles version there, and then remove data folder before you restart karaf. Regards Freeman
          Hide
          Dan Tran added a comment -

          Hi Freeman, thanks for this great news!!

          what version of pax web do I need to use? 1.0.8-SNAPSHOT? and what is the best way to replace it under apache karaf 2.2.4?

          Show
          Dan Tran added a comment - Hi Freeman, thanks for this great news!! what version of pax web do I need to use? 1.0.8-SNAPSHOT? and what is the best way to replace it under apache karaf 2.2.4?
          Hide
          Freeman Fang added a comment -

          IMO this is a jetty issue, lastest jetty 7.5.x fix several high CPU usage issue recently, so I think you can test with jetty 7.5.x in KARAF, you also need use pax-web snapshot which already upgrade to jetty 7.5.x.

          Freeman

          Show
          Freeman Fang added a comment - IMO this is a jetty issue, lastest jetty 7.5.x fix several high CPU usage issue recently, so I think you can test with jetty 7.5.x in KARAF, you also need use pax-web snapshot which already upgrade to jetty 7.5.x. Freeman

            People

            • Assignee:
              Achim Nierbeck
              Reporter:
              Dan Tran
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development