1 Reply Latest reply on May 18, 2017 10:47 PM by sebint

    configure unique http port on the profile/container to host webservices

    lavin.korukanti

      Hello All,

       

      we have 2 hosts (a and b) and  have our webservices deployed in the containers , we are planning to expose those services hosted on the Fuse containers to consumers as below

      http://host-a:9003/context1 and http://host-a:9004/context2.

        http://host-b:9003/context1 and http://host-b:9004/context2.

       

       

      We have configured the below property in org.osgi.service.http.port  in the file org.ops4j.pax.web.cfg to 9003 ports for our containers.

       

      We have deployed all the fabs( context1, context2)  in our container but we are getting the below error

       

      org.apache.camel.RuntimeCamelException: java.lang.RuntimeException: Soap 1.1 endpoint already registered on address http://host-a:9003/MessageAdapterServiceContext/SOAPMessageService

              at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1326)[118:org.apache.camel.camel-core:2.10.0.redhat-60057]

              at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:120)[135:org.apache.camel.camel-spring:2.10.0.redhat-60024]

              at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:283)[135:org.apache.camel.camel-spring:2.10.0.redhat-60024]

              at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)[150:org.springframework.context:3.1.4.RELEASE]

              at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:327)[150:org.springframework.context:3.1.4.RELEASE]

              at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:941)[150:org.springframework.context:3.1.4.RELEASE]

              at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)[106:org.springframework.osgi.core:1.2.1]

              at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)[106:org.springframework.osgi.core:1.2.1]

              at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[106:org.springframework.osgi.core:1.2.1]

              at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[106:org.springframework.osgi.core:1.2.1]

              at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[124:org.springframework.osgi.extender:1.2.1]

              at java.lang.Thread.run(Thread.java:722)[:1.7.0_09-icedtea]

      Caused by: java.lang.RuntimeException: Soap 1.1 endpoint already registered on address http://10.26.24.36:9001/MessageAdapterServiceContext/SOAPMessageService

              at org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:862)[114:org.apache.cxf.cxf-rt-bindings-soap:2.6.0.redhat-60024]

              at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:131)[76:org.apache.cxf.cxf-api:2.6.0.redhat-60029]

              at org.apache.camel.component.cxf.CxfConsumer.doStart(CxfConsumer.java:249)[146:org.apache.camel.camel-cxf:2.10.0.redhat-60057]

              at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)[118:org.apache.camel.camel-core:2.10.0.redhat-60057]

              at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1777)[118:org.apache.camel.camel-core:2.10.0.redhat-60057]

              at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:2073)[118:org.apache.camel.camel-core:2.10.0.redhat-60057]

              at org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:2009)[118:org.apache.camel.camel-core:2.10.0.redhat-60057]

              at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1937)[118:org.apache.camel.camel-core:2.10.0.redhat-60057]

              at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1716)[118:org.apache.camel.camel-core:2.10.0.redhat-60057]

              at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1597)[118:org.apache.camel.camel-core:2.10.0.red"

       

       

      our Idea is to use a Load-balancer VIP and keep context-based routing rules to route the requests to different containers in the fab.

       

      Can you please let me know if I am missing any where in configuring those HTTP ports or can you please guide me on how to configure the HTTP ports to my containers.

        • 1. Re: configure unique http port on the profile/container to host webservices
          sebint

          I had the same problem.

          Stack trace:

          Exception in thread "SpringOsgiExtenderThread-14" org.apache.camel.RuntimeCamelException: java.lang.RuntimeException: Soap 1.1 endpoint already registered on address /report

            at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1690)

            at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:138)

            at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:340)

            at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)

            at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)

            at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:954)

            at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)

            at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)

            at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)

            at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)

            at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)

            at java.lang.Thread.run(Unknown Source)

          Caused by: java.lang.RuntimeException: Soap 1.1 endpoint already registered on address /report

            at org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:921)

            at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:123)

            at org.apache.camel.component.cxf.CxfConsumer.doStart(CxfConsumer.java:81)

            at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)

            at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:3275)

            at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:3569)

            at org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:3505)

            at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3435)

            at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3203)

            at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3059)

            at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:175)

            at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2854)

            at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2850)

            at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2873)

            at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2850)

            at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)

            at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2819)

            at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:275)

            at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:136)

            ... 10 more