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

Fabric Load Balancing for CXF publish a wrong URL on ZK

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • fuse-6.3-R17-GA
    • fuse-6.3-R16-GA
    • CXF
    • None
    • % %
    • +
    • Hide

      mvn clean install of the reproducer.zip

      Then on a standalone Fuse 6.3 R16:

      fabric:create --clean -g localip -r localip --wait-for-provisioning
      profile-import mvn:org.acme.demo/acme-demo-cxf-discovery-provider-profile/1.0.0-SNAPSHOT/zip/profile
      profile-import mvn:org.acme.demo/acme-demo-cxf-discovery-consumer-profile/1.0.0-SNAPSHOT/zip/profile
      container-create-child --profile acmetz-demo-cxf-discovery-provider-profile root acmetz-cxf-provider
      container-create-child --profile acmetz-demo-cxf-discovery-consumer-profile root acmetz-cxf-consumer
      Now there is a rest web service that consume the two load balanced webservices.

      If you call the consumer rs with:

      curl -v -X GET -i -H "Accept: application/json"  [http://[consumer|http://[consumer/] node]:8183/cxf/consumerrs/rs to consumer the jax-rs or the curl -v -X GET -i -H "Accept: application/json" [http://[consumer|http://[consumer/] node]:8183/cxf/consumerrs/ws to consume the jax-ws the response will be always 404.

      Look in ZK with zk:get /fabric/cxf/endpoints/providerrs/00000000000 you will find "services":["[http://[producer|http://[producer/] node]/providerrs"]} instead _ "services":["[http://[producer|http://[producer/] node]/cxf/providerrs"]}_

      Modify the zk node with zk:edit /fabric/cxf/endpoints/providerws/00000000000 adding the missing /cxf and now the consumer ws that use jax-rs is able to reach the provider was (the same for jax-ws ws)

      Show
      mvn clean install of the reproducer.zip Then on a standalone Fuse 6.3 R16: fabric:create --clean -g localip -r localip --wait-for-provisioning profile-import mvn:org.acme.demo/acme-demo-cxf-discovery-provider-profile/1.0.0-SNAPSHOT/zip/profile profile-import mvn:org.acme.demo/acme-demo-cxf-discovery-consumer-profile/1.0.0-SNAPSHOT/zip/profile container-create-child --profile acmetz-demo-cxf-discovery-provider-profile root acmetz-cxf-provider container-create-child --profile acmetz-demo-cxf-discovery-consumer-profile root acmetz-cxf-consumer Now there is a rest web service that consume the two load balanced webservices. If you call the consumer rs with: curl -v -X GET -i -H "Accept: application/json"  [http://[consumer|http://[consumer/] node]:8183/cxf/consumerrs/rs to consumer the jax-rs or the curl -v -X GET -i -H "Accept: application/json" [http://[consumer|http://[consumer/] node]:8183/cxf/consumerrs/ws to consume the jax-ws the response will be always 404. Look in ZK with zk:get /fabric/cxf/endpoints/providerrs/00000000000 you will find "services":["[http://[producer|http://[producer/] node]/providerrs"]} instead _ "services":["[http://[producer|http://[producer/] node]/cxf/providerrs"]}_ Modify the zk node with zk:edit /fabric/cxf/endpoints/providerws/00000000000 adding the missing /cxf and now the consumer ws that use jax-rs is able to reach the provider was (the same for jax-ws ws)

    Description

      Following the documentation has been configured the load balancing features for two web services, one that uses jax-rs and another that uses jax-ws.

       The load balancing features wrote on ZK the URL of web services in the ensemble with the load balancing configured under the path `/fabric/cxf/endpoints`

      The issue is that on ZK the services URL missing of the /cxf/ part of the path causing a HTTP 404 when a client try to use it.

      That is:

      zk:get /fabric/cxf/endpoints/providerrs/00000000000

      ...

      "services":["http://10.36.113.122:8182/providerrs"]}

      instead of 
      "services":["http://10.36.113.122:8182/cxf/providerrs"]}

      Attachments

        Activity

          People

            yfang@redhat.com Freeman(Yue) Fang
            rhn-support-agagliar Antonio Gagliardi
            Vratislav Hais Vratislav Hais (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: