Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-3039

[HTTP Gateway] apis mapping rules don't work right after deployment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • Future
    • jboss-fuse-6.2
    • CXF, Fabric8 v1
    • None
    • % %
    • Hide

      1.create fabric and deploy rest and soap quickstarts

      JBossFuse:karaf@root> container-create-child --profile quickstarts-cxf-rest root quickstart
      
      JBossFuse:karaf@root> container-create-child --profile quickstarts-cxf-soap root quickstart2
      

      2. check if quickstarts are properly registered in zk
      3.create child container with gateway-http profile

      container-create-child --profile gateway-http root gateway
      

      4. check gateway output from http://localhost:9000/
      5. change io.fabric8.gateway.http.mapping-apis.properties :

      zooKeeperPath = /fabric/registry/clusters/apis/ws/ 

      6. check gateway output - will be same as in step 4.

      Show
      1.create fabric and deploy rest and soap quickstarts JBossFuse:karaf@root> container-create-child --profile quickstarts-cxf- rest root quickstart JBossFuse:karaf@root> container-create-child --profile quickstarts-cxf-soap root quickstart2 2. check if quickstarts are properly registered in zk 3.create child container with gateway-http profile container-create-child --profile gateway-http root gateway 4. check gateway output from http://localhost:9000/ 5. change io.fabric8.gateway.http.mapping-apis.properties : zooKeeperPath = /fabric/registry/clusters/apis/ws/ 6. check gateway output - will be same as in step 4.

      Gateway output is the same right after changing zooKeeperPath = /fabric/registry/clusters/apis/ws/ in io.fabric8.gateway.http.mapping-apis.properties file. :

       
      {"servlets/org.apache.cxf.cxf-rt-transports-http/cxf/":["http://dhcp-10-40-3-36.brq.redhat.com:8182/cxf","http://dhcp-10-40-3-36.brq.redhat.com:8183/cxf","http://dhcp-10-40-3-36.brq.redhat.com:8181/cxf"],"servlets/io.fabric8.mq.mq-http-discovery/mq-discovery/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/mq-discovery"],"/redhat-branding/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/redhat-branding"],"servlets/io.fabric8.fabric-redirect/*/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/*"],"/cxf/fabric8/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/cxf/fabric8"],"/hawtio/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/hawtio"],"/cxf/crm/":["http://dhcp-10-40-3-36.brq.redhat.com:8182/cxf/crm"],"/cxf/HelloWorld/":["http://dhcp-10-40-3-36.brq.redhat.com:8183/cxf/HelloWorld"],"/hawtio-karaf-terminal/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/hawtio-karaf-terminal"],"servlets/io.fabric8.fabric-jolokia/jolokia/":["http://dhcp-10-40-3-36.brq.redhat.com:8184/jolokia","http://dhcp-10-40-3-36.brq.redhat.com:8183/jolokia","http://dhcp-10-40-3-36.brq.redhat.com:8181/jolokia","http://dhcp-10-40-3-36.brq.redhat.com:8182/jolokia"],"/git/fabric/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/git/fabric/"],"/hawtio-swagger/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/hawtio-swagger"],"servlets/io.fabric8.fabric-maven-proxy/maven/download/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/maven/download"],"servlets/io.fabric8.fabric-maven-proxy/maven/upload/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/maven/upload"],"servlets/io.fabric8.fabric-git-server/git/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/git"]}
      

      "/cxf/crm/" is still present even when zookeeperPath was changed to " /fabric/registry/clusters/apis/ws"
      After restarting the gateway container output is changed:

      {"/cxf/HelloWorld/":["http://dhcp-10-40-3-36.brq.redhat.com:8183/cxf/HelloWorld"],"servlets/org.apache.cxf.cxf-rt-transports-http/cxf/":["http://dhcp-10-40-3-36.brq.redhat.com:8182/cxf","http://dhcp-10-40-3-36.brq.redhat.com:8183/cxf","http://dhcp-10-40-3-36.brq.redhat.com:8181/cxf"],"/hawtio-karaf-terminal/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/hawtio-karaf-terminal"],"/git/fabric/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/git/fabric/"],"servlets/io.fabric8.fabric-jolokia/jolokia/":["http://dhcp-10-40-3-36.brq.redhat.com:8182/jolokia","http://dhcp-10-40-3-36.brq.redhat.com:8184/jolokia","http://dhcp-10-40-3-36.brq.redhat.com:8181/jolokia","http://dhcp-10-40-3-36.brq.redhat.com:8183/jolokia"],"servlets/io.fabric8.mq.mq-http-discovery/mq-discovery/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/mq-discovery"],"/redhat-branding/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/redhat-branding"],"/hawtio-swagger/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/hawtio-swagger"],"servlets/io.fabric8.fabric-maven-proxy/maven/download/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/maven/download"],"servlets/io.fabric8.fabric-redirect/*/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/*"],"/hawtio/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/hawtio"],"servlets/io.fabric8.fabric-maven-proxy/maven/upload/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/maven/upload"],"servlets/io.fabric8.fabric-git-server/git/":["http://dhcp-10-40-3-36.brq.redhat.com:8181/git"]} 
      

      Now when gateway is restarted changing the rules is working well without restart.

      NOTE

      This is a bug with Fabric CXF endpoint registration, that affects also HTTP Gateway.

              atarocch@redhat.com Andrea Tarocchi
              mmelko@redhat.com Matej Melko
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: