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

[HTTP Gateway] Gateway does not detect undeployed contexts

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • jboss-fuse-6.2
    • Fabric8 v1
    • None
    • % %
    • Hide
      fabric:create --wait-for-provisioning --resolver localip
      
      
      container-create-child --jmx-user admin --jmx-password admin --jvm-opts "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5006"  root quickstart2
      container-add-profile quickstart2 quickstarts-cxf-soap
      wait-for-provisioning --provision-timeout 90000
      

      Monitor ZK registry with:

      watch -n 0.5 "echo dump | nc localhost 2181 | grep '/fabric/registry/clusters/apis'"
      

      Note Due to other bug, endpoint might fail to register on the gateway-registry, not reporting their entries to zk. In this case you need to stop and restart quickstart2 container.

      After you are in a scenario where zk list the endpoints, ex

      watch -n 0.5 "echo dump | nc localhost 2181 | grep '/fabric/registry/clusters/apis'"
      
              /fabric/registry/clusters/apis/rest/FabricResource/fabric8/1.0/root
              /fabric/registry/clusters/apis/rest/FabricResource/fabric8/1.0/quickstart2
              /fabric/registry/clusters/apis/ws/HelloWorldImplPort/HelloWorld/1.0/quickstart2
              /fabric/registry/clusters/apis/rest/CustomerService/crm/1.0/quickstart
              /fabric/registry/clusters/apis/rest/FabricResource/fabric8/1.0/quickstart
              /fabric/registry/clusters/apis/rest/FabricResource/fabric8/1.0/gateway
      
      

      Remove quickstarts-cxf-soap from quickstart2 container and notice that the entries are kept in zk, and are also reported in the output of this command:

      curl localhost:9000 | jq .
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
      100  1434  100  1434    0     0   803k      0 --:--:-- --:--:-- --:--:-- 1400k
      {
        "servlets/io.fabric8.fabric-git-server/git/": [
          "http://192.168.1.134:8181/git"
        ],
        "servlets/io.fabric8.fabric-maven-proxy/maven/upload/": [
          "http://192.168.1.134:8181/maven/upload"
        ],
        "/hawtio-swagger/": [
          "http://192.168.1.134:8181/hawtio-swagger"
        ],
        "servlets/io.fabric8.fabric-maven-proxy/maven/download/": [
          "http://192.168.1.134:8181/maven/download"
        ],
        "/git/fabric/": [
          "http://192.168.1.134:8181/git/fabric/"
        ],
        "/hawtio-karaf-terminal/": [
          "http://192.168.1.134:8181/hawtio-karaf-terminal"
        ],
        "servlets/io.fabric8.fabric-jolokia/jolokia/": [
          "http://192.168.1.134:8183/jolokia",
          "http://192.168.1.134:8184/jolokia",
          "http://192.168.1.134:8181/jolokia",
          "http://192.168.1.134:8182/jolokia"
        ],
        "servlets/org.apache.cxf.cxf-rt-transports-http/cxf/": [
          "http://192.168.1.134:8183/cxf",
          "http://192.168.1.134:8181/cxf",
          "http://192.168.1.134:8182/cxf",
          "http://192.168.1.134:8184/cxf"
        ],
        "servlets/io.fabric8.mq.mq-http-discovery/mq-discovery/": [
          "http://192.168.1.134:8181/mq-discovery"
        ],
        "/redhat-branding/": [
          "http://192.168.1.134:8181/redhat-branding"
        ],
        "servlets/io.fabric8.fabric-redirect/*/": [
          "http://192.168.1.134:8181/*"
        ],
        "/cxf/fabric8/": [
          "http://192.168.1.134:8183/cxf/fabric8",
          "http://192.168.1.134:8184/cxf/fabric8",
          "http://192.168.1.134:8181/cxf/fabric8",
          "http://192.168.1.134:8182/cxf/fabric8"
        ],
        "/hawtio/": [
          "http://192.168.1.134:8181/hawtio"
        ],
        "/cxf/crm/": [
          "http://192.168.1.134:8182/cxf/crm"
        ],
        "/cxf/HelloWorld/": [
          "http://192.168.1.134:8183/cxf/HelloWorld"
        ]
      }
      
      Show
      fabric:create --wait- for -provisioning --resolver localip container-create-child --jmx-user admin --jmx-password admin --jvm-opts "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5006" root quickstart2 container-add-profile quickstart2 quickstarts-cxf-soap wait- for -provisioning --provision-timeout 90000 Monitor ZK registry with: watch -n 0.5 "echo dump | nc localhost 2181 | grep '/fabric/registry/clusters/apis' " Note Due to other bug, endpoint might fail to register on the gateway-registry, not reporting their entries to zk. In this case you need to stop and restart quickstart2 container. After you are in a scenario where zk list the endpoints, ex watch -n 0.5 "echo dump | nc localhost 2181 | grep '/fabric/registry/clusters/apis' " /fabric/registry/clusters/apis/ rest /FabricResource/fabric8/1.0/root /fabric/registry/clusters/apis/ rest /FabricResource/fabric8/1.0/quickstart2 /fabric/registry/clusters/apis/ws/HelloWorldImplPort/HelloWorld/1.0/quickstart2 /fabric/registry/clusters/apis/ rest /CustomerService/crm/1.0/quickstart /fabric/registry/clusters/apis/ rest /FabricResource/fabric8/1.0/quickstart /fabric/registry/clusters/apis/ rest /FabricResource/fabric8/1.0/gateway Remove quickstarts-cxf-soap from quickstart2 container and notice that the entries are kept in zk, and are also reported in the output of this command: curl localhost:9000 | jq . % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1434 100 1434 0 0 803k 0 --:--:-- --:--:-- --:--:-- 1400k { "servlets/io.fabric8.fabric-git-server/git/" : [ "http: //192.168.1.134:8181/git" ], "servlets/io.fabric8.fabric-maven-proxy/maven/upload/" : [ "http: //192.168.1.134:8181/maven/upload" ], "/hawtio-swagger/" : [ "http: //192.168.1.134:8181/hawtio-swagger" ], "servlets/io.fabric8.fabric-maven-proxy/maven/download/" : [ "http: //192.168.1.134:8181/maven/download" ], "/git/fabric/" : [ "http: //192.168.1.134:8181/git/fabric/" ], "/hawtio-karaf-terminal/" : [ "http: //192.168.1.134:8181/hawtio-karaf-terminal" ], "servlets/io.fabric8.fabric-jolokia/jolokia/" : [ "http: //192.168.1.134:8183/jolokia" , "http: //192.168.1.134:8184/jolokia" , "http: //192.168.1.134:8181/jolokia" , "http: //192.168.1.134:8182/jolokia" ], "servlets/org.apache.cxf.cxf-rt-transports-http/cxf/" : [ "http: //192.168.1.134:8183/cxf" , "http: //192.168.1.134:8181/cxf" , "http: //192.168.1.134:8182/cxf" , "http: //192.168.1.134:8184/cxf" ], "servlets/io.fabric8.mq.mq-http-discovery/mq-discovery/" : [ "http: //192.168.1.134:8181/mq-discovery" ], "/redhat-branding/" : [ "http: //192.168.1.134:8181/redhat-branding" ], "servlets/io.fabric8.fabric-redirect/*/" : [ "http: //192.168.1.134:8181/*" ], "/cxf/fabric8/" : [ "http: //192.168.1.134:8183/cxf/fabric8" , "http: //192.168.1.134:8184/cxf/fabric8" , "http: //192.168.1.134:8181/cxf/fabric8" , "http: //192.168.1.134:8182/cxf/fabric8" ], "/hawtio/" : [ "http: //192.168.1.134:8181/hawtio" ], "/cxf/crm/" : [ "http: //192.168.1.134:8182/cxf/crm" ], "/cxf/HelloWorld/" : [ "http: //192.168.1.134:8183/cxf/HelloWorld" ] }

      If we remove a profile containing REST endpoints from a contaiener that had already been detected and republished by http-gateway, the endpoint are not removed from http gateway list.

              pantinor@redhat.com Paolo Antinori
              pantinor@redhat.com Paolo Antinori
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: