Karaf
  1. Karaf
  2. KARAF-788

apache-karaf-2.2.2 on centos cant install webconsole feature (same deal with apache-servicemix-4.3.0/karaf)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Duplicate
    • Affects Version/s: 2.2.2
    • Fix Version/s: None
    • Component/s: karaf-webconsole
    • Labels:
    • Environment:

      Linux 2.6.18-238.el5 x86_64 x86_64 x86_64 GNU/Linux
      CentOS

      Description

      After starting the karaf console and attempting to `features:install webconsole`, I get the following error:

      karaf@root> features:install webconsole
      Error executing command: URL [mvn:org.apache.felix/org.apache.felix.metatype/1.0.4] could not be resolved.

      The machine I am executing this command on is on the same network with the same http proxy as my local running machine with Windows 7 x86_64. The karaf binary for Windows does not suffer from the same problem. I have configured etc/system.properties with http.proxyHost and http.proxyPort on both machines.

        Issue Links

          Activity

          Hide
          Jean-Baptiste Onofré added a comment -

          I resolved this issue as duplicate. KARAF-846 is about better support of proxy.

          Show
          Jean-Baptiste Onofré added a comment - I resolved this issue as duplicate. KARAF-846 is about better support of proxy.
          Hide
          James Fraser added a comment -
          Show
          James Fraser added a comment - See log here: http://pastebin.com/Hnyn3wWp
          Hide
          Jean-Baptiste Onofré added a comment -

          As your proxy looks to require authentication, could you try to add:

          -Dhttp.proxyUser= -Dhttp.proxyPassword=

          into the karaf startup script ?

          Show
          Jean-Baptiste Onofré added a comment - As your proxy looks to require authentication, could you try to add: -Dhttp.proxyUser= -Dhttp.proxyPassword= into the karaf startup script ?
          Hide
          James Fraser added a comment -

          Hi Jean,

          etc/org.ops4j.pax.url.mvn.cfg has been correctly configured with my proxy settings – as has my conf/settings for Maven. I also tried adding the below to the karaf bash script:

          setupDefaults() {
          DEFAULT_JAVA_OPTS="-Xms$JAVA_MIN_MEM -Xmx$JAVA_MAX_MEM -Dhttp.proxyHost=http://proxy-sa.dsto.defence.gov.au -Dhttp.port=8080"

          #Set the JVM_VENDOR specific JVM flags
          if [ "$JVM_VENDOR" = "SUN" ]; then
          DEFAULT_JAVA_OPTS="-server $DEFAULT_JAVA_OPTS -Dcom.sun.management.jmxremote"
          elif [ "$JVM_VENDOR" = "IBM" ]; then
          if $os400; then
          DEFAULT_JAVA_OPTS="$DEFAULT_JAVA_OPTS"
          elif $aix; then
          DEFAULT_JAVA_OPTS="-Xverify:none -Xlp $DEFAULT_JAVA_OPTS"
          else
          DEFAULT_JAVA_OPTS="-Xverify:none $DEFAULT_JAVA_OPTS"
          fi
          fi

          This failed like so:

          karaf@root> features:install webconsole
          Error executing command: URL [mvn:org.apache.felix/org.apache.felix.metatype/1.0.4] could not be resolved.

          Any other ideas ? wget and curl both reach out of the proxy.

          Joe

          Show
          James Fraser added a comment - Hi Jean, etc/org.ops4j.pax.url.mvn.cfg has been correctly configured with my proxy settings – as has my conf/settings for Maven. I also tried adding the below to the karaf bash script: setupDefaults() { DEFAULT_JAVA_OPTS="-Xms$JAVA_MIN_MEM -Xmx$JAVA_MAX_MEM -Dhttp.proxyHost= http://proxy-sa.dsto.defence.gov.au -Dhttp.port=8080" #Set the JVM_VENDOR specific JVM flags if [ "$JVM_VENDOR" = "SUN" ]; then DEFAULT_JAVA_OPTS="-server $DEFAULT_JAVA_OPTS -Dcom.sun.management.jmxremote" elif [ "$JVM_VENDOR" = "IBM" ]; then if $os400; then DEFAULT_JAVA_OPTS="$DEFAULT_JAVA_OPTS" elif $aix; then DEFAULT_JAVA_OPTS="-Xverify:none -Xlp $DEFAULT_JAVA_OPTS" else DEFAULT_JAVA_OPTS="-Xverify:none $DEFAULT_JAVA_OPTS" fi fi This failed like so: karaf@root> features:install webconsole Error executing command: URL [mvn:org.apache.felix/org.apache.felix.metatype/1.0.4] could not be resolved. Any other ideas ? wget and curl both reach out of the proxy. Joe
          Hide
          Jean-Baptiste Onofré added a comment -

          Hi Joe,

          Felix Metatype is on the Central repo. So the issue is probably due to the proxy.

          Could you try:

          1/ in etc/org.ops4j.pax.url.mvn.cfg, uncomment the following properties:

          org.ops4j.pax.url.mvn.proxySupport=true (even if it's the default)

          and check that your proxy is defined in your ~/.m2/settings.xml

          2/ try to define your proxy in the karaf startup script by adding the following JVM arguments:

          -Dhttp.proxyHost=your_proxy_host -Dhttp.port=your_proxy_port

          Show
          Jean-Baptiste Onofré added a comment - Hi Joe, Felix Metatype is on the Central repo. So the issue is probably due to the proxy. Could you try: 1/ in etc/org.ops4j.pax.url.mvn.cfg, uncomment the following properties: org.ops4j.pax.url.mvn.proxySupport=true (even if it's the default) and check that your proxy is defined in your ~/.m2/settings.xml 2/ try to define your proxy in the karaf startup script by adding the following JVM arguments: -Dhttp.proxyHost=your_proxy_host -Dhttp.port=your_proxy_port

            People

            • Assignee:
              Unassigned
              Reporter:
              James Fraser
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development