0 Replies Latest reply: May 20, 2014 4:35 AM by user777653 RSS

    Coherence  Name Service Acceptor to Connect to a Proxy

    user777653

      Hi,

       

         I am trying to use the coherence name service approach to connect from an extended java client to a proxy server. Here are the configuration details -

      ==================

      client side cache config

      ==================

        <caching-scheme-mapping>

          <cache-mapping>

            <cache-name>*</cache-name>

            <scheme-name>remote</scheme-name>

          </cache-mapping>

        </caching-scheme-mapping>

          <caching-schemes>

          <remote-cache-scheme>

            <scheme-name>remote</scheme-name>

            <service-name>ExtendTcpCacheService</service-name>

            <proxy-service-name>ExtendTcpProxyService</proxy-service-name>

            <initiator-config>

              <tcp-initiator>

                    <name-service-addresses>

                    <address-provider>extend-address-provider</address-provider>

                   </name-service-addresses>

                <connect-timeout>10s</connect-timeout>

              </tcp-initiator>

              <outgoing-message-handler>

                <request-timeout>5s</request-timeout>

              </outgoing-message-handler>

            </initiator-config>

          </remote-cache-scheme>

       

      =========================

      client side  override file

      =========================

      This is present in the cluster config

      <address-providers>

           <!-- this address provider of the cluster -->

           <address-provider id="extend-address-provider">

             <socket-address>

               <address >10.178.59.59</address>

               <port    >18088</port>

             </socket-address>

           </address-provider>

      </address-providers>

       

      =======================

      proxy side cache config

      =======================

            <proxy-scheme>

               <service-name>ExtendTcpProxyService</service-name>

               <acceptor-config/>

               <autostart>true</autostart>

            </proxy-scheme>

       

       

      With the above configurations, when the client tries to access the cache, I see the following error -

      =========================================================================================================

      Oracle Coherence 12.1.2.0.1 (thread=ExtendTcpCacheService:TcpInitiator, member=n/a): Started: TcpInitiator{Name=ExtendTcpCacheService:TcpInitiator, State=(SERVICE_STARTED), ThreadCount=0, Codec=Codec(Format=POF), Serializer=com.tangosol.io.pof.ConfigurablePofContext, PingInterval=0, PingTimeout=5000, RequestTimeout=5000, ConnectTimeout=10000, SocketProvider=com.oracle.common.internal.net.MultiplexedSocketProvider@1c77475, RemoteAddresses=WrapperSocketAddressProvider{Providers=[[/10.178.59.59:18088]]}, SocketOptions{LingerTimeout=0, KeepAliveEnabled=true, TcpDelayEnabled=false}}

      Oracle Coherence 12.1.2.0.1 (thread=ExtendTcpCacheService:RemoteNameService:TcpInitiator, member=n/a): Started: TcpInitiator{Name=ExtendTcpCacheService:RemoteNameService:TcpInitiator, State=(SERVICE_STARTED), ThreadCount=0, Codec=Codec(Format=POF), Serializer=com.tangosol.net.internal.NameServicePofContext, PingInterval=0, PingTimeout=5000, RequestTimeout=5000, ConnectTimeout=10000, SocketProvider=com.oracle.common.internal.net.MultiplexedSocketProvider@1c77475, RemoteAddresses=WrapperSocketAddressProvider{Providers=[WrapperSocketAddressProvider{Providers=[[/10.178.59.59:18088]]}]}, SocketOptions{LingerTimeout=0, KeepAliveEnabled=true, TcpDelayEnabled=false}}

      Oracle Coherence 12.1.2.0.1 (thread=main, member=n/a): Connecting Socket to 10.178.59.59:18088.3

      Oracle Coherence 12.1.2.0.1 (thread=main, member=n/a): Connected Socket to 10.178.59.59:18088.3

      Oracle Coherence 12.1.2.0.1 (thread=ExtendTcpCacheService:RemoteNameService:TcpInitiator, member=n/a): Opened: TcpConnection(Id=0x0000014618DD49950AB23B3BCF7E92B6B72876FE45BF23D5C9D0D6D4B88F3B07, Open=true, Member(Id=0, Timestamp=2014-05-20 14:31:33.964, Address=10.178.59.59:0, MachineId=0, Location=site:,machine:Balaji-Latitude-E6400,process:20416, Role=SampleBalanceQueryRequestLaunche), LocalAddress=10.178.59.59:45786, RemoteAddress=10.178.59.59:18088.3)

      Oracle Coherence 12.1.2.0.1 (thread=ExtendTcpCacheService:RemoteNameService:TcpInitiator, member=n/a): Opened: Channel(Id=1822269390, Open=true, Connection=0x0000014618DD49950AB23B3BCF7E92B6B72876FE45BF23D5C9D0D6D4B88F3B07)

      Oracle Coherence 12.1.2.0.1 (thread=ExtendTcpCacheService:TcpInitiator, member=n/a): Stopped: TcpInitiator{Name=ExtendTcpCacheService:TcpInitiator, State=(SERVICE_STOPPED), ThreadCount=0, Codec=Codec(Format=POF), Serializer=com.tangosol.io.pof.ConfigurablePofContext, PingInterval=0, PingTimeout=5000, RequestTimeout=5000, ConnectTimeout=10000, SocketProvider=com.oracle.common.internal.net.MultiplexedSocketProvider@1c77475, RemoteAddresses=WrapperSocketAddressProvider{Providers=[[/10.178.59.59:18088]]}, SocketOptions{LingerTimeout=0, KeepAliveEnabled=true, TcpDelayEnabled=false}}

      Oracle Coherence 12.1.2.0.1 (thread=main, member=n/a): Error while starting service "ExtendTcpCacheService": com.tangosol.net.messaging.ConnectionException: No such ProxyService with name: "ExtendTcpCacheService"

              at com.tangosol.coherence.component.net.extend.RemoteService.lookupProxyServiceAddress(RemoteService.CDB:31)

              at com.tangosol.coherence.component.net.extend.remoteService.RemoteCacheService.openChannel(RemoteCacheService.CDB:5)

              at com.tangosol.coherence.component.net.extend.RemoteService.doStart(RemoteService.CDB:11)

              at com.tangosol.coherence.component.net.extend.RemoteService.start(RemoteService.CDB:5)

              at com.tangosol.coherence.component.util.SafeService.startService(SafeService.CDB:53)

              at com.tangosol.coherence.component.util.safeService.SafeCacheService.startService(SafeCacheService.CDB:5)

              at com.tangosol.coherence.component.util.SafeService.ensureRunningService(SafeService.CDB:27)

              at com.tangosol.coherence.component.util.SafeService.start(SafeService.CDB:14)

              at com.tangosol.net.DefaultConfigurableCacheFactory.startService(DefaultConfigurableCacheFactory.java:1218)

              at com.tangosol.net.DefaultConfigurableCacheFactory.ensureServiceInternal(DefaultConfigurableCacheFactory.java:1204)

              at com.tangosol.net.DefaultConfigurableCacheFactory.ensureService(DefaultConfigurableCacheFactory.java:1035)

              at com.tangosol.net.DefaultConfigurableCacheFactory.ensureCache(DefaultConfigurableCacheFactory.java:1017)

              at com.tangosol.net.DefaultConfigurableCacheFactory.configureCache(DefaultConfigurableCacheFactory.java:1411)

              at com.tangosol.net.DefaultConfigurableCacheFactory.ensureCache(DefaultConfigurableCacheFactory.java:355)

              at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:205)

              at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:182)

              at oracle.communication.brm.charging.sdk.query.SampleBalanceQueryRequestLauncher.main(SampleBalanceQueryRequestLauncher.java:157)

      ===================================================================================================================

       

       

      When I change the <service-name> in the <remote-cache-scheme> to ExtendTcpProxyService (which is the same as the proxy service name on the server side) it seems to be working fine. So, it looks like <proxy-service-name> is not being recognized/considered ? Is there any other configurations needed ?

       

      Thanks,

       

      Balaji